/* mobile.css -- Mobile-Overrides (@media max-width: 720px).
   Wird NACH main.css geladen. Aus style.css ausgelagert. */

@media (max-width: 720px) {
    .top-right-button {
        display: inline-flex;
    }
    /* Desktop-Action-Buttons mit Mobile-Pendant in der Topbar: nur die
       explizit markierten Items ausblenden, damit Funktionen wie
       "Spielleitung" weiterhin sichtbar bleiben. */
    .is-desktop-only,
    .stories-head > .button-link.is-desktop-only,
    .editor-head__actions > .is-desktop-only,
    .stories-head__actions > .is-desktop-only {
        display: none !important;
    }
}

@media (max-width: 720px) {
    .modal-backdrop {
        padding: 0;
        align-items: stretch;
    }
    .modal {
        max-width: none;
        width: 100%;
        min-height: 100%;
        border-radius: 0;
        border: 0;
    }
}

@media (max-width: 720px) {
    .story-list-tabs {
        display: none;
    }
    .story-list-tabs-mobile {
        display: block;
    }
    .story-list-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .story-list-filters-toggle {
        display: inline-flex;
    }
    /* Items by default ausgeblendet, expandiert als Spalte */
    .story-list-filters__items {
        display: none;
    }
    .story-list-filters.is-expanded .story-list-filters__items {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(34, 23, 46, 0.08);
    }
    /* Auf Mobile ist jede Filter-Zelle eine Zeile mit gleich breitem Label,
       damit alle Controls auf einer vertikalen Linie starten. */
    .story-list-filter {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .story-list-filter__label {
        flex: 0 0 130px;
        min-width: 130px;
    }
    .story-list-filter > select,
    .story-list-filter > .story-list-filter__input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
    /* Toggle-Switch (Ich war dabei): Track + Text zusammen rechts vom Label */
    .toggle-switch.story-list-filter__switch {
        justify-content: flex-start;
        align-self: stretch;
        gap: 10px;
    }
    /* Sort-Wrapper auf Mobile: Select-Label + Direction-Button in einer Zeile */
    .story-list-filter-sort {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .story-list-filter-sort > .story-list-filter {
        flex: 1 1 auto;
        width: auto;
    }
    /* hub-search-card Mobile: volle Breite, keine seitliche Begrenzung */
    .hub-search-card {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    /* Mobile: Layout darf wieder normal scrollen (body), kein internes Scroll-Pane */
    body.page-character-card {
        height: auto;
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    body.page-character-card::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }
    body.page-character-card .page,
    body.page-character-card .hero,
    body.page-character-card .hero > .character-card-card {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
        height: auto;
        display: block;
    }

    .character-card-view {
        grid-template-columns: minmax(0, 1fr);
        overflow: visible;
    }

    .character-card-view__image {
        position: static;
    }

    .character-card-view__image-placeholder {
        max-width: 260px;
        margin: 0 auto;
    }

    .character-card-view__fields {
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 720px) {
    .character-card-overlay {
        padding: 0;
    }
    .character-card-overlay__frame {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

