/*
 * Obere Leiste im Admin: Umschalter der Bereiche und Menü. Sie steht auf jeder Admin-Seite oben und bleibt beim Scrollen stehen
 * (Vorgabe 02.12.2026). Beide Grundgerüste laden diese Datei zuletzt. Farben und Schrift stehen hier selbst, weil
 * Projektseiten die der Business-Marke haben. So sieht die Leiste überall gleich aus.
 */
:root { --topbar: 60px; }
/* Sprungziele und per Tastatur gewählte Elemente bleiben unter der Leiste sichtbar */
html:has(> body .topbar) { scroll-padding-top: calc(var(--topbar) + 1rem); }

/* Über dem Auswahlrahmen (50), unter Auswahlleiste (60), Hochladen (70) und Großansicht (100) */
.topbar {
    --fg: #1c1c1e; --muted: #6b6b70; --card: #fff; --line: #e3e1dd; --line-strong: #cfccc6; --soft: #efedea; --focus: #2c5fd6;
    position: sticky; top: 0; z-index: 55; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    min-height: var(--topbar); padding: .5rem max(1rem, env(safe-area-inset-right)) .5rem max(1rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line); background: var(--card); color: var(--fg);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
.topbar :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Umschalter der Bereiche wie in Bildwerk: graue Leiste, weißes Feld, Strich in der Farbe der Marke */
.area-switch { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #e8e7ec; }
.area-switch a { display: flex; align-items: center; min-height: 36px; padding: 0 .95rem; border-radius: 8px; color: #5c5b63; font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.area-switch a:hover { color: var(--fg); }
.area-switch a span { padding: .2rem 0 .15rem; border-bottom: 3px solid transparent; }
.area-switch a[aria-current] { background: #fff; color: #14303f; box-shadow: 0 1px 3px rgba(0, 0, 0, .16); }
.area-switch a[aria-current] span { border-bottom-color: var(--area); }
.area-switch [data-area="privat"] { --area: #e9638c; }
.area-switch [data-area="business"] { --area: #fff023; }
.area-switch [data-area="fotobox"] { --area: #5aa5cb; }

.topbar .menu { position: relative; }
.topbar .menu > summary { display: flex; align-items: center; min-height: 40px; list-style: none; cursor: pointer; padding: .35rem .8rem; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 500; }
.topbar .menu > summary::-webkit-details-marker { display: none; }
.topbar .menu[open] > summary { background: var(--soft); }
.topbar .nav { position: absolute; right: 0; top: calc(100% + .4rem); box-sizing: border-box; width: 220px; max-height: calc(100vh - var(--topbar) - 1rem); padding: .4rem; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.topbar .menu-user { margin: 0; padding: .4rem .75rem .5rem; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.topbar .nav form { margin: 0; }
.topbar .nav a, .topbar .nav button { display: block; box-sizing: border-box; width: 100%; min-height: 0; margin: 0; text-align: left; padding: .6rem .75rem; border-radius: 8px; text-decoration: none; color: var(--fg); background: none; border: 0; font: inherit; cursor: pointer; }
.topbar .nav a:hover, .topbar .nav button:hover { background: var(--soft); }
.topbar .nav a[aria-current="page"] { background: var(--soft); font-weight: 600; }

@media (min-width: 900px) { .topbar { padding-left: max(2.25rem, env(safe-area-inset-left)); padding-right: max(2.25rem, env(safe-area-inset-right)); } }
@media (max-width: 420px) { .area-switch a { padding: 0 .7rem; } }
