:root {
    --shadow: #00000030 0px 0px 10px 0px;
    --transition: 0.3s ease-in-out;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: var(--transition);
    height: 100%;
    margin: 0;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.hover-expand {
    transition: transform 0.3s ease-in-out;
}
.hover-expand:hover{
    scale: 1.02;
    box-shadow: var(--shadow);
}

.shrink {
    padding: min(5em, 8%);
    width: 350px;
}

.info-box {
    border: 0.3rem solid var(--mud-palette-primary);
    color: var(--mud-palette-primary);
    border-radius: 3rem;
}

.selected-full {
    border: var(--mud-palette-primary) 2px solid;
    color: var(--mud-palette-primary);
    background-color: rgba(var(--mud-palette-primary-rgb), 0.1);
}

.selected-right {
    border-inline-end-style: solid;
    border-inline-end-width: 2px;
    color: var(--mud-palette-primary);
    background-color: rgba(var(--mud-palette-primary-rgb), 0.1);
}

.main-content-container {
    height: 100vh;
    height: 100dvh; /* dynamic vh so mobile browser toolbars don't clip/scroll the content */
    overflow: auto;
}

.mud-expand-panel-header {
    border-width: var(--mud-default-borderradius);
    border-radius: var(--mud-default-borderwidth);
    border-color: var(--mud-palette-background-gray);
}

.full-screen-appbar {
    height: calc(70vh - (var(--mud-appbar-height) - var(--mud-appbar-height) / 8));
}

.mud-main-content{
    height: 100vh;
    height: 100dvh;
}

.mud-container{
    height: 100%;
}

.radio-viewport-wrapper {
    display: flex;
    justify-content: center;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Gesamtbreite Radio + Mikrofon ≈ 914px */
@media screen and (max-width: 960px) {
    .radio-viewport-wrapper { zoom: 0.90; }
}
@media screen and (max-width: 850px) {
    .radio-viewport-wrapper { zoom: 0.80; }
}
@media screen and (max-width: 750px) {
    .radio-viewport-wrapper { zoom: 0.70; }
}
@media screen and (max-width: 650px) {
    .radio-viewport-wrapper { zoom: 0.60; }
}
@media screen and (max-width: 560px) {
    .radio-viewport-wrapper { zoom: 0.55; }
}
@media screen and (max-width: 510px) {
    .radio-viewport-wrapper { zoom: 0.50; }
}
@media screen and (max-width: 460px) {
    .radio-viewport-wrapper { zoom: 0.45; }
}
@media screen and (max-width: 415px) {
    .radio-viewport-wrapper { zoom: 0.42; }
}
/* Schmale Handys (Portrait): weiter herunterskalieren, sonst läuft das ~914px-Gerät horizontal über den Viewport. */
@media screen and (max-width: 400px) {
    .radio-viewport-wrapper { zoom: 0.40; }
}
@media screen and (max-width: 380px) {
    .radio-viewport-wrapper { zoom: 0.38; }
}
@media screen and (max-width: 360px) {
    .radio-viewport-wrapper { zoom: 0.36; }
}

/* ── Safe-Area (Notch/Home-Indicator) ──────────────────────────────────────
   Wirkt nur auf Geräten mit Aussparungen (env(...) = 0 sonst), v. a. im Querformat. */
@supports (padding: max(0px)) {
    .main-content-container,
    .mud-main-content {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ── Mobil: Overlays im Viewport halten ───────────────────────────────────── */
@media (max-width: 600px) {
    /* Kein Dialog breiter als der Viewport; überbreiter Inhalt scrollt im Dialog statt die Seite zu schieben. */
    .mud-dialog { max-width: 96vw !important; }
    .mud-dialog-content { overflow-x: auto; }
}

/* ── Media Platform ──────────────────────────────────────────────────────── */

.media-scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.25rem 0 0.75rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(128,128,128,0.3) transparent;
}
.media-scroll-row::-webkit-scrollbar { height: 6px; }
.media-scroll-row::-webkit-scrollbar-track { background: transparent; }
.media-scroll-row::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 3px; }
.media-scroll-row::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.5); }

.media-scroll-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
@media (max-width: 600px) {
    .media-scroll-item { flex: 0 0 240px; }
}

.media-scroll-container { position: relative; }
.media-scroll-container::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 80px;
    pointer-events: none;
    background: linear-gradient(to left, var(--mud-palette-background), transparent);
    z-index: 1;
}

