/* ==========================================================================
   TriAngelsV2 chrome
   The template's own surfaces (language switcher, admin links, cookie consent,
   inline edit badges, newsletter form) painted in the Premiere palette. Loaded
   after the design sheets on public pages and after site.css on admin pages,
   so it never depends on which design is active.
   ========================================================================== */

:root {
    --v2-night: #160B10;
    --v2-night-2: #12080C;
    --v2-paper: #F4EDDF;
    --v2-muted: #B7A399;
    --v2-gold: #D8B778;
    --v2-gold-light: #F0D6A4;
    --v2-wine: #75172E;
    --v2-line: rgba(216, 183, 120, .22);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Language switcher ------------------------------------------------------- */

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    border: 1px solid var(--v2-line);
    border-radius: 0;
    padding: .2rem .3rem;
    flex-shrink: 0;
}
.lang-switch .lang-item {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    line-height: 1;
    padding: .3rem .5rem;
    color: var(--v2-muted);
    text-decoration: none;
    transition: color .2s, background .2s;
}
.lang-switch .lang-item.is-current {
    color: var(--v2-gold-light);
    background: rgba(216, 183, 120, .14);
}
.lang-switch .lang-other:hover {
    color: var(--v2-paper);
    background: rgba(216, 183, 120, .1);
}
.lang-switch .lang-sep { width: 1px; height: 12px; background: var(--v2-line); }

.nav-tools { display: flex; align-items: center; margin-left: .4rem; }

/* Footer newsletter / admin ---------------------------------------------- */

.footer__newsletter { margin-top: 1.6rem; }
.footer__newsletter form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; }
.footer__newsletter input[type="email"] {
    flex: 1 1 190px;
    min-width: 0;
    background: transparent;
    border: 1px solid var(--v2-line);
    border-radius: 0;
    color: var(--v2-paper);
    padding: .7rem .85rem;
    font-size: .82rem;
}
.footer__newsletter input[type="email"]::placeholder { color: var(--v2-muted); }
.footer__newsletter input[type="email"]:focus { outline: 1px solid var(--v2-gold); outline-offset: 1px; }
/* Newsletter submit must read as a button on the near-black footer — bare .btn is ink-on-ink.
   The checkbox widget stays scaled down for the narrow column (left-aligned with the email
   input above it, top origin so the row before ABONNIEREN doesn't shift while api.js loads). */
.footer__newsletter .g-recaptcha { transform: scale(.88); transform-origin: left top; }
.footer__newsletter .btn {
    flex: 0 0 auto;
    background: var(--v2-gold);
    border-color: var(--v2-gold);
    color: var(--v2-night-2);
}
.footer__newsletter .btn:hover,
.footer__newsletter .btn:focus-visible { background: var(--v2-gold-light); border-color: var(--v2-gold-light); color: var(--v2-night-2); }
.footer__newsletter .btn.btn--sm { padding: .62rem 1rem; font-size: .68rem; }

/* Google reCAPTCHA v2 ships only a light widget, and that is exactly right on every LIGHT
   surface (Kontakt form etc.): unfiltered it matches the paper background with its native
   border/radius — no filter at all keeps label, tick and logo hues untouched.
   Dark surfaces invert it instead. hue-rotate(180deg) after invert() restores the original
   hues, so the blue checkbox/logo stays blue; the earlier sepia/saturate mix shifted the
   whole card (worst of all the logo) toward magenta on both light and dark pages. */
.site-footer .g-recaptcha { filter: invert(.92) hue-rotate(180deg); }

.footer__admin { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.footer__admin a { color: var(--v2-muted); }
.footer__admin a:hover { color: var(--v2-gold-light); }
.footer__logout { display: inline; margin: 0; }
.footer__link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--v2-muted);
    font: inherit;
    cursor: pointer;
}
.footer__link-button:hover { color: var(--v2-gold-light); }

/* Shared admin menu (_Header + _Nav) ------------------------------------- */

.admin-menu { position: relative; }

.admin-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem 0;
    list-style: none;
    cursor: pointer;
    font-family: var(--font-sans, "Inter", system-ui, sans-serif);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--v2-gold-light);
}
.admin-menu__toggle::-webkit-details-marker { display: none; }
.admin-menu__toggle::after {
    content: "";
    width: .42rem;
    height: .42rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.admin-menu[open] > .admin-menu__toggle::after { transform: translateY(0) rotate(225deg); }

.admin-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + .55rem);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    min-width: 14rem;
    padding: .35rem;
    background: #160B10;
    border: 1px solid var(--v2-line);
    box-shadow: 0 18px 40px rgba(12, 4, 8, .45);
}

