/**
 * T26 Toolbar - WBCE CMS
 * @author      Thodde26 (Thorsten)
 * @Version     1.0.0
 * @file        frontend.css
 * @license     http://www.gnu.org/licenses/gpl.html GNU General Public License v3.0
 */
/* ==========================================================================
   0. BODY-FIX (Verhindert das Verdecken des Theme-Headers)
   ========================================================================== */
body {
    padding-top: 46px !important;
}
/* ==========================================================================
   1. TOOLBAR WRAPPER (Fest fixiert am oberen Rand)
   ========================================================================== */
.t26-toolbar-wrapper {
    position: fixed; /* Klebt immer oben am Viewport */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999; /* Verhindert Überlappungen mit dem Theme-Header */
    background-color: var(--t26-bg-surface, #ffffff);
    border-bottom: 1px solid var(--t26-border-color, #cbd5e1);
    box-shadow: 0 2px 10px var(--t26-shadow-color, rgba(0, 0, 0, 0.05));
    font-family: var(--t26-font-family, 'Inter', system-ui, sans-serif);
    font-size: 0.85rem;
    color: var(--t26-text-main, #0f172a);
    height: 46px; /* Feste Höhe für einheitliches Layout */
}

/* Flexbox Layout für Links, Mitte, Rechts */
.t26-toolbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   2. LINKER BEREICH (Logo & Multisite)
   ========================================================================== */
.t26-toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1; /* NEU: Nimmt exakt 1 Drittel des Platzes ein */
}

.t26-toolbar-logo a {
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--t26-primary-base, #0f2a4a);
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.t26-toolbar-logo a:hover {
    opacity: 0.7;
}

/* Multisite Dropdown Styling */
.t26-toolbar-select {
    background-color: transparent;
    color: var(--t26-text-main, #0f172a);
    border: 1px solid var(--t26-border-color, #cbd5e1);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.t26-toolbar-select:focus {
    border-color: var(--t26-accent-color, #378add);
    box-shadow: 0 0 0 2px rgba(55, 138, 221, 0.1);
}

/* Anpassung, wenn die Leiste im Darkmode geladen wird */
[data-t26-theme$="dark"] .t26-toolbar-select {
    background-color: var(--t26-input-bg, #020617);
    color: var(--t26-input-color, #f8fafc);
    border-color: var(--t26-border-color, #334155);
}

/* ==========================================================================
   3. MITTLERER BEREICH (Ticker / Laufschrift)
   ========================================================================== */
.t26-toolbar-ticker {
    flex: 1;
    position: relative;
    overflow: hidden;
    white-space: nowrap;

    /* Die Vertiefung (Inset) generieren */
    margin: 7px 30px; /* 7px Abstand oben/unten, damit es nicht bis zum Rand geht */
    height: 32px;     /* Feste Höhe für die Pille */
    background-color: var(--t26-bg-body, #f4f7f9); /* Abdunkelung (passt sich an den Modus an) */
    border-radius: 16px; /* Pillen-Rundung */
    box-shadow: inset 0 2px 5px var(--t26-shadow-color, rgba(0, 0, 0, 0.08)); /* 3D-Tiefeneffekt */

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Leerer Container schrumpft, um Platz zu sparen */
.t26-toolbar-ticker--empty {
    margin: 0;
    flex: 1;
    background: transparent;
    box-shadow: none;
}

/* NEU: Weiche Ränder (Fade-Out), damit der Text nicht hart an der Rundung abschneidet */
.t26-toolbar-ticker::before,
.t26-toolbar-ticker::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 2;
    pointer-events: none;
}
.t26-toolbar-ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--t26-bg-body, #f4f7f9) 10%, transparent);
}
.t26-toolbar-ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--t26-bg-body, #f4f7f9) 10%, transparent);
}

/* Die Animations-Spur */
.t26-ticker-track {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* Startet genau am rechten Rand des Containers */
    animation-name: t26-ticker-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform; /* Hardware-Beschleunigung für flüssiges Laufen */
}

/* WCAG 2.1 AA konform: Stoppen bei Hover oder Tastatur-Fokus */
.t26-toolbar-ticker:hover .t26-ticker-track,
.t26-toolbar-ticker:focus-within .t26-ticker-track {
    animation-play-state: paused;
}

/* CKEditor Fixes: Erzwingt, dass P-Tags und DIVs in einer Zeile bleiben */
.t26-ticker-content {
    display: inline-block;
    padding-right: 50px; /* Abstand, bevor der Loop optisch von vorne beginnt */
}

.t26-ticker-content p,
.t26-ticker-content div,
.t26-ticker-content ul,
.t26-ticker-content li {
    display: inline;
    margin: 0;
    padding: 0;
}

.t26-ticker-content a {
    color: var(--t26-accent-color, #378add);
    text-decoration: underline;
}
/* ==========================================================================
   4. RECHTER BEREICH (Hooks) - TEMPORÄR SICHTBAR GEMACHT
   ========================================================================== */
.t26-toolbar-hooks {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Drückt die Boxen schön nach rechts */
    gap: 15px;
    flex: 1;
}

.t26-hook-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px; /* Etwas breiter, damit der Text reinpasst */
    min-height: 28px;

    /* Sichtbarer Platzhalter-Style */
    border: 2px dashed var(--t26-accent-color, #378add);
    background-color: var(--t26-bg-surface, #ffffff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--t26-primary-base, #0f2a4a);
    cursor: help;
}

/* Dummy-Text per CSS einfügen */
#t26-hook-theme::after {
    content: "Theme";
}

#t26-hook-a11y::after {
    content: "A11y";
}
/* ==========================================================================
   5. KEYFRAMES & ANIMATION
   ========================================================================== */
@keyframes t26-ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ==========================================================================
   6. RESPONSIVE FALLBACKS
   ========================================================================== */
@media (max-width: 768px) {
    .t26-toolbar-inner {
        padding: 0 10px;
    }
    .t26-toolbar-ticker {
        margin: 0 15px;
    }
    .t26-toolbar-select {
        max-width: 120px; /* Auf Smartphones das Dropdown etwas kürzen */
        text-overflow: ellipsis;
    }
}
