/**
 * Consent Banner and Modal Styles
 * 
 * This file contains styles for:
 * - Cookie consent banner
 * - Consent customization modal
 * - Responsive design for mobile and desktop
 */

/* Consent Banner */
.consent-banner {
    width: 100%;
    max-width: 85%;
    border-radius: 12px;
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #1f2937;
    z-index: 9999;
    padding: 20px;
    display: none;
    font-family: 'Manrope', sans-serif;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.consent-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.consent-banner-text {
    flex: 1;
}

.consent-banner-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.consent-banner-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.consent-banner-description a {
    display: inline-block;
}

.consent-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.consent-btn {
    outline: none;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.consent-btn:focus {
    outline: none;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.consent-btn-primary {
    background: #3b82f6;
    color: white;
}

.consent-btn-primary:hover {
    background: #2563eb;
}

.consent-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.consent-btn-secondary:hover {
    background: #e5e7eb;
}

.consent-btn-text {
    background: transparent;
    color: #6b7280;
    padding: 8px 16px;
}

.consent-btn-text:hover {
    color: #374151;
    background: #f9fafb;
}

/* Consent Modal */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.consent-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.consent-modal-header {
    padding: 24px 24px 0;
    border-bottom: 1px solid #e5e7eb;
}

.consent-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.consent-modal-description {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.consent-modal-body {
    padding: 24px;
}

.consent-category {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
}

.consent-category:last-child {
    border-bottom: none;
}

.consent-category-toggle {
    margin-top: 2px;
}

.consent-category-info {
    flex: 1;
}

.consent-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.consent-category-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.consent-category-required {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
    margin-top: 4px;
}

.consent-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toggle Switch */
.consent-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.consent-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.consent-toggle input:checked+.consent-toggle-slider {
    background-color: #3b82f6;
}

.consent-toggle input:checked+.consent-toggle-slider:before {
    transform: translateX(20px);
}

.consent-toggle input:disabled+.consent-toggle-slider {
    background-color: #059669;
    cursor: not-allowed;
}

.consent-toggle input:disabled+.consent-toggle-slider:before {
    transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .consent-banner-content {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .consent-banner {
        padding: 16px;
        max-width: calc(100% - 32px);
        bottom: 0;
    }

    .consent-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .consent-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .consent-btn {
        width: 100%;
    }

    .consent-modal {
        padding: 16px;
    }

    .consent-modal-content {
        max-height: 95vh;
    }

    .consent-modal-header,
    .consent-modal-body,
    .consent-modal-footer {
        padding: 20px;
    }

    .consent-modal-footer {
        flex-direction: column;
    }

    .consent-category {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .consent-banner-title {
        font-size: 16px;
    }

    .consent-banner-description {
        font-size: 13px;
    }

    .consent-modal-title {
        font-size: 20px;
    }

    .consent-modal-description {
        font-size: 14px;
    }
}

/* Animation */
.consent-banner,
.consent-modal {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.consent-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}