/* The public nav's link typography (uppercase display face) must not leak into
   the panel; both contexts get this one explicit item style. */
.admin-links .admin-menu__item,
.nav-menu .admin-menu__item {
    display: block;
    width: 100%;
    padding: .6rem .75rem;
    border: 0;
    background: none;
    text-align: left;
    font-family: var(--font-sans, "Inter", system-ui, sans-serif);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.35;
    text-transform: none;
    color: var(--v2-muted);
    cursor: pointer;
}
.admin-links .admin-menu__item:hover,
.nav-menu .admin-menu__item:hover { color: var(--v2-gold-light); background: rgba(216, 183, 120, .1); }
.admin-links .admin-menu__item.is-current,
.nav-menu .admin-menu__item.is-current { color: var(--v2-gold-light); background: rgba(216, 183, 120, .14); }

/* Kill the public nav's animated underline on panel links. */
.nav-menu .admin-menu__item::after { display: none; }
.admin-menu__divider { margin: .3rem 0; border: 0; border-top: 1px solid var(--v2-line); }
.admin-menu__form { margin: 0; }

@media (max-width: 900px) {
    /* Inside the public full-screen menu the panel flows with the list instead of
       floating over it. */
    .nav-admin { width: 100%; }
    .nav-menu .admin-menu,
    .nav-menu .admin-menu__panel { position: static; min-width: 0; box-shadow: none; }
    .nav-menu .admin-menu__panel {
        margin-top: .6rem;
        background: rgba(216, 183, 120, .06);
    }
}

/* Inline admin edit affordances ------------------------------------------ */

.content-edit,
.media-edit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;              /* one size in every context */
    aspect-ratio: 1 / 1;        /* square chip, no reliance on an HTML height attribute */
    background: rgba(18, 8, 12, .88);
    border: 1px solid var(--v2-gold);
    color: var(--v2-gold-light);
    font-size: .95rem;
    line-height: 1;
    text-decoration: none;
}

.content-edit {
    margin-left: .35em;
    vertical-align: middle;
}

.content-edit:hover,
.media-edit-badge:hover {
    background: var(--v2-wine);
    border-color: var(--v2-gold-light);
    color: #FFF8EC;
}

/* Image overlays keep their corner placement; only the look is shared above. */
.media-edit-badge {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 30;
}

/* Cookie consent ---------------------------------------------------------- */

