/* ==========================================================================
   TagShuttle — DSGVO Consent Banner Styling
   ========================================================================== */

html.has-consent-banner {
    scroll-padding-bottom: 14rem;
}

#consent-banner {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    inset-block-start: auto;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: transparent;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#consent-banner.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.consent-card {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 48rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(20, 20, 24, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.25rem;
    padding: clamp(1.125rem, 3vw, 1.5rem);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: consentCardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.consent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.consent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(20, 115, 230, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.consent-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.consent-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0 0 1.5rem 0;
}

.consent-description a {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.consent-description a:hover {
    color: #7dd3fc;
}

.consent-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.625rem;
}

@media (min-width: 480px) {
    .consent-actions {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
    }
}

.consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    text-decoration: none;
    line-height: 1.2;
    min-block-size: 2.75rem;
    min-height: 2.75rem;
}

.consent-btn-essential {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

.consent-btn-essential:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.consent-btn-essential:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.consent-btn-all {
    background: linear-gradient(135deg, #1473e6, #0284c7);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(20, 115, 230, 0.35);
}

.consent-btn-all:hover {
    background: linear-gradient(135deg, #0d66d0, #0369a1);
    box-shadow: 0 6px 18px rgba(20, 115, 230, 0.45);
    transform: translateY(-1px);
}

.consent-btn-all:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* Footer Cookie Settings Button */
button#open-consent-settings,
.cookie-settings-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
    display: inline-block;
    vertical-align: baseline;
}

button#open-consent-settings:hover,
.cookie-settings-btn:hover {
    color: #38bdf8;
}
