/* =============================================
   Cookie Consent Banner
   ============================================= */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.3, 1);
    pointer-events: none;
}

#cookie-consent-banner.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner-inner {
    background-color: var(--secondary-bg-color, #272b24);
    color: var(--secondary-text-color, #ffffff);
    padding: 32px 40px;
    font-family: 'Made Tommy Regular', sans-serif;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
}

/* Header row: text left, buttons right */
.cookie-banner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Made Tommy Light', sans-serif;
    max-width: 700px;
}

.cookie-banner-text a {
    color: var(--secondary-link-color, #8f938c);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
    color: var(--secondary-link-hover-color, #ebf3e4);
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

/* Cookie categories section */
.cookie-categories {
    display: none;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-categories.open {
    display: block;
}

.cookie-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-category-info {
    flex: 1;
    margin-right: 24px;
}

.cookie-category-name {
    font-family: 'Made Tommy Regular', sans-serif;
    font-size: 0.95rem;
    font-weight: normal;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    font-family: 'Made Tommy Light', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cookie-badge-required {
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

.cookie-badge-optional {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

.cookie-category-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Made Tommy Light', sans-serif;
    max-width: 600px;
}

.cookie-category-toggle {
    flex-shrink: 0;
    align-self: center;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.25s ease;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: transform 0.25s ease, background-color 0.25s ease;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: rgba(255, 255, 255, 0.25);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle input:disabled:checked + .cookie-toggle-slider:before {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Details toggle link */
.cookie-details-toggle {
    background: none;
    border: none;
    color: var(--secondary-link-color, #8f938c);
    font-family: 'Made Tommy Light', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
    display: inline-block;
}

.cookie-details-toggle:hover {
    color: var(--secondary-link-hover-color, #ebf3e4);
}

/* Buttons */
.cookie-btn {
    font-family: 'Made Tommy Regular', sans-serif;
    font-size: 0.9rem;
    padding: 12px 28px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.cookie-btn-accept {
    background-color: var(--primary-bg-color, #f8f7f6);
    color: var(--secondary-bg-color, #272b24);
}

.cookie-btn-accept:hover {
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-btn-decline {
    background-color: transparent;
    color: var(--secondary-text-color, #ffffff);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-decline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.05);
}

.cookie-btn-save {
    background-color: var(--primary-bg-color, #f8f7f6);
    color: var(--secondary-bg-color, #272b24);
    display: none;
    margin-top: 16px;
    margin-left: auto;
}

.cookie-btn-save:hover {
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-categories.open ~ .cookie-banner-save-row .cookie-btn-save {
    display: inline-block;
}

.cookie-banner-save-row {
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-inner {
        padding: 24px 20px;
    }

    .cookie-banner-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cookie-banner-text {
        font-size: 0.85rem;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
        align-self: stretch;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cookie-details-toggle {
        display: block;
        text-align: center;
    }

    .cookie-category {
        flex-direction: row;
        align-items: flex-start;
    }

    .cookie-category-info {
        margin-right: 16px;
    }

    .cookie-btn-save {
        width: 100%;
    }

    .cookie-banner-save-row {
        justify-content: stretch;
    }
}
