/* eit-web-monitor.css — Website-Monitoring (2.4.197)
   Dark Mode ueber html[data-theme="dark"] (wie eit-geraete.css). */

/* ---------- Uebersichtstabelle ---------- */
#wm_tabelle td { vertical-align: middle; }
.wm-dot-on  { color: #5cb85c; }
.wm-dot-off { color: #bbb; }

.wm-st { font-weight: 600; white-space: nowrap; }
.wm-st-up   { color: #3c9a3c; }
.wm-st-down { color: #d9534f; }
.wm-st-unk  { color: #999; }

.wm-up {
    display: inline-block; min-width: 46px; text-align: center;
    padding: 1px 6px; border-radius: 3px; font-size: 12px; font-weight: 600; color: #fff;
}
.wm-up-success { background: #5cb85c; }
.wm-up-warning { background: #f0ad4e; }
.wm-up-danger  { background: #d9534f; }

/* ---------- Suchleiste ueber der Tabelle ---------- */
.wm-such-leiste { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wm-such-leiste .input-group { max-width: 420px; }
.wm-such-info { font-size: 12px; white-space: nowrap; }

/* ---------- Checks-Badges (HTTP/HTTPS/Cert) ---------- */
.wm-pill {
    display: inline-block; padding: 1px 6px; margin: 1px 2px 1px 0; border-radius: 3px;
    font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; color: #fff;
}
.wm-pill-ok   { background: #5cb85c; }
.wm-pill-bad  { background: #d9534f; }
.wm-pill-warn { background: #f0ad4e; }
.wm-pill-unk  { background: #999; }

/* ---------- Formular: Regel-Bloecke ---------- */
#wm_form legend { border-bottom: 1px solid #e0e0e0; padding-bottom: 4px; margin-bottom: 12px; }
.wm-region-zeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.wm-region-vorschau {
    background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 3px;
    padding: 6px 10px; font-size: 12px; min-height: 30px; word-break: break-word;
}
.wm-region-tag {
    display: inline-block; background: #eef4fb; border: 1px solid #cfe0f2;
    border-radius: 3px; padding: 1px 6px; font-weight: 600; color: #2b6cb0;
}

/* ---------- Bereich-Picker ---------- */
.wm-pick-dialog { width: 96%; max-width: 1500px; }
.wm-pick-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.wm-pick-col > strong { display: block; margin-bottom: 6px; }
.wm-pick-iframe-wrap {
    border: 1px solid #ddd; border-radius: 3px; height: 460px; overflow: auto; background: #fff;
}
.wm-pick-iframe-wrap iframe { width: 100%; height: 100%; min-height: 460px; border: 0; background: #fff; }
.wm-pick-source {
    height: 460px; overflow: auto; font-size: 11px; line-height: 1.45;
    white-space: pre-wrap; word-break: break-all; background: #1e1e1e; color: #d4d4d4;
    border: 1px solid #333; border-radius: 3px; padding: 8px; user-select: text;
}
.wm-pick-source::selection { background: #f0ad4e; color: #000; }
.wm-pick-controls { margin-top: 12px; display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.wm-pick-ergebnis-box {
    background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 3px;
    padding: 6px 10px; min-height: 34px; font-size: 12px; word-break: break-word;
}
@media (max-width: 800px) {
    .wm-pick-split, .wm-pick-controls { grid-template-columns: 1fr; }
    .wm-pick-iframe-wrap { height: 300px; }
    .wm-pick-source { height: 300px; }
}

/* ---------- Detail / Statistik ---------- */
.wm-detail-kpi { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.wm-kpi { text-align: center; font-size: 13px; }
.wm-kpi small { color: #999; }
.wm-hist-kopf { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.wm-hist-toolbar { display: flex; gap: 6px; }

/* ---------- Defacement-Block ---------- */
.wm-def-skala { display: flex; justify-content: space-between; font-size: 11px; color: #999; margin-top: 2px; }
.wm-def-baseline { font-size: 12px; }
html[data-theme="dark"] .wm-def-skala { color: #9aa4ab; }

/* =====================================================================
   DARK MODE
   ===================================================================== */
html[data-theme="dark"] #wm_tabelle,
html[data-theme="dark"] #wm_tabelle td,
html[data-theme="dark"] #wm_tabelle th { border-color: #3a434c; color: #d7dee2; }
html[data-theme="dark"] .wm-region-vorschau,
html[data-theme="dark"] .wm-pick-ergebnis-box { background: #1b1e20; border-color: #3a434c; color: #d7dee2; }
html[data-theme="dark"] .wm-region-tag { background: #1e2a38; border-color: #2d4a66; color: #7ec2ff; }
html[data-theme="dark"] #wm_form legend { border-color: #3a434c; color: #e6ebee; }
html[data-theme="dark"] .wm-pick-iframe-wrap { background: #111; border-color: #3a434c; }
html[data-theme="dark"] .wm-kpi small { color: #9aa4ab; }
/* Modals des Web-Monitors im Dark-Mode (via :has, moderne Browser) */
html[data-theme="dark"] .modal:has(#wm_form) .modal-content,
html[data-theme="dark"] .modal:has(#wm_pick_source) .modal-content,
html[data-theme="dark"] .modal:has(#wm_detail_chart) .modal-content {
    background: #232629; color: #d7dee2; border-color: #3a434c;
}
html[data-theme="dark"] .modal:has(#wm_form) .modal-header,
html[data-theme="dark"] .modal:has(#wm_form) .modal-footer,
html[data-theme="dark"] .modal:has(#wm_pick_source) .modal-header,
html[data-theme="dark"] .modal:has(#wm_pick_source) .modal-footer,
html[data-theme="dark"] .modal:has(#wm_detail_chart) .modal-header,
html[data-theme="dark"] .modal:has(#wm_detail_chart) .modal-footer { border-color: #3a434c; }
