/* ========================================
   Cookie Consent Banner - Al-Fikr
   ======================================== */

.cookie-consent {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 1080;
    max-width: 420px;
    margin-inline-start: auto;
    padding: 1.25rem 1.35rem 1.35rem;
    background: #ffffff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 16px;
    box-shadow:
        0 18px 40px rgba(37, 44, 64, 0.14),
        0 2px 8px rgba(37, 44, 64, 0.06);
    color: var(--secondary-800, #273344);
    opacity: 0;
    transform: translateY(1.25rem);
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.cookie-consent.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent.is-hiding {
    opacity: 0;
    transform: translateY(1.25rem);
    pointer-events: none;
}

.cookie-consent__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cookie-consent__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--primary-100, #fef3c7), var(--primary-200, #fde68a));
    color: var(--primary-800, #8f6816);
    font-size: 1.15rem;
}

.cookie-consent__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--blue-800, #252C40);
}

.cookie-consent__body {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--gray-600, #4b5563);
}

.cookie-consent__link {
    color: var(--blue-800, #252C40);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__link:hover,
.cookie-consent__link:focus-visible {
    color: var(--primary-700, #b58422);
}

.cookie-consent__details {
    margin: 0 0 1rem;
    border-radius: 10px;
    background: var(--secondary-50, #f8fafc);
    border: 1px solid var(--gray-200, #e5e7eb);
    overflow: hidden;
}

.cookie-consent__details-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 0;
    background: transparent;
    color: var(--blue-800, #252C40);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: start;
}

.cookie-consent__details-toggle i {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
}

.cookie-consent__details.is-open .cookie-consent__details-toggle i {
    transform: rotate(180deg);
}

.cookie-consent__details-panel {
    display: none;
    padding: 0 0.85rem 0.85rem;
}

.cookie-consent__details.is-open .cookie-consent__details-panel {
    display: block;
}

.cookie-consent__category {
    padding: 0.55rem 0;
    border-top: 1px solid var(--gray-200, #e5e7eb);
}

.cookie-consent__category-title {
    margin: 0 0 0.2rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--secondary-800, #273344);
}

.cookie-consent__category-text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--gray-600, #4b5563);
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cookie-consent__btn {
    flex: 1 1 auto;
    min-width: 7.5rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.cookie-consent__btn--accept {
    background: var(--blue-800, #252C40);
    color: #fff;
}

.cookie-consent__btn--accept:hover,
.cookie-consent__btn--accept:focus-visible {
    background: var(--secondary-900, #1b2532);
    box-shadow: 0 4px 12px rgba(37, 44, 64, 0.25);
}

.cookie-consent__btn--reject {
    background: #fff;
    border-color: var(--gray-300, #d1d5db);
    color: var(--secondary-700, #334155);
}

.cookie-consent__btn--reject:hover,
.cookie-consent__btn--reject:focus-visible {
    border-color: var(--secondary-500, #64748b);
    background: var(--secondary-50, #f8fafc);
}

@media (max-width: 575.98px) {
    .cookie-consent {
        inset-inline: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
        margin-inline: 0;
        padding: 1.1rem 1.1rem 1.2rem;
        border-radius: 14px;
    }

    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-consent__btn {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }
}
