/* DMU Status — cookie consent banner.
 *
 * Bottom-left corner card. Amber Accept button to match the site's
 * --accent token (#f59e0b); neutral outlined Reject so the two
 * buttons read as equal-weight per ePrivacy.
 *
 * Dark mode is the site's default; light mode reads `--bg` from
 * the root data-theme attribute, so card colours fall through.
 */

.dmu-consent-banner {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    width: min(360px, calc(100vw - 2.5rem));
    padding: 1.1rem 1.15rem;
    background: var(--card, #141414);
    color: var(--text, #f5f5f5);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 1rem;
    box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.65);
    font-family: 'Onest', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(8px);
    animation: dmu-consent-in 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dmu-consent-banner--leaving {
    animation: dmu-consent-out 220ms ease-in forwards;
}

@keyframes dmu-consent-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dmu-consent-out {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

.dmu-consent-banner-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text, #f5f5f5);
}

.dmu-consent-banner-text {
    margin: 0 0 0.9rem;
    color: var(--muted, rgba(245, 245, 245, 0.78));
}

.dmu-consent-banner-buttons {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.dmu-consent-banner-button {
    flex: 1 1 0;
    padding: 0.5rem 0.95rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

/* Dark mode defaults. Reject is an outlined ghost button; Accept is
   a high-contrast neutral. Both invert per-theme in the light-mode
   overrides below so the primary action always reads as the strongest
   visual element without nudging the visitor toward it. */
.dmu-consent-banner-button--decline {
    background: transparent;
    /* The original rgba(255,255,255,0.18) was almost invisible against
       the dark card; bump to 0.35 so the outline reads as a real
       button rather than floating text. */
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--text, #f5f5f5);
}

.dmu-consent-banner-button--decline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Dark-mode Accept: white button with black text. Solid black blends
   into the dark card; flipping to white gives the primary action the
   contrast it needs. Light mode flips back to black-on-white below. */
.dmu-consent-banner-button--accept {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.dmu-consent-banner-button--accept:hover {
    background: #e8e8e8;
    border-color: #e8e8e8;
}

/* Light theme — reads the same theme switch the rest of the site uses. */
:root[data-theme='light'] .dmu-consent-banner {
    background: #ffffff;
    color: #111111;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.32);
}

:root[data-theme='light'] .dmu-consent-banner-title {
    color: #111111;
}

:root[data-theme='light'] .dmu-consent-banner-text {
    color: rgba(0, 0, 0, 0.7);
}

:root[data-theme='light'] .dmu-consent-banner-button--decline {
    border-color: rgba(0, 0, 0, 0.12);
    color: #111111;
}

:root[data-theme='light'] .dmu-consent-banner-button--decline:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Light-mode Accept: black button with white text. Inverts the
   dark-mode default of white-on-dark so the primary action keeps
   maximum contrast against whichever card background is showing. */
:root[data-theme='light'] .dmu-consent-banner-button--accept {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

:root[data-theme='light'] .dmu-consent-banner-button--accept:hover {
    background: #1f1f1f;
    border-color: #1f1f1f;
}