.cookie-consent {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2000;
    padding: 0 1.25rem 1.25rem;
    /* Fade instead of slide: a bottom-anchored element moving into place is counted
       as layout shift (Termine mobile CLS was 0.20 from this banner alone). */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .4s;
}
.cookie-consent.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .25s cubic-bezier(.2, .8, .2, 1);
}
.cookie-banner {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    background: var(--v2-night);
    border: 1px solid var(--v2-line);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .45);
    border-radius: 0;
    padding: 1.6rem 2.2rem 1.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem 2rem;
    color: var(--v2-paper);
}
.cookie-close {
    position: absolute; top: .7rem; right: .9rem;
    background: none; border: 0; color: var(--v2-muted);
    font-size: 1.05rem; padding: .35rem; transition: color .2s;
}
.cookie-close:hover { color: var(--v2-paper); }
.cookie-main { display: flex; align-items: flex-start; gap: 1rem; flex: 1 1 380px; min-width: 0; }
.cookie-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(216, 183, 120, .12);
    color: var(--v2-gold);
    font-size: 1.4rem;
    border-radius: 50%;
}
.cookie-copy { min-width: 0; }
.cookie-eyebrow {
    font-size: .64rem; letter-spacing: .3em; text-transform: uppercase;
    color: var(--v2-gold); margin-bottom: .5rem;
}
.cookie-title {
    /* System stack: the display face is not preloaded, and its late swap changed this
       bottom-anchored banner's height (CLS attributed to #cookie-consent). */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    line-height: 33px; margin-bottom: .5rem; color: var(--v2-paper); min-height: 36px;
}
.cookie-body { color: var(--v2-muted); font-size: .9rem; line-height: 1.6; margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; justify-content: flex-end; flex: 0 1 auto; }
.cookie-btn { min-width: 140px; }
.cookie-banner .btn-accent,
.cookie-banner .btn-ghost {
    border-radius: 0;
    padding: .8rem 1.4rem;
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid var(--v2-gold);
    background: var(--v2-gold);
    color: var(--v2-night);
    transition: background .2s, color .2s;
}
.cookie-banner .btn-ghost { background: transparent; color: var(--v2-gold-light); }
.cookie-banner .btn-accent:hover { background: var(--v2-gold-light); border-color: var(--v2-gold-light); }
.cookie-banner .btn-ghost:hover { background: rgba(216, 183, 120, .12); }
.cookie-details-toggle {
    background: none; border: 0; color: var(--v2-muted);
    font-size: .76rem; letter-spacing: .06em;
    display: inline-flex; align-items: center; gap: .4rem;
    transition: color .2s;
}
.cookie-details-toggle:hover { color: var(--v2-paper); }
.cookie-details-toggle i { transition: transform .25s; }
.cookie-details-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.cookie-details {
    flex-basis: 100%; text-align: left;
    border-top: 1px solid var(--v2-line);
    padding-top: 1.1rem; margin-top: .2rem;
}
.cookie-cat + .cookie-cat { margin-top: 1.1rem; }
.cookie-cat-title { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--v2-paper); font-size: .9rem; margin-bottom: .4rem; }
.cookie-cat-title i { color: var(--v2-gold); }
.cookie-always {
    margin-left: auto; font-size: .62rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: #9DBE97;
    border: 1px solid rgba(157, 190, 151, .35);
    padding: .12rem .45rem; border-radius: 999px;
}
.cookie-cat-text { color: var(--v2-muted); font-size: .82rem; line-height: 1.6; margin-bottom: .6rem; }
.cookie-note { flex-basis: 100%; margin: 0; color: var(--v2-muted); font-size: .74rem; }

.cookie-reopen {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1500;
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--v2-night); color: var(--v2-muted);
    border: 1px solid var(--v2-line);
    padding: .45rem .8rem; font-size: .68rem; letter-spacing: .04em;
    cursor: pointer; opacity: .85; transition: border-color .2s, transform .2s, opacity .2s;
}
.cookie-reopen:hover { border-color: var(--v2-gold); transform: translateY(-2px); }
.cookie-reopen i { color: var(--v2-gold); }
.cookie-reopen.is-hidden { display: none; }

@media (max-width: 720px) {
    .cookie-consent { padding: 0 .75rem .75rem; }
    .cookie-banner { padding: 1.4rem 1.3rem 1.2rem; }
    .cookie-actions { justify-content: flex-start; }
}

/* Breadcrumbs ---------------------------------------------------------------
   Slim trail at the top of <main> on public section pages only (see
   _Breadcrumbs.cshtml: Home and all internal/admin pages emit JSON-LD or nothing,
   never a bar). Both navs are position:fixed overlays, so this bar clears them
   first; .page-head trims its own clearance while a trail is in the DOM.
   -------------------------------------------------------------------------- */

.breadcrumbs { padding-top: var(--nav-h, 92px); }

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .6rem;
    margin: 0 auto;
    list-style: none;
}
.breadcrumbs a,
.breadcrumbs li[aria-current] {
    font-size: .7rem;
    letter-spacing: .16em;
    line-height: 1.2;
}
.breadcrumbs a { color: var(--ink-soft, #555); transition: color .2s; }
.breadcrumbs a:hover,
.breadcrumbs a:focus-visible { color: var(--accent, #111); text-decoration: none; }
.breadcrumbs li[aria-current] { color: var(--ink, #111); }
.breadcrumbs ol > li + li::before {
    content: "\203A"; /* › */
    margin-right: .6rem;
    color: var(--v2-gold);
}

@supports selector(:has(*)) {
    body:not(.admin-page):has(> main > .breadcrumbs) .page-head { padding-block-start: clamp(40px, 7vw, 96px); }
}

/* Admin pages ------------------------------------------------------------- */

.admin-main { padding-top: 0; }
.admin-page .section { padding-top: 7.5rem; }
.admin-page .media-edit-badge { position: static; }
