/*
 * Privacy preferences bar (CCPA cookie consent).
 *
 * NOTE: filename and CSS class/id names deliberately avoid the tokens
 * "cookie"/"consent"/"banner" — ad/privacy blocker extensions (EasyList Cookie,
 * uBlock, etc.) block resources and hide elements whose URL or id/class contains
 * those words, which silently broke this bar. Keep names neutral.
 */
.ps-prefs-bar {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(160%);
    width: calc(100% - 2.5rem);
    max-width: 960px;
    background-color: #ffffff;
    color: #2c3e50;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(44, 62, 80, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.18);
    z-index: 10000;
    /* Hidden by default; revealed only when JS adds .show. Using
       visibility/opacity (not display) keeps the slide-up animation. */
    opacity: 0;
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease,
                visibility 0.35s;
}

.ps-prefs-bar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.ps-prefs-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ps-prefs-text {
    flex: 1 1 320px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #4a5568;
}

.ps-prefs-text strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: #2c3e50;
}

.ps-prefs-text a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.ps-prefs-text a:hover {
    text-decoration: underline;
}

.ps-prefs-buttons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.ps-prefs-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.2s ease,
                background-color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.ps-prefs-accept {
    background-image: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.ps-prefs-accept:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.ps-prefs-decline {
    background-color: #ffffff;
    color: #4a5568;
    border-color: #d1d5db;
}

.ps-prefs-decline:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* Mobile: dock to the bottom edge as a full-width sheet */
@media (max-width: 640px) {
    .ps-prefs-bar {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        border-radius: 14px 14px 0 0;
        transform: translateY(120%);
    }

    .ps-prefs-bar.show {
        transform: translateY(0);
    }

    .ps-prefs-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .ps-prefs-buttons {
        width: 100%;
    }

    .ps-prefs-btn {
        flex: 1;
        padding: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ps-prefs-bar {
        transition: opacity 0.2s ease, visibility 0.2s;
    }
}
