/* detail.css: Detailansicht eines Hosts oder Services. Teil der Weboberfläche, Reihenfolge siehe index.html. */

/* ==========================================================================
   Detailansicht
   ========================================================================== */
.detail-head { display: flex; gap: 14px; align-items: stretch; }
.detail-head .state-box { margin: 0; min-width: 100px; display: flex; flex-direction: column; justify-content: center; border-radius: 8px; }
.detail-head .titles { min-width: 0; }
.detail-head .titles h1 { margin: 0; }
.detail-head .titles .sub { color: var(--muted); font-size: 12.5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn:hover { background: var(--row-hover); border-color: var(--muted); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--critical); }
.btn.danger:hover { background: var(--critical-soft); border-color: var(--critical); }
.btn.small { padding: 2px 9px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: default; }

.section-title { display: flex; align-items: center; margin: 24px 20px 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
pre.output { margin: 0 20px; padding: 11px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
/* bereinigte HTML-Plugin-Ausgabe */
div.output.html { margin: 0 20px; padding: 11px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.55; overflow-x: auto; word-break: break-word; }
div.output.html > :first-child { margin-top: 0; }
div.output.html > :last-child { margin-bottom: 0; }
div.output.html p, div.output.html ul, div.output.html ol, div.output.html table, div.output.html pre, div.output.html blockquote { margin: 0 0 8px; }
div.output.html h1, div.output.html h2, div.output.html h3, div.output.html h4, div.output.html h5, div.output.html h6 { font-size: 14px; margin: 8px 0 4px; }
div.output.html a[href] { color: var(--accent); }
div.output.html code, div.output.html pre { font: 12px/1.5 var(--mono); }
div.output.html pre { white-space: pre-wrap; }
div.output.html table { border-collapse: collapse; }
div.output.html th, div.output.html td { border: 1px solid var(--border); padding: 3px 8px; text-align: left; vertical-align: top; }
div.output.html th { background: var(--panel); font-weight: 600; }
div.output.html blockquote { padding-left: 10px; border-left: 3px solid var(--border); color: var(--muted); }
div.output.html hr { border: 0; border-top: 1px solid var(--border); }
table.kv { margin: 0 20px; border-collapse: collapse; width: calc(100% - 40px); }
table.kv th, table.kv td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; font-weight: normal; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
table.kv th { color: var(--muted); width: 40%; }
table.kv td.mono { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
table.grid { margin: 0 20px; border-collapse: collapse; width: calc(100% - 40px); font-size: 13px; }
table.grid th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; background: var(--panel-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
table.grid th:first-child { border-top-left-radius: var(--radius); }
table.grid th:last-child { border-top-right-radius: var(--radius); }
table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid tbody tr:hover > td { background: var(--row-hover); }
table.grid.full { margin: 0; width: 100%; }
table.grid.full th { border-top: 0; border-radius: 0; }
.perf-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; min-width: 80px; margin-top: 7px; }
.perf-bar span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 34px; height: 20px; appearance: none; background: var(--border-strong); border-radius: 10px; position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { left: 16px; }
.switch input:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.switch input:disabled { opacity: .45; cursor: not-allowed; }
.ev-icon { display: inline-block; width: 22px; text-align: center; color: var(--muted); }
.notice { margin: 12px 20px 0; padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-left: 3px solid var(--accent); font-size: 13px; }
.notice.ack { border-color: color-mix(in srgb, var(--ok) 30%, transparent); border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.notice.dt { border-color: color-mix(in srgb, var(--unknown) 30%, transparent); border-left-color: var(--unknown); background: color-mix(in srgb, var(--unknown) 8%, var(--panel)); }
.notice.sticky { border-color: color-mix(in srgb, var(--warning) 40%, transparent); border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, var(--panel)); }
.notice.sticky .sticky-text { white-space: pre-wrap; }

/* Sticky-Kommentare: Notiz in Listenzeilen, aufklappbarer Kasten unter der Ausgabe */
.sticky-pin { margin-left: 4px; padding: 0 4px; border: 1px solid transparent; border-radius: var(--radius); background: none; cursor: pointer; font: inherit; font-weight: normal; line-height: 1.3; }
.sticky-pin:hover, .sticky-pin.open { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.sticky-pin small { margin-left: 1px; color: var(--muted); }
.note-icon { display: inline-block; vertical-align: -2px; flex: none; }
.sticky-pin .note-icon { vertical-align: -3px; }
.sticky-box { margin-top: 6px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); border-left: 3px solid var(--warning); border-radius: var(--radius); background: color-mix(in srgb, var(--warning) 10%, var(--panel)); font-weight: normal; cursor: text; }
.sticky-comment + .sticky-comment { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.sticky-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sticky-comment small { color: var(--muted); }
.sticky-badge { font-size: 11px; color: var(--muted); white-space: nowrap; }
.comment-text { white-space: pre-wrap; }
