.ma-player {
    --ma-radius-sm: 999px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--ma-card, #ffffff);
    border: 1px solid var(--ma-card-border, #e7eaf2);
    border-radius: var(--ma-radius, 16px);
    box-shadow: 0 1px 2px rgba(22, 35, 74, 0.04), 0 4px 14px rgba(22, 35, 74, 0.05);
    padding: 12px 14px;
    margin-bottom: 16px;
    max-width: 480px;
    position: relative;
}

.ma-player__widget {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
}

.ma-player--video-fav {
    max-width: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.ma-player__art {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: var(--ma-accent-soft, #eef1fc);
    color: var(--ma-accent, #2f5fd6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-player__art svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.ma-player__body {
    flex: 1;
    min-width: 0;
}

.ma-player__title {
    color: var(--ma-text, #16234a);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-player__meta {
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.ma-player__subtitle {
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.ma-player__bar {
    height: 4px;
    background: var(--ma-track, #e7eaf5);
    border-radius: 2px;
    margin-top: 1px;
    cursor: pointer;
    position: relative;
}

.ma-player__fill {
    height: 100%;
    background: var(--ma-accent, #2f5fd6);
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s linear;
}

.ma-player__time {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--ma-text-muted, #838ba3);
    margin-top: 4px;
}

.ma-player__status {
    font-size: 0.75rem;
    color: var(--ma-text-muted, #838ba3);
    margin-top: 4px;
}

.ma-player__status a {
    color: var(--ma-accent, #2f5fd6);
}

.ma-player__play {
    background: var(--ma-play-bg, #16234a);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ma-play-icon, #ffffff);
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.2s;
}

.ma-player__play:hover {
    transform: scale(1.05);
}

.ma-player__play svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ma-player__play.is-loading {
    cursor: wait;
}

.ma-player__play.is-loading .ma-icon-play,
.ma-player__play.is-loading .ma-icon-pause {
    display: none !important;
}

.ma-player__play .ma-icon-buffering {
    display: none;
    animation: ma-spin 0.8s linear infinite;
}

.ma-player__play.is-loading .ma-icon-buffering {
    display: block !important;
}

@keyframes ma-spin {
    to { transform: rotate(360deg); }
}

.ma-player__fav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--ma-text-muted, #838ba3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Der Button selbst reagiert nicht mehr auf Hover/Klick, nur noch
       das Icon darin - das Padding bleibt rein als groesserer, aber
       "unsichtbarer" Klickbereich bestehen (Touch/Bedienbarkeit). */
    pointer-events: none;
}

.ma-player__fav svg {
    pointer-events: auto;
    transition: color 0.2s, transform 0.15s;
}

.ma-player__fav .ma-fav-fill {
    transition: opacity 0.2s;
}

/* Hover: Herz grau ausfuellen (nicht einfaerben) als Vorschau. */
.ma-player__fav svg:hover .ma-fav-fill {
    opacity: 1;
}

.ma-player__fav svg:active {
    transform: scale(0.9);
}

.ma-player__fav.is-active {
    color: var(--ma-accent, #2f5fd6);
}

/* Bereits favorisiert: Akzentfarbe behalten, auch beim Hover (nicht vom
   grauen Hover-Fuellzustand ueberschreiben lassen). */
.ma-player__fav.is-active svg,
.ma-player__fav.is-active svg:hover {
    color: var(--ma-accent, #2f5fd6);
}

/* Astra setzt global "button:hover"/"button:focus" auf eine eigene
   Akzentfarbe als Hintergrund + weiße Schrift, mit einer Spezifität, die
   eine einzelne Klasse schlägt (führte zum blauen Kasten ums Herz beim
   Hovern, bzw. weißer/unsichtbarer Schrift nach einem Klick). Da :hover
   auf einem Kind-Element (hier dem SVG-Icon) den Eltern-Button trotz
   "pointer-events: none" weiterhin als :hover matcht, hier mit höherer
   Spezifität konsequent auf unsere eigenen, transparenten Werte zwingen. */
.ma-player .ma-player__fav,
.ma-player .ma-player__fav:focus,
.ma-player .ma-player__fav:hover,
.ma-exercise .ma-player__fav,
.ma-exercise .ma-player__fav:focus,
.ma-exercise .ma-player__fav:hover {
    color: var(--ma-text-muted, #838ba3);
    background: none;
    border: none;
    box-shadow: none;
}

.ma-player .ma-player__fav.is-active,
.ma-player .ma-player__fav.is-active:focus,
.ma-exercise .ma-player__fav.is-active,
.ma-exercise .ma-player__fav.is-active:focus {
    color: var(--ma-accent, #2f5fd6);
}

.ma-player .ma-player__play,
.ma-player .ma-player__play:focus,
.ma-player .ma-player__play:hover,
.ma-exercise .ma-player__play,
.ma-exercise .ma-player__play:focus,
.ma-exercise .ma-player__play:hover {
    background: var(--ma-play-bg, #16234a);
    color: var(--ma-play-icon, #ffffff);
    border: none;
    box-shadow: none;
}

/* ------------------------------------------------------------------
   MentalApp Übung: Trigger-Karte (Listen/Archive) + Modal (Checkliste).
   ------------------------------------------------------------------ */
.ma-exercise {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--ma-card, #ffffff);
    border: 1px solid var(--ma-card-border, #e7eaf2);
    border-radius: var(--ma-radius, 16px);
    box-shadow: 0 1px 2px rgba(22, 35, 74, 0.04), 0 4px 14px rgba(22, 35, 74, 0.05);
    padding: 12px 14px;
    margin-bottom: 16px;
    max-width: 480px;
    cursor: pointer;
}

.ma-exercise__body {
    flex: 1;
    min-width: 0;
}

.ma-exercise__title {
    color: var(--ma-text, #16234a);
    font-size: 1rem;
    font-weight: 700;
}

.ma-exercise__subtitle {
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 1px;
}

/* Modal: eigenständiges Overlay (gleiches Prinzip wie .ma-video-overlay),
   zentrierte Karte statt Vollbild-Video. */
.ma-exercise-modal {
    position: fixed;
    inset: var(--ma-video-header-bottom, 0px) 0 0;
    z-index: 99999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(8, 10, 18, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ma-exercise-modal.is-open {
    display: flex;
}

body.ma-exercise-open {
    overflow: hidden;
}

body.ma-exercise-open .elementor-location-header {
    position: fixed;
    top: var(--ma-video-admin-height, 0px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100000;
    background: #fff;
}

.ma-exercise-modal__card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    max-height: 92dvh;
    background: #fbfcfe;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(8, 10, 18, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 480px) {
    .ma-exercise-modal {
        align-items: center;
        padding: 24px;
    }
    .ma-exercise-modal__card {
        border-radius: 20px;
        max-height: 88vh;
        max-height: 88dvh;
    }
}

/* Vollansicht auf der Übungs-Single-Seite: dieselbe Karte wie im Modal,
   aber statisch im Seitenfluss statt als fixiertes Overlay (sonst bliebe
   bei nur einer kleinen Trigger-Karte fast die ganze Seite leer). */
.ma-exercise-full {
    display: block;
    max-width: 440px;
    margin: 24px auto 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Unterer Rand groß genug für die fixierte untere App-Navigation
   (Start/Favoriten/Verlauf, position:fixed, ~95px hoch, siehe
   Elementor-Footer-Template #581) - die Seite hat sonst keinerlei
   Seiten-weites Bottom-Padding dafür, auf den meisten Seiten fällt das
   nur nicht auf, weil genug Inhalt folgt. Erhöhte Spezifität nötig:
   Astras ".entry-content > *:last-child { margin-block-end: 0 }"
   überschreibt sonst unseren Bottom-Margin, weil die Karte hier der
   einzige/letzte Kindknoten im Beitragsinhalt ist. */
body .entry-content .ma-exercise-full {
    margin-bottom: 120px;
}

.ma-exercise-full .ma-exercise-modal__card {
    max-width: none;
    max-height: none;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(22, 35, 74, 0.04), 0 4px 14px rgba(22, 35, 74, 0.05);
}

.ma-exercise-full .ma-exercise-modal__success {
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(22, 35, 74, 0.04), 0 4px 14px rgba(22, 35, 74, 0.05);
}

.ma-exercise-modal__scroll {
    overflow-y: auto;
    padding: 28px 22px 22px;
}

.ma-exercise-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ma-text, #16234a);
}

.ma-exercise-modal__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-right: 32px;
}

.ma-exercise-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--ma-accent-soft, #eef1fc);
    background-size: cover;
    background-position: center;
    color: var(--ma-accent, #2f5fd6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-exercise-modal__title {
    margin: 2px 0 0;
    color: var(--ma-text, #16234a);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
}

.ma-exercise-modal__subtitle {
    margin: 2px 0 0;
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.92rem;
}

.ma-exercise-modal__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    margin-bottom: 18px;
}

.ma-exercise-modal__intro {
    color: var(--ma-text, #16234a);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 18px;
}

.ma-exercise-modal__steps {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ma-exercise-modal__step {
    background: var(--ma-exercise-step-bg, #f1f3f9);
    border-radius: 14px;
    padding: 12px 14px;
}

.ma-exercise-modal__step label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.ma-exercise-modal__checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    border: 2px solid #c3c9da;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    position: relative;
}

.ma-exercise-modal__checkbox:checked {
    background: var(--ma-accent, #2f5fd6);
    border-color: var(--ma-accent, #2f5fd6);
}

.ma-exercise-modal__checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(40deg);
}

.ma-exercise-modal__step-num {
    color: var(--ma-accent, #2f5fd6);
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.ma-exercise-modal__step-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ma-exercise-modal__step-body strong {
    color: var(--ma-text, #16234a);
    font-size: 0.95rem;
    font-weight: 700;
}

.ma-exercise-modal__step-body span {
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.85rem;
    line-height: 1.4;
}

.ma-exercise-modal__step:has(.ma-exercise-modal__checkbox:checked) .ma-exercise-modal__step-body strong {
    text-decoration: line-through;
    text-decoration-color: var(--ma-text-muted, #838ba3);
}

.ma-exercise-modal__step:has(.ma-exercise-modal__checkbox:checked) {
    opacity: 0.6;
}

.ma-exercise-modal__quote {
    background: var(--ma-exercise-quote-bg, #e8f0ff);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 0 0 22px;
    color: var(--ma-text, #16234a);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.ma-exercise-modal__actions {
    display: flex;
    gap: 10px;
}

.ma-exercise-modal__done {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 16px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.ma-exercise-modal__done {
    background: var(--ma-play-bg, #16234a);
    border: none;
    color: var(--ma-play-icon, #ffffff);
}

.ma-exercise-modal__success {
    display: none;
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 26px 30px;
    background: #fbfcfe;
    border-radius: 20px 20px 0 0;
}

@media (min-width: 480px) {
    .ma-exercise-modal__success {
        border-radius: 20px;
    }
}

/* .ma-exercise-panel: gemeinsame Basisklasse von .ma-exercise-modal
   (Listen, Overlay) und .ma-exercise-full (Single-Seite, statisch) -
   der Erfolgs-Umschalter gilt dadurch für beide Darstellungen. */
.ma-exercise-panel.is-success .ma-exercise-modal__card {
    display: none;
}

.ma-exercise-panel.is-success .ma-exercise-modal__success {
    display: flex;
}

.ma-exercise-modal__success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5f6ec;
    color: #1ea672;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.ma-exercise-modal__success h3 {
    margin: 0 0 8px;
    color: var(--ma-text, #16234a);
    font-size: 1.25rem;
    font-weight: 800;
}

.ma-exercise-modal__success p {
    margin: 0 0 24px;
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.92rem;
    line-height: 1.5;
    max-width: 320px;
}

.ma-exercise-modal__overview {
    width: 100%;
    background: var(--ma-play-bg, #16234a);
    color: var(--ma-play-icon, #ffffff);
    border: none;
    border-radius: 999px;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ------------------------------------------------------------------
   [mentalapp_favorites] / [mentalapp_history]: einfache vertikale
   Liste aus denselben .ma-player-Karten wie auf Single-/Archivseiten.
   ------------------------------------------------------------------ */
.ma-list {
    /* Kein eigener max-width-Wert mehr: 1240px (Breite der
       Kategorie-Archiv-Vorlage) war auf Favoriten/Verlauf tatsächlich
       breiter als deren eigener Seiten-Container (sichtbar am
       "FAVORITEN"/"VERLAUF"-Titelbanner, das schmäler blieb als die
       Karten darunter). Favoriten/Verlauf sind normale Seiten mit
       eigener, schmälerer Container-Breite - hier also einfach den
       vorhandenen Platz füllen (100%), dann passt es automatisch zum
       Titelbanner, egal welche Breite Astra dafür vorgibt. */
    margin: 0 auto;
    padding: 16px;
    /* Dieselben Farb-Variablen wie das Elementor-Widget "MentalApp
       Audio-Liste" (siehe .ma-audio-list weiter unten) auf allen
       Kategorie-/Archivseiten überall einheitlich gesetzt hat - ohne
       das fehlten hier die Werte komplett und die Karten fielen auf
       das dunkle Standarddesign der Plugin-CSS zurück (dunkler
       Titeltext/Play-Button statt des sitetypischen Hellblau/Weiß). */
    --ma-card: #ffffff;
    --ma-card-border: rgba(255, 255, 255, 0.08);
    --ma-text: #005B9B;
    --ma-text-muted: rgba(0, 0, 0, 0.6);
    --ma-accent: #FFD500;
    --ma-play-icon: #005B9B;
    --ma-play-bg: #FFFFFE;
    --ma-radius: 16px;
}

.ma-list .ma-player,
.ma-list .ma-exercise {
    max-width: none;
}

.ma-list .ma-player__art {
    border-radius: 12px;
}

.ma-list .ma-player .ma-player__play,
.ma-list .ma-player .ma-player__play:focus,
.ma-list .ma-player .ma-player__play:hover,
.ma-list .ma-exercise .ma-player__play,
.ma-list .ma-exercise .ma-player__play:focus,
.ma-list .ma-exercise .ma-player__play:hover {
    border: 1.5px solid var(--ma-play-icon, #005B9B);
}

.ma-list-empty,
.ma-list-login {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ma-text-muted, #838ba3);
    margin: 0 auto;
    padding: 24px 16px;
    text-align: center;
}

.ma-list-login a {
    color: var(--ma-accent, #2f5fd6);
}

/* ------------------------------------------------------------------
   Elementor-Widget "MentalApp Audio-Liste": dunkles Listen-Design.
   Alle Werte sind CSS-Variablen, die die Widget-Style-Controls
   (class-mentalapp-elementor-widget.php) pro Instanz überschreiben.
   ------------------------------------------------------------------ */
.ma-audio-list {
    --ma-card: #111a30;
    --ma-card-border: rgba(255, 255, 255, 0.08);
    --ma-text: #ffffff;
    --ma-text-muted: rgba(255, 255, 255, 0.55);
    --ma-accent: #d8ab6a;
    --ma-track: rgba(255, 255, 255, 0.12);
    --ma-play-bg: transparent;
    --ma-play-icon: #ffffff;
    --ma-radius: 16px;
}

.ma-audio-list .ma-player,
.ma-audio-list .ma-exercise {
    max-width: none;
    width: 100%;
}

.ma-audio-list .ma-player__art {
    border-radius: 12px;
}

.ma-audio-list .ma-player .ma-player__play,
.ma-audio-list .ma-player .ma-player__play:focus,
.ma-audio-list .ma-player .ma-player__play:hover,
.ma-audio-list .ma-exercise .ma-player__play,
.ma-audio-list .ma-exercise .ma-player__play:focus,
.ma-audio-list .ma-exercise .ma-player__play:hover {
    border: 1.5px solid var(--ma-play-icon, #ffffff);
}

.ma-audio-list__empty {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ma-text-muted, #838ba3);
    padding: 12px 4px;
}

/* ------------------------------------------------------------------
   MentalApp Video: Fullscreen-Overlay für die Wiedergabe (Play in der
   Player-Zeile öffnet dieses Overlay statt inline abzuspielen). Passt
   sich per [data-ratio="portrait"] an Hoch- oder Querformat an -
   siehe openVideoOverlay() in player.js.
   ------------------------------------------------------------------ */
body.ma-video-open {
    overflow: hidden;
}

/* Keep the app header visible while the video covers the content below. */
body.ma-video-open .elementor-location-header {
    position: fixed;
    top: var(--ma-video-admin-height, 0px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100000;
    background: #fff;
}

.ma-video-overlay {
    position: fixed;
    inset: var(--ma-video-header-bottom, 0px) 0 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    background: rgba(8, 10, 18, 0.94);
}

.ma-video-overlay.is-open {
    display: flex;
}

.ma-video-overlay__inner {
    position: relative;
    width: 100%;
    max-width: min(960px, calc((100vh - var(--ma-video-header-bottom, 0px) - 72px) * 1.7777778));
    max-width: min(960px, calc((100dvh - var(--ma-video-header-bottom, 0px) - 72px) * 1.7777778));
}

.ma-video-overlay[data-ratio="portrait"] .ma-video-overlay__inner {
    max-width: min(420px, calc((100vh - var(--ma-video-header-bottom, 0px) - 72px) * 0.5625));
    max-width: min(420px, calc((100dvh - var(--ma-video-header-bottom, 0px) - 72px) * 0.5625));
}

.ma-video-overlay__frame-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.ma-video-overlay[data-ratio="portrait"] .ma-video-overlay__frame-wrap {
    aspect-ratio: 9 / 16;
    margin: 0 auto;
}

.ma-video-overlay__frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ma-video-overlay__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
}

.ma-video-overlay__close svg {
    width: 26px;
    height: 26px;
}

/* ------------------------------------------------------------------
   Hauptmenü (Hamburger-Icon im Header): Drawer von rechts, dieselbe
   Overlay-Mechanik wie Video/Übungs-Modal (Backdrop + ausklappendes
   Panel), siehe nav-menu.php.
   ------------------------------------------------------------------ */
.ma-nav-backdrop {
    position: fixed;
    inset: 0;
    /* Höher als die WP-Admin-Toolbar (z-index 99999), damit das Drawer
       beim eingeloggten Betrachten/Testen nicht dahinter verschwindet -
       normale Besucher ohne Toolbar sind davon nicht betroffen. */
    z-index: 999998;
    background: rgba(8, 10, 18, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ma-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ma-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    width: min(320px, 84vw);
    background: #fbfcfe;
    box-shadow: -8px 0 30px rgba(8, 10, 18, 0.18);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ma-nav-drawer.is-open {
    transform: translateX(0);
}

.ma-nav-drawer__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: var(--ma-accent, #2f5fd6);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(22, 35, 74, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.ma-nav-drawer__close-icon {
    display: block;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    font-weight: 400;
    transform: translateY(-1px);
}

.ma-nav-drawer__close:hover,
.ma-nav-drawer__close:focus-visible {
    background: #24409f;
    transform: scale(1.06);
}

.ma-nav-drawer__scroll {
    overflow-y: auto;
    padding: 64px 10px 24px 22px;
    flex: 1;
}

.ma-nav-drawer__section-title {
    color: var(--ma-text-muted, #838ba3);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px;
    padding-right: 12px;
}

.ma-nav-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ma-nav-drawer__list--app {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ma-nav-drawer__link {
    display: block;
    color: var(--ma-text, #16234a);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 11px 12px 11px 4px;
    border-radius: 10px;
    border-bottom: 1px solid rgba(22, 35, 74, 0.06);
}

.ma-nav-drawer__list--app .ma-nav-drawer__link {
    border-bottom: none;
}

.ma-nav-drawer__list .ma-nav-drawer__link:last-child {
    border-bottom: none;
}

.ma-nav-drawer__link:hover {
    background: var(--ma-accent-soft, #eef1fc);
    color: var(--ma-accent, #2f5fd6);
}

.ma-nav-drawer__link--icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ma-nav-drawer__link--icon svg {
    flex-shrink: 0;
    color: var(--ma-accent, #2f5fd6);
}

.ma-nav-drawer__divider {
    height: 1px;
    background: rgba(22, 35, 74, 0.08);
    margin: 14px 12px 14px 0;
}

.ma-nav-drawer__legal {
    margin-top: 18px;
    padding-right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.7rem;
    color: var(--ma-text-muted, #838ba3);
}

.ma-nav-drawer__legal a {
    color: inherit;
    text-decoration: none;
}

.ma-nav-drawer__legal a:hover {
    text-decoration: underline;
}

body.ma-nav-open {
    overflow: hidden;
}

/* ------------------------------------------------------------------
   Favoriten-Badge (Warenkorb-Stil) auf dem Herz-Icon der unteren
   App-Navigation (Elementor-Footer-Template #581) - siehe
   updateFavoritesBadge() in player.js.
   ------------------------------------------------------------------ */
/* Position:relative direkt auf den Icon-Link (a.elementor-icon), nicht auf
   das umgebende .elementor-icon-box-icon-div: letzteres ist in der
   mobilen "Icon über Titel"-Anordnung so breit wie die ganze Spalte, ein
   Badge relativ dazu würde also weit rechts von der eigentlichen
   Herz-Grafik schweben statt direkt daran zu kleben. */
.elementor-location-footer .elementor-icon-box-icon a.elementor-icon {
    position: relative;
}

.ma-fav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #005B9B;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
}

.ma-legal-links {
    text-align: center;
    padding: 14px 16px 22px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.72rem;
    color: var(--ma-text-muted, #838ba3);
}

/* Unter 768px ist die App-Tableiste im Footer-Template #581 per
   position:fixed an den unteren Bildschirmrand gepinnt (siehe
   .e-6d78e41 in local-581-frontend-mobile.css) - hier direkt bündig
   darüber andocken statt im normalen Seitenfluss weiter oben zu
   landen. Exakte Höhe wird per JS gemessen (player.js), da die
   Tableiste keine feste CSS-Höhe hat. */
@media (max-width: 767px) {
    .ma-legal-links {
        position: fixed;
        left: 0;
        right: 0;
        background: var(--ma-card, #fbfcfe);
        z-index: 999997;
    }
}

.ma-legal-links a {
    color: inherit;
    text-decoration: none;
}

.ma-legal-links a:hover {
    text-decoration: underline;
}

.ma-legal-links span {
    margin: 0 6px;
}

.ma-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(12px);
    background: var(--ma-text, #16234a);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(22, 35, 74, 0.25);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ma-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
