/* ==========================================================================
   Audioguide.md — Minimalist Cookie Banner & Preferences Modal (GDPR Moldova)
   ========================================================================== */

.cookie-banner-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 440px;
    width: calc(100vw - 32px);
    z-index: 9999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg, 18px);
    padding: 20px 22px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.75), 0 0 25px rgba(56, 189, 248, 0.12);
    animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f8fafc;
    font-family: var(--font-body, 'Inter', sans-serif);
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .cookie-banner-wrap {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        padding: 16px;
    }
}

.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
}

.cookie-banner-text {
    font-size: 0.84rem;
    line-height: 1.5;
    color: #94a3b8;
    margin-bottom: 14px;
}

.cookie-banner-text a {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-cookie-accept {
    background: #38bdf8;
    color: #041226;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 16px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.btn-cookie-accept:hover {
    background: #7dd3fc;
    transform: translateY(-1px);
}

.btn-cookie-essential {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cookie-essential:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-cookie-settings {
    background: transparent;
    color: #94a3b8;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px 6px;
    margin-left: auto;
}

.btn-cookie-settings:hover {
    color: #f8fafc;
}

/* Modal Preferences */
.cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 16, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: cookieFadeIn 0.25s ease;
}

@keyframes cookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-card {
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    font-family: var(--font-body, 'Inter', sans-serif);
    color: #f8fafc;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

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

.cookie-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.cookie-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.cookie-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-item-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #f8fafc;
}

.cookie-item-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
}

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

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .25s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #38bdf8;
}

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

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

.cookie-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
