/*
 * Tour-Editor auf Tablets im Querformat (Masterprompt Task 03, Plan #05).
 * Wird im Kunden-Layout als letzte Editor-Datei geladen.
 * - Kopfzeile (992–1400 px, unabhängig vom Eingabegerät): eine Zeile, kein Überlappen von
 *   „Editor verlassen“ mit den Reitern, keine zweite Zeile, die Inhalte verdeckt.
 * - Touch (pointer: coarse): Tippflächen ≥ 40 px, Hinweise kompakt. Desktop mit Maus bleibt unverändert.
 */

/* ---------- Kopfzeile ---------- */
@media (min-width: 992px) and (max-width: 1400px) {
    body.customer-shell-v19 #stepMenu .dash-lang-wrap { margin-left: 4px !important; }
    /* Platz für den absolut positionierten Knopf „Editor verlassen“ freihalten. */
    body.customer-shell-v19 #stepMenu #navbar-generator { padding-right: 152px !important; }
    /* Ohne !important: die jeweils ausgeblendete Liste (#enabledul/#disabledul, Inline-Style) bleibt aus. */
    body.customer-shell-v19 #stepMenu #navbar-generator > .navbar-nav {
        display: flex;
        flex-wrap: nowrap !important;
        float: none !important;
    }
    body.customer-shell-v19 #stepMenu .navbar-nav > li > a {
        padding: 12px 10px !important;
        white-space: nowrap;
    }
    body.customer-shell-v19 #stepMenu .navbar-nav > li > a > .icon {
        width: 28px !important;
        margin-right: 6px !important;
        background-size: contain !important;
        background-position: center !important;
    }
}
/* iPad quer (1024) und kleine Laptops: Symbole weglassen, damit die Beschriftung in eine Zeile passt. */
@media (min-width: 992px) and (max-width: 1199px) {
    body.customer-shell-v19 #stepMenu .navbar-nav > li > a > .icon,
    body.customer-shell-v19 #stepMenu .navbar-nav > li > a > .fa { display: none !important; }
    body.customer-shell-v19 #stepMenu .navbar-nav > li > a { padding: 12px 8px !important; font-size: 13px !important; }
    body.customer-shell-v19 #stepMenu #acntNav.account-navi { min-width: 0 !important; }
}

/* ---------- Touch: Tippflächen ---------- */
@media (pointer: coarse) {
    /* Bildkacheln, Gruppen, Grundrisse, Hotspot-Bildleiste: Löschen, Vollbild, Bearbeiten */
    body.customer-editor-v19 a.delete,
    body.customer-editor-v19 .thumb_boxes figure a.delete,
    body.customer-editor-v19 a.img-light-box,
    body.customer-editor-v19 .panorama-edit-btn,
    body.customer-editor-v19 a.delete-panorama-panel-item {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-height: none !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    body.customer-editor-v19 a.img-light-box img { width: 26px; height: 26px; }
    .thumb_boxes input[type="checkbox"] {
        width: 26px !important;
        height: 26px !important;
        margin: 0;
    }
    .thumb_boxes .savedPanoramaDiv,
    .thumb_boxes .panorama_name { display: inline-block; padding-top: 10px; padding-bottom: 10px; }

    /* Kopfzeile: Upgrade-Knopf größer, Zeile dafür mit weniger Innenabstand (Höhe bleibt 107 px) */
    body.customer-shell-v19 #stepMenu .editor-context { padding-top: 2px !important; padding-bottom: 2px !important; }
    body.customer-shell-v19 #stepMenu .editor-context #aSlelectState {
        min-height: 36px;
        display: inline-flex !important;
        align-items: center;
    }
    /* Kleine Textlinks */
    body.customer-editor-v19 .group-box a[href*="edit-group"],
    body.customer-editor-v19 #deleteMediaSlide .bottomdiv a,
    body.customer-editor-v19 #tour_fullname.edit {
        display: inline-flex !important;
        align-items: center;
        min-height: 40px;
        min-width: 40px;
    }

    /* Hotspot-Editor: Bildleiste und Werkzeuge */
    #groupSlider .owl-nav .owl-prev,
    #groupSlider .owl-nav .owl-next,
    #groupSlider a.next-btn,
    #groupSlider a.prev-btn {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    #groupSlider .hotspot-group-class { min-height: 40px; display: block; }
    a.showtip.menu-link,
    a.showtip.panoramaUploader {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Hinweis „Große Touren schneller verbinden“ verdeckt auf Tablets das Panorama → kompakt */
    .connection-overview-hint { padding: 8px 12px !important; max-width: 300px; }
    .connection-overview-hint img { width: 28px !important; height: 28px !important; }
    .connection-overview-hint p { display: none !important; }
    .connection-overview-hint .connection-overview-link {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }

    /* Einstellungen: Speichern-Knöpfe, Auswahlfelder */
    .settings-save-button,
    body.customer-editor-v19 .ts-btn-primary { min-height: 40px; }
    body.customer-editor-v19 input[type="checkbox"][id^="manageuser-"] { width: 24px !important; height: 24px !important; }
    #tour-ai-autolink,
    .settings-contact-row__radio { width: 24px !important; height: 24px !important; }
    #tour_fullname.edit { min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Hotspot-Editor: Werkzeugleiste lag hinter der Kopfzeile (alle Breiten) ---------- */
/* .side-toggle-menu stand bei top:70px, die Editor-Kopfzeile ist 107 px hoch → Startansicht, Panorama austauschen,
   Bildbearbeitung und Vorschau waren fast vollständig verdeckt. Rechte Seitenleiste rückt darunter. */
body.customer-editor-v19 .hotspot-page .side-toggle-menu { top: calc(var(--editor-header-height, 107px) + 10px); z-index: 5; }
@media (min-width: 768px) {
    body.customer-editor-v19 .hotspot-page #deleteMediaSlide {
        top: calc(var(--editor-header-height, 107px) + 62px) !important;
        max-height: calc(100dvh - var(--editor-header-height, 107px) - 74px) !important;
    }
}
/* Zoomleiste überlappte die Bildleiste unten um wenige Pixel */
body.customer-editor-v19 #zoom-indicator.zoom-indicator { bottom: 10px !important; }
