/* VESSANO Cookie Banner Styles - Editorial Minimal Style */
/* Brand colors: --sand: #F0DBC7, --accent: #8E2F22, --bg-light: #FBF6F2, --ink-light: #301D09 */

.vessano-cookie-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 420px;
    width: calc(100% - 4rem);
    background: var(--bg-light, #FBF6F2);
    border: 1px solid rgba(48, 29, 9, 0.12);
    z-index: 10000;
    box-shadow: 0 15px 35px rgba(48, 29, 9, 0.08);
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.vessano-cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ink-light, #301D09);
    opacity: 0.4;
    cursor: pointer;
    padding: 0.25rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10001;
}

.cookie-banner-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.cookie-banner-content {
    padding: 2.25rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.cookie-banner-text {
    width: 100%;
}

.cookie-banner-title {
    font-family: "Cormorant", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 500;
    font-style: italic;
    color: var(--ink-light, #301D09);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.cookie-banner-description {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(48, 29, 9, 0.8);
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

/* Custom cookie buttons for precise editorial control */
.btn-cookie {
    width: 100%;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.85rem 1.5rem;
    border-radius: 0; /* Flat editorial edges */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    box-sizing: border-box;
}

.btn-cookie-primary {
    background: transparent;
    color: var(--accent, #8E2F22);
    border: 1px solid var(--accent, #8E2F22);
}

.btn-cookie-primary:hover {
    background: var(--accent, #8E2F22);
    color: var(--bg-light, #FBF6F2);
}

.btn-cookie-secondary {
    background: transparent;
    color: var(--ink-light, #301D09);
    border: 1px solid rgba(48, 29, 9, 0.25);
}

.btn-cookie-secondary:hover {
    background: var(--ink-light, #301D09);
    color: var(--bg-light, #FBF6F2);
    border-color: var(--ink-light, #301D09);
}

/* Cookie Settings Modal */
.vessano-cookie-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000010;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.cookie-settings-open .new-header,
body.cookie-settings-open .mobile-menu-btn,
body.cookie-settings-open .mobile-menu-overlay,
body.cookie-settings-open .mobile-menu {
    z-index: 100000000 !important;
}

body.cookie-settings-open.scroll-locked {
    touch-action: auto;
}

.vessano-cookie-settings.show {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(48, 29, 9, 0.4);
    backdrop-filter: blur(8px);
}

.cookie-settings-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    background: var(--bg-light, #FBF6F2);
    border: 1px solid rgba(48, 29, 9, 0.12);
    border-radius: 0; /* Flat editorial edges */
    max-width: 580px;
    width: calc(100% - 2rem);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(48, 29, 9, 0.15);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.vessano-cookie-settings.show .cookie-settings-modal {
    transform: translate(-50%, -50%) scale(1);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid rgba(48, 29, 9, 0.08);
}

.cookie-settings-title {
    font-family: "Cormorant", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 500;
    font-style: italic;
    color: var(--ink-light, #301D09);
    margin: 0;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink-light, #301D09);
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-settings-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.cookie-settings-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.cookie-settings-description {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(48, 29, 9, 0.8);
    margin: 0 0 2rem 0;
}

.cookie-category {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(48, 29, 9, 0.08);
    background: rgba(48, 29, 9, 0.02);
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(48, 29, 9, 0.15);
    background: rgba(48, 29, 9, 0.04);
}

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

.cookie-category h3 {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink-light, #301D09);
    margin: 0;
}

.cookie-category-description {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(48, 29, 9, 0.75);
    margin: 0;
}

/* Minimal Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 20px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(48, 29, 9, 0.15);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0; /* Sharp geometric style */
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--bg-light, #FBF6F2);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0; /* Sharp style */
}

.cookie-toggle input:checked + .toggle-slider {
    background: var(--ink-light, #301D09);
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background-color: var(--bg-light, #FBF6F2);
}

.cookie-toggle input:disabled + .toggle-slider {
    background: var(--ink-light, #301D09);
    opacity: 0.4;
    cursor: not-allowed;
}

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

.cookie-settings-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(48, 29, 9, 0.08);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.cookie-settings-actions .btn-cookie {
    width: auto;
    min-width: 160px;
}

/* Scrollbar for settings content */
.cookie-settings-content::-webkit-scrollbar {
    width: 6px;
}

.cookie-settings-content::-webkit-scrollbar-track {
    background: rgba(48, 29, 9, 0.02);
}

.cookie-settings-content::-webkit-scrollbar-thumb {
    background: rgba(48, 29, 9, 0.15);
}

.cookie-settings-content::-webkit-scrollbar-thumb:hover {
    background: rgba(48, 29, 9, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .vessano-cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .cookie-banner-content {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem;
        gap: 1.25rem;
    }

    .cookie-banner-title {
        font-size: 1.5rem;
    }

    .cookie-banner-actions {
        gap: 0.5rem;
    }

    .cookie-settings-modal {
        position: fixed;
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        inset: 0;
        transform: none;
        border: none;
        display: flex;
        flex-direction: column;
    }

    .vessano-cookie-settings.show .cookie-settings-modal {
        transform: none;
    }

    .cookie-settings-header {
        padding: 1.5rem;
    }

    .cookie-settings-content {
        padding: 1.5rem;
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        touch-action: pan-y;
    }

    .cookie-settings-actions {
        padding: 1.5rem;
        flex-direction: column;
        flex: 0 0 auto;
    }

    .cookie-settings-actions .btn-cookie {
        width: 100%;
    }
}
