/* ==========================================================================
   Cookie Consent Banner + Preferences Modal + Mobile Scroll Splash
   ========================================================================== */

/* --- Cookie Consent Banner (fixed bottom) --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a1f2e;
    color: #e0e0e0;
    z-index: 1100;
    box-sizing: border-box;
    padding: 18px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    display: none; /* shown by JS */
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 260px;
    font-size: 13px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #7eb8ff;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #fff;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.consent-btn {
    padding: 9px 18px;
    border: 2px solid #7eb8ff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.consent-btn-accept {
    background: #7eb8ff;
    color: #1a1f2e;
}

.consent-btn-accept:hover {
    background: #5a9bef;
    border-color: #5a9bef;
}

.consent-btn-reject {
    background: transparent;
    color: #7eb8ff;
}

.consent-btn-reject:hover {
    background: rgba(126, 184, 255, 0.1);
}

.consent-btn-manage {
    background: transparent;
    color: #7eb8ff;
}

.consent-btn-manage:hover {
    background: rgba(126, 184, 255, 0.1);
}

@media (max-width: 480px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .consent-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Cookie Preferences Modal --- */
.cookie-prefs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1300;
    display: none; /* shown by JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.cookie-prefs-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-prefs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.cookie-prefs-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.cookie-prefs-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cookie-prefs-close:hover {
    color: #e74c3c;
}

.cookie-prefs-body {
    padding: 20px 24px;
}

.cookie-prefs-intro {
    font-size: 13px;
    color: #555;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Category rows */
.cookie-category {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.cookie-category-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.cookie-category-badge {
    font-size: 11px;
    font-weight: 600;
    color: #27ae60;
    background: #e8f8ef;
    padding: 2px 8px;
    border-radius: 4px;
}

.cookie-category-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
    margin: 0;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.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: #ccc;
    border-radius: 24px;
    transition: background 0.3s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #7eb8ff;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #27ae60;
    cursor: default;
}

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

/* Save button */
.cookie-prefs-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
}

.cookie-prefs-save {
    width: 100%;
    padding: 12px;
    background: #1a1f2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.cookie-prefs-save:hover {
    background: #2c3448;
}

/* --- Mobile Scroll Splash --- */
.scroll-splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1200;
    display: none; /* shown by JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.scroll-splash-card {
    background: #fff;
    border-radius: 16px;
    max-width: 340px;
    width: 100%;
    padding: 32px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.scroll-splash-icon {
    margin-bottom: 16px;
}

.scroll-splash-icon svg {
    width: 80px;
    height: 80px;
}

/* Swipe animation on the hand/arrows */
.swipe-hand {
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(-8px); opacity: 0.7; }
    50% { transform: translateX(8px); opacity: 1; }
}

.scroll-splash-card h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.scroll-splash-card p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.scroll-splash-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
}

.scroll-splash-tag {
    background: #f0f4ff;
    color: #4a6fa5;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
}

.scroll-splash-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
}

.scroll-splash-checkbox input {
    accent-color: #7eb8ff;
    width: 16px;
    height: 16px;
}

.scroll-splash-dismiss {
    width: 100%;
    padding: 12px;
    background: #1a1f2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.scroll-splash-dismiss:hover {
    background: #2c3448;
}

/* Hide splash on desktop as safety net */
@media (min-width: 769px) {
    .scroll-splash-overlay {
        display: none !important;
    }
}
