/* GDPR cookie banner + preferences modal */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    background: #ffffff;
    border-radius: var(--card-radius, 20px);
    box-shadow: 0 12px 40px rgba(15, 37, 46, 0.18);
    border: 1px solid rgba(115, 39, 83, 0.12);
    font-family: 'Raleway', sans-serif;
    color: var(--text-dark, #0F252E);
    animation: cookie-banner-in 0.35s ease;
}

@keyframes cookie-banner-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 28px;
    max-width: 1280px;
    margin: 0 auto;
}

.cookie-banner__content {
    flex: 1 1 auto;
    min-width: 0;
}

.cookie-banner__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--primary-color, #732753);
}

.cookie-banner__text {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    color: var(--text-dark, #0F252E);
}

.cookie-banner__text a {
    color: var(--primary-color, #732753);
    text-decoration: underline;
}

.cookie-banner__actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Buttons (shared with modal) */
.cookie-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--button-radius, 25px);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.cookie-btn--primary {
    background-color: var(--primary-color, #732753);
    color: #ffffff;
}
.cookie-btn--primary:hover {
    background-color: var(--primary-hover, #5a1e42);
}

.cookie-btn--outline {
    background-color: transparent;
    color: var(--primary-color, #732753);
    border-color: var(--primary-color, #732753);
}
.cookie-btn--outline:hover {
    background-color: var(--primary-color, #732753);
    color: #ffffff;
}

.cookie-btn--ghost {
    background-color: transparent;
    color: var(--text-dark, #0F252E);
    border-color: rgba(15, 37, 46, 0.2);
}
.cookie-btn--ghost:hover {
    background-color: rgba(15, 37, 46, 0.06);
}

/* Preferences modal */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Raleway', sans-serif;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 37, 46, 0.55);
    backdrop-filter: blur(2px);
}

.cookie-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: var(--card-radius, 20px);
    box-shadow: 0 24px 60px rgba(15, 37, 46, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-dark, #0F252E);
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(15, 37, 46, 0.1);
}

.cookie-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color, #732753);
}

.cookie-modal__close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-dark, #0F252E);
    padding: 0 4px;
}
.cookie-modal__close:hover {
    color: var(--primary-color, #732753);
}

.cookie-modal__body {
    padding: 24px 28px;
    overflow-y: auto;
}

.cookie-modal__intro {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.cookie-category {
    padding: 16px 0;
    border-bottom: 1px solid rgba(15, 37, 46, 0.08);
}
.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.cookie-category__title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-category__title h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark, #0F252E);
}

.cookie-category__badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 12px;
    background-color: rgba(115, 39, 83, 0.1);
    color: var(--primary-color, #732753);
}

.cookie-category__desc {
    margin: 0;
    padding-left: 60px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(15, 37, 46, 0.75);
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cccccc;
    border-radius: 26px;
    transition: background-color 0.2s ease;
}
.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.cookie-toggle input:checked + .cookie-toggle__slider {
    background-color: var(--primary-color, #732753);
}
.cookie-toggle input:checked + .cookie-toggle__slider::before {
    transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle__slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-modal__footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 28px;
    border-top: 1px solid rgba(15, 37, 46, 0.1);
    background-color: rgba(255, 249, 248, 0.6);
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px;
        gap: 16px;
    }
    .cookie-banner__actions {
        justify-content: stretch;
    }
    .cookie-banner__actions .cookie-btn {
        flex: 1 1 auto;
        text-align: center;
    }
    .cookie-modal__header,
    .cookie-modal__body,
    .cookie-modal__footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .cookie-modal__footer {
        flex-direction: column-reverse;
    }
    .cookie-modal__footer .cookie-btn {
        width: 100%;
    }
    .cookie-category__desc {
        padding-left: 0;
    }
}