.media-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.5rem;
}
.media-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mud-palette-lines-default, rgba(0,0,0,0.12));
}

.media-progress-track {
    height: 4px;
    background: rgba(0,0,0,0.15);
    overflow: hidden;
}
.media-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}
.media-progress-fill--active { background: #e53935; }
.media-progress-fill--complete { background: #4caf50; }

.media-duration-badge {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.4;
    backdrop-filter: blur(4px);
}
.media-duration-badge--watched { color: #4caf50; }

.playlist-card {
    position: relative;
    overflow: hidden;
}
.playlist-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary, #e67f3e));
}

@keyframes pulse-send {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Scenario per-task result dialog: colored status banner on top, table in the middle,
   full-width dark-blue OK button at the bottom. See ScenarioResultDialog.razor. */
.scenario-result-dialog {
    overflow: hidden;
    border-radius: 12px;
}
.scenario-result-dialog .mud-dialog-title { display: none; }
.scenario-result-dialog .mud-dialog-content { padding: 0; }
.scenario-result-dialog__banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
}
.scenario-result-dialog__banner--neutral {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
}
.scenario-result-dialog__body {
    padding: 1rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.scenario-result-dialog .mud-dialog-actions {
    padding: 1rem 1.25rem 1.25rem;
}
.scenario-result-dialog__actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ---------- Barrierefreiheit (BFSG) ---------- */

/* Skip-Link: unsichtbar, bis er per Tastatur fokussiert wird. */
.yse-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.6rem 1rem;
    background: var(--mud-palette-primary, #0a3d62);
    color: #fff;
    border-radius: 0 0 4px 0;
    text-decoration: none;
    font-weight: 600;
}
.yse-skip-link:focus,
.yse-skip-link:focus-visible {
    left: 0;
    outline: 3px solid var(--mud-palette-secondary, #ffb400);
    outline-offset: 2px;
}

/* Der Sprungziel-Container soll beim Fokus keinen störenden Rahmen zeigen. */
#main-content:focus {
    outline: none;
}

/* Sichtbarer Fokus-Indikator für Tastaturnutzer auf interaktiven Elementen. */
a:focus-visible,
button:focus-visible,
.mud-button-root:focus-visible,
.mud-icon-button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--mud-palette-secondary, #ffb400);
    outline-offset: 2px;
}

/* ---------- Fehler-/Reconnect-UI ---------- */

/* Fallback der ErrorBoundary: statt weißem Bildschirm eine freundliche Karte mit Reload. */
.yse-error-card {
    max-width: 40rem;
    margin: 3rem auto;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}
.yse-error-card h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.yse-error-card p { margin: 0 0 1.25rem; opacity: .8; }
.yse-error-reload {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--mud-palette-primary, #0a3d62);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

/* Blazor-Standard-Fehlerleiste (fehlte bislang -> war ungestylt/immer im DOM).
   blazor.web.js blendet sie bei einem unbehandelten Fehler per inline-style ein. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 11000;
    color: #1a1a1a;
}
#blazor-error-ui .reload { color: #0a3d62; }
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ---------- /kurse Filterleiste ---------- */
/* Bleibt beim Scrollen unter der AppBar kleben, damit Suche/Filter immer erreichbar sind. */
.yse-kurse-filterbar {
    position: sticky;
    top: calc(var(--mud-appbar-height, 64px) + 4px);
    z-index: 3;
}


/* ---------- Bildergalerie ---------- */

.yse-galerie-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0,0,0,.06);
}
/* Firmenlogo statt Foto: ganz zeigen, mit Rand, auf dunklem Grund (helle Schrift im Logo). */
.yse-galerie-cover.yse-cover-logo {
    background-size: 82% auto;
    background-repeat: no-repeat;
    background-color: #1d2733;
}

/* Galerie: YouTube-Karte mit demselben Foto wie die YouTube-Kachel (News/Startseite). */
.yse-youtube-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yse-youtube-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
}

.yse-youtube-cover > * {
    position: relative;
}

.yse-youtube-cover .mud-icon-root {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}


.yse-galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
}

.yse-galerie-thumb {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}
.yse-galerie-thumb img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.yse-galerie-thumb:hover img { transform: scale(1.06); }

