/* Wartung: Leiste, Overlay und Wartungsseite (siehe
   docs/dev-prompts/GLOBAL/maintenance/maintenance-03-v1.md, Abschnitt 4).
   Stammfassung in FWA/php-sys/1.0/L1/wartung/, byte-gleich ins web/ jeder App
   kopiert. Erscheinungsbild wie SAA/maintenance/v1 (maintenance-01-v1,
   "Gemeinsame Basis"): System-Schriften, keine Abhängigkeit zu den Schriften
   oder Assets der App, eigenes Reset nur für die mw-Elemente. */

.mw-overlay,
.mw-standalone-body,
.mw-leiste {
    --mw-bg: #0d1117;
    --mw-surface: #161b22;
    --mw-border: #30363d;
    --mw-accent: #58a6ff;
    --mw-text: #e6edf3;
    --mw-muted: #7d8590;
}

.mw-overlay, .mw-overlay *,
.mw-standalone-body *,
.mw-leiste, .mw-leiste *,
.mw-abstand {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.mw-versteckt {
    display: none !important;
}

/* ---------- Wartung, über der App ---------- */

.mw-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: var(--mw-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Wartung, als ganze Antwort ---------- */

.mw-standalone-body {
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    background: var(--mw-bg);
    color: var(--mw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ---------- Karte, für beide ---------- */

.mw-card {
    width: min(420px, 100%);
    background: var(--mw-surface);
    border: 1px solid var(--mw-border);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    color: var(--mw-text);
    overflow-wrap: anywhere;
}

.mw-icon {
    color: var(--mw-accent);
    margin-bottom: 16px;
}

.mw-icon svg {
    display: inline-block;
}

.mw-message {
    font-size: 15px;
    line-height: 1.5;
}

.mw-message + .mw-progress-wrap {
    margin-top: 20px;
}

.mw-progress-track {
    height: 8px;
    border-radius: 4px;
    background: var(--mw-border);
    overflow: hidden;
}

.mw-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--mw-accent);
    border-radius: 4px;
    transition: width 1s linear;
}

.mw-eta {
    font-size: 12px;
    color: var(--mw-muted);
    margin-top: 10px;
}

/* ---------- Hinweis, am unteren Rand ---------- */

.mw-leiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--mw-surface);
    border-top: 2px solid var(--mw-accent);
    color: var(--mw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.mw-leiste-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mw-leiste-zu {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid var(--mw-border);
    border-radius: 8px;
    background: transparent;
    color: var(--mw-text);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.mw-leiste-zu:hover {
    border-color: var(--mw-accent);
}

.mw-leiste-zu:focus-visible {
    outline: 2px solid var(--mw-accent);
    outline-offset: 2px;
}

/* Platzhalter am Seitenende, damit die Leiste nichts dauerhaft verdeckt. */
.mw-abstand {
    display: block;
    width: 100%;
}
