/* Cookie Consent Banner Styling */
/* Styles for Quarto-generated cookie consent banner */

/* Define shared style variables for the footer */
footer.footer {
    --cookie-footer-position: fixed;
    --cookie-footer-bottom: 0;
    --cookie-footer-left: 0;
    --cookie-footer-right: 0;
    --cookie-footer-background: linear-gradient(135deg, #242424, #1c1c1c);
    --cookie-footer-border-top: 2px solid #a687dc;
    --cookie-footer-box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    --cookie-footer-z-index: 1001;
    --cookie-footer-padding: 0;
    --cookie-footer-margin: 0;
}

/* Style the parent footer when it contains cookie consent */
footer.footer:has(.cookie-consent-footer) {
    position: var(--cookie-footer-position);
    bottom: var(--cookie-footer-bottom);
    left: var(--cookie-footer-left);
    right: var(--cookie-footer-right);
    background: var(--cookie-footer-background);
    border-top: var(--cookie-footer-border-top);
    box-shadow: var(--cookie-footer-box-shadow);
    z-index: var(--cookie-footer-z-index);
    padding: var(--cookie-footer-padding);
    margin: var(--cookie-footer-margin);
}

/* Style the nav-footer container */
footer.footer .nav-footer {
    padding: 1rem;
    margin: 0;
}

/* Style the cookie consent content */
.cookie-consent-footer {
    color: #b4a3e8;
    font-size: 0.9rem;
    text-align: center;
}

    text-decoration: none;
    padding: 8px 16px;
    background: linear-gradient(to right, #6c74ed, #9575cd);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.cookie-consent-footer a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 116, 237, 0.4);
    color: white;
    text-decoration: none;
}

/* Hide other fixed bottom elements when cookie consent is shown */
body:has(footer.footer .cookie-consent-footer) .cta-bar {
    display: none !important;
}

/* Fallback for browsers that don't support :has() - lower z-index for other elements */
.cta-bar {
    z-index: 999; /* Lower than cookie consent */
}

/* Ensure body has bottom padding when footer is fixed */
body:has(footer.footer .cookie-consent-footer) {
    padding-bottom: 80px;
}

/* Fallback padding for browsers without :has() - applied via JS */
body.cookie-consent-active {
    padding-bottom: 80px;
}