/* Lightbox */
.yse-lightbox {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.yse-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
}
.yse-lightbox-close,
.yse-lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.6rem;
    line-height: 1;
}
.yse-lightbox-close { top: 1rem; right: 1rem; }
.yse-lightbox-nav.prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.yse-lightbox-nav.next { right: 1rem; top: 50%; transform: translateY(-50%); }
.yse-lightbox-close:hover,
.yse-lightbox-nav:hover { background: rgba(255,255,255,.28); }
.yse-lightbox-info {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    opacity: .8;
    font-size: .9rem;
}

/* ---------- Diashow (Startseite) ---------- */
/* Reine CSS-Überblendung: kein Timer, keine Server-Roundtrips (Blazor Server). */
.yse-diashow {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,.06);
}
.yse-diashow figure {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
.yse-diashow img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yse-diashow figcaption {
    position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px;
    font-size: .72rem; color: #fff; background: rgba(0,0,0,.45);
}
@media (max-width: 600px) { .yse-diashow { height: 220px; } }
@media (prefers-reduced-motion: reduce) {
    .yse-diashow figure { animation: none !important; }
    .yse-diashow figure:first-child { opacity: 1; }
}

/* /kurse: aufklappbare Termine innerhalb einer Kategorie – flach, mit Trennlinien statt Karten. */
.yse-termine .mud-expand-panel {
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent;
}
.yse-termine .mud-expand-panel + .mud-expand-panel {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* Startseite: drei Wege zum Angebot im Hero */
.yse-hero-weg {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    height: 100%;
    padding: 1.1rem 1.25rem;
    border-radius: 10px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.95);
    color: #0d2b4f;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
.yse-hero-weg:hover, .yse-hero-weg:focus-visible {
    background: #fff;
    transform: translateY(-2px);
}
.yse-hero-weg-titel { font-size: 1.2rem; font-weight: 600; }
.yse-hero-weg-text { font-size: .95rem; opacity: .9; }

/* Terminübersicht: Datum/Preis nur auf breiten Bildschirmen ohne Umbruch (mobil = Kartenansicht) */
@media (min-width: 600px) {
    .yse-nowrap-sm { white-space: nowrap; }
    .yse-aktion { text-align: right; }
}

/* Terminübersicht: Rubrik-Kopfzeilen */
.yse-rubrik th, tr.yse-rubrik > * { background: var(--mud-palette-background-gray); padding-top: 14px !important; }

/* Terminübersicht: aufgeklappte Kursdetails */
td.yse-termin-details { padding: 0 16px 12px 16px; background: var(--mud-palette-background-gray); }

/* Eingebettete YouTube-Videos (Zwei-Klick) */
.yse-video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0d2b4f; }
.yse-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yse-video-platzhalter {
    position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; padding: 1rem; border: 0; cursor: pointer; color: #fff; text-align: center;
    background: linear-gradient(135deg, #0d2b4f 0%, #163f73 60%, #7a1010 140%);
}
.yse-video-platzhalter:hover .mud-icon-root, .yse-video-platzhalter:focus-visible .mud-icon-root { color: #ff3b3b; }
.yse-video-titel { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.yse-video-hinweis { font-size: .75rem; opacity: .75; }

/* Mobil: etwas mehr Rand */
@media (max-width: 959.98px) {
    .mud-container--gutters { padding-left: 20px !important; padding-right: 20px !important; }
}

/* Appbar-Dropdown: Bereiche mit Untermenü untereinander, volle Breite */
.yse-submenu { display: flex !important; width: 100%; }
.yse-submenu > .mud-menu-activator, .yse-submenu .mud-menu-item { width: 100%; }

/* Terminlisten (Beschreibungsseiten): einfache Zeilen statt Expander */
.yse-termin-zeile { padding: 10px 16px; border-top: 1px solid var(--mud-palette-lines-default); }
.yse-termin-zeile:first-child { border-top: 0; }

/* News-Feed */
.yse-news-karte { height: 100%; overflow: hidden; border-radius: 10px; display: flex; flex-direction: column; }
.yse-news-karte .yse-video { border-radius: 0; }
.yse-news-thumb { background-size: cover; background-position: center; }
.yse-news-thumb::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.yse-news-thumb > * { position: relative; }
.yse-news-text { opacity: .85; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.yse-news-newsletter { position: sticky; top: 88px; }

/* YouTube-Kachel (Startseite / News) */
.yse-yt-kachel {
    position: relative; display: flex; align-items: flex-end; height: 100%; min-height: 340px;
    border-radius: 10px; overflow: hidden; text-decoration: none; color: #fff;
    background-size: cover; background-position: center; box-shadow: var(--mud-elevation-1);
}
.yse-yt-kachel::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,43,79,0) 30%, rgba(13,43,79,.92) 72%);
    transition: background .2s;
}
.yse-yt-kachel:hover::before { background: linear-gradient(180deg, rgba(13,43,79,.1) 20%, rgba(13,43,79,.96) 68%); }
.yse-yt-kachel-inhalt { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 18px; }
.yse-yt-kachel-titel { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.yse-yt-kachel-text { font-size: .9rem; opacity: .9; }
.yse-yt-kachel-knopf { margin-top: .4rem; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

/* Bearbeitbare Seitentexte (Admin-Bereich) */
.yse-richtext { position: relative; }
.yse-richtext p { margin: 0 0 .75rem; line-height: 1.6; }
.yse-richtext p:last-child, .yse-richtext ul:last-child, .yse-richtext ol:last-child { margin-bottom: 0; }
.yse-richtext h2, .yse-richtext h3, .yse-richtext h4 { margin: 1rem 0 .5rem; font-weight: 500; line-height: 1.3; }
.yse-richtext h2 { font-size: 1.5rem; } .yse-richtext h3 { font-size: 1.25rem; } .yse-richtext h4 { font-size: 1.1rem; }
.yse-richtext ul, .yse-richtext ol { margin: 0 0 .75rem 1.4rem; line-height: 1.6; }
.yse-richtext a { color: var(--mud-palette-primary); }
.yse-richtext blockquote { margin: 0 0 .75rem; padding-left: 1rem; border-left: 3px solid var(--mud-palette-lines-default); opacity: .9; }
.yse-richtext-klein { font-size: .875rem; }
.yse-richtext-klein p { margin-bottom: .4rem; line-height: 1.45; }
.yse-richtext-edit {
    position: absolute; top: -6px; right: -6px; z-index: 2; display: inline-flex; padding: 4px; border-radius: 50%;
    background: var(--mud-palette-secondary); color: #fff !important; opacity: .85; box-shadow: var(--mud-elevation-2);
}
.yse-richtext-edit:hover { opacity: 1; }

/* Admin */
.yse-admin-zeile {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: inherit; text-decoration: none;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.yse-admin-zeile:first-child { border-top: 0; }
.yse-admin-zeile:hover { background: var(--mud-palette-action-default-hover); }
.yse-admin-vorschau { font-size: .82rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yse-editor .ql-container { min-height: 320px; font-size: 1rem; font-family: inherit; background: var(--mud-palette-surface); }
.yse-editor .ql-toolbar { background: var(--mud-palette-surface); }
.yse-editor .ql-editor p { margin-bottom: .6em; }

/* Termine: Unterfilter im aufgeklappten Rubrik-Kopf */
.yse-unterfilter-zeile { display: flex; align-items: flex-start; gap: .25rem; }
.yse-unterfilter-label { flex: 0 0 4.5rem; opacity: .7; line-height: 24px !important; margin-top: 4px; }
.yse-unterfilter-werte { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; }
.yse-unterfilter { display: flex; flex-direction: column; gap: .15rem; margin: .4rem 0 .1rem 2rem; font-weight: 400; cursor: default; }

/* Kurstage in der Terminübersicht: jeder Tag eine Zeile (wie auf der alten Website). */
.yse-kurstag { font-size: .875rem; line-height: 1.4; }

/* Eigene News-Beiträge auf der Startseite: Text nach 4 Zeilen abschneiden. */
.yse-news-kurz { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Ratgeber: Antwort- und Ergebnis-Knöpfe einheitlich linksbündig, auch bei mehrzeiligem Text
   (MudButton zentriert umbrochenen Text sonst). Pfeil bzw. Symbol bleiben außen. */
.mud-button-root.yse-wahl { justify-content: flex-start; text-align: left; }
.mud-button-root.yse-wahl .mud-button-label { justify-content: flex-start; text-align: left; flex: 1; }
.mud-button-root.yse-wahl .mud-button-icon-end { margin-left: auto; }

/* ── Terminübersicht auf dem Smartphone (MudTable-Kartenmodus, Breakpoint Sm < 960 px) ───────────── */
@media (max-width: 959.98px) {
    .yse-termine-titel { font-size: 1.6rem !important; }
    /* Filter: Zeitraum/Checkbox/Bereiche nur nach Klick auf „Filter“ */
    .yse-termine-filter .yse-mobil-zu, .yse-termine-filter .mud-grid-item.yse-mobil-zu { display: none !important; }
    .yse-termine-chips .mud-chip { font-size: .8rem; height: 28px; margin: 2px; }

    /* Rubrik-Kopf: MudTable setzt im Kartenmodus jede Zelle auf flex → Kopf und Unterfilter untereinander */
    .yse-termine tr.yse-rubrik > th { display: block !important; width: 100%; padding: 10px 12px !important; }
    .yse-termine tr.yse-rubrik .mud-typography-subtitle1 { font-size: 1rem; line-height: 1.3; }
    .yse-termine .yse-unterfilter { margin: .5rem 0 .1rem 0; }

    /* Termin-Karten: Label klein über dem Wert statt breiter Spalte daneben */
    .yse-termine tr.mud-table-row:not(.yse-rubrik) { border-bottom: 6px solid var(--mud-palette-background-gray); }
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell {
        display: block !important; text-align: left !important; padding: 6px 14px !important; border: 0;
    }
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell::before {
        display: block; content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
        opacity: .6; padding: 0 0 2px 0; width: auto; text-align: left;
    }
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell:first-child { padding-top: 12px !important; }
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell.yse-leer { display: none !important; }
    /* Törns: Belegung und Plätze nebeneinander */
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell.yse-halb { display: inline-block !important; width: 50%; vertical-align: top; }
    .yse-termine td.yse-plaetze .mud-chip { margin: 0; }
    /* Anmelden/Warteliste über die volle Breite, ohne Label */
    .yse-termine td.yse-aktion { padding-bottom: 14px !important; }
    .yse-termine tr:not(.yse-rubrik) > td.mud-table-cell.yse-aktion::before { display: none !important; }
    .yse-termine td.yse-aktion .mud-button-root { width: 100%; }
    .yse-kurstage .yse-kurstag { white-space: normal; }
}

/* Cookie-Hinweis beim ersten Besuch (App.razor) */
.yse-cookie-hinweis {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2000;
    max-width: 44rem; margin: 0 auto; padding: .9rem 1rem;
    display: flex; align-items: center; gap: 1rem;
    background: var(--mud-palette-surface, #fff); color: var(--mud-palette-text-primary, #2F3136);
    border-left: 4px solid var(--mud-palette-primary, #103870); border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
    font-size: .95rem; line-height: 1.45;
}
.yse-cookie-hinweis[hidden] { display: none; }
.yse-cookie-hinweis p { margin: 0; flex: 1; }
.yse-cookie-hinweis a { color: var(--mud-palette-primary, #103870); text-decoration: underline; }
.yse-cookie-hinweis button {
    flex: none; padding: .5rem 1.1rem; border: 0; border-radius: 4px; cursor: pointer;
    background: var(--mud-palette-primary, #103870); color: #fff; font: inherit; font-weight: 500;
}
@media (max-width: 599.98px) {
    .yse-cookie-hinweis { flex-direction: column; align-items: stretch; left: .5rem; right: .5rem; bottom: .5rem; }
    .yse-cookie-hinweis button { width: 100%; }
}

/* Datenschutzerklärung: Aufzählungen und Inhaltsverzeichnis */
.yse-datenschutz .yse-ds-liste { margin: 0 0 1rem 1.25rem; padding: 0; }
.yse-datenschutz .yse-ds-liste li { margin-bottom: .35rem; font-size: var(--mud-typography-body1-size, 1rem); line-height: var(--mud-typography-body1-lineheight, 1.5); }
.yse-datenschutz .yse-ds-inhalt { margin: 0; padding-left: 1.5rem; columns: 2 22rem; column-gap: 2rem; }
.yse-datenschutz .yse-ds-inhalt li { margin-bottom: .25rem; break-inside: avoid; }
.yse-datenschutz .yse-ds-inhalt a { color: var(--mud-palette-primary); }
.yse-datenschutz [id] { scroll-margin-top: 80px; }
