/* Cookie Consent Banner — SimpliFaq Brand */

/* ========================================
   BANNER
   ======================================== */
.cookie-consent-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 680px;
    width: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
}

.cookie-consent-banner.show {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

.cookie-consent-text strong {
    color: #0F172A;
    font-weight: 600;
}

.cookie-policy-link {
    color: #60A5FA;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-policy-link:hover {
    color: #3B82F6;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.35);
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(96, 165, 250, 0.45);
}

.cookie-btn-accept:active {
    transform: translateY(0);
}

.cookie-btn-reject {
    background: #F3F4F6;
    color: #4B5563;
}

.cookie-btn-reject:hover {
    background: #E5E7EB;
    color: #1F2937;
}

.cookie-btn-manage {
    background: transparent;
    color: #60A5FA;
    border: 1.5px solid #60A5FA;
}

.cookie-btn-manage:hover {
    background: rgba(96, 165, 250, 0.06);
    color: #3B82F6;
    border-color: #3B82F6;
}

/* ========================================
   MODAL
   ======================================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: cookie-modal-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookie-modal-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cookie-modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.cookie-modal-content > p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4B5563;
    margin-bottom: 1.5rem;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.cookie-close-btn:hover {
    background: #F3F4F6;
    color: #1F2937;
}

/* Cookie categories */
.cookie-category {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #FAFAFA;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.cookie-category-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6B7280;
    margin: 0;
}

/* Toggle switches */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    background: #D1D5DB;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.cookie-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle input {
    display: none;
}

.cookie-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    transform: translateX(22px);
}

.cookie-toggle.active {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
}

/* Modal actions */
.cookie-modal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .cookie-consent-banner {
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
        transform: none;
        width: auto;
        max-width: none;
        padding: 1.25rem;
        border-radius: 14px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        padding: 1.5rem;
        border-radius: 16px;
        max-height: 90vh;
    }

    .cookie-modal-buttons {
        flex-direction: column;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-btn,
    .cookie-toggle,
    .cookie-toggle-slider,
    .cookie-close-btn {
        transition: none !important;
    }

    .cookie-modal-content {
        animation: none !important;
    }
}
