/* Picture blocks of the page grammar (ui/blocks.js). KONZEPT-AI-STUDIO Teil I.4/I.5:
   controls are white/grey (no accent hue, no blue); colour only carries status (--st-*). */

/* status icons */
.x-st { display: inline-flex; align-items: center; flex: none; }
.x-st .lucide { width: 15px; height: 15px; }
.x-st--ok { color: var(--st-ok); } .x-st--warn { color: var(--st-warn); } .x-st--crit { color: var(--st-crit); }
.x-st--active { color: var(--text-primary); } .x-st--idle { color: var(--st-idle); } .x-st--blind { color: var(--text-muted); }
.x-st--active .lucide, .x-spin { animation: x-rot 1.2s linear infinite; }
@keyframes x-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .x-st--active .lucide, .x-spin { animation: none; } }

/* key-figure tiles */
.x-kt { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
/* phone: two tiles per row, every tile fully visible (no sideways swipe row with a cut tile) */
@media (max-width: 719px) { .x-kt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.x-kt-i { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card, 14px);
  background: var(--setting-panel); color: var(--text-primary); text-align: left; font: inherit; overflow: hidden; }
.x-kt-i.is-btn { cursor: pointer; } .x-kt-i.is-btn:hover { border-color: var(--border-strong); }
.x-kt-i.is-on { border-color: var(--text-primary); }
.x-kt-l { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; min-width: 0; }
.x-kt-l > span:not(.x-i) { overflow: hidden; text-overflow: ellipsis; }
.x-kt-l .lucide { width: 15px; height: 15px; flex: none; }
.x-kt-v { font-size: 25px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-kt-i .x-spark { position: absolute; right: 12px; bottom: 12px; width: 64px; height: 22px; color: var(--text-muted); }
.x-kt-i--ok { box-shadow: inset 3px 0 0 var(--st-ok); } .x-kt-i--ok .x-kt-l .lucide { color: var(--st-ok); }
.x-kt-i--warn { box-shadow: inset 3px 0 0 var(--st-warn); } .x-kt-i--warn .x-kt-l .lucide { color: var(--st-warn); }
.x-kt-i--crit { box-shadow: inset 3px 0 0 var(--st-crit); } .x-kt-i--crit .x-kt-l .lucide { color: var(--st-crit); }
.x-kt-i--active .x-kt-l > .lucide:first-child { animation: x-rot 1.2s linear infinite; }
.x-kt-i--idle .x-kt-v { color: var(--text-secondary); }
.x-kt-i--blind .x-kt-v { color: var(--text-muted); font-size: 15px; }

/* blocks of the picture surface */
.x-blk { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card, 14px); background: var(--setting-panel); }
.x-blk-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 24px; min-width: 0; }
.x-blk-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 700; min-width: 0; }
.x-blk-h h2 > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-blk-h h2 .lucide { width: 17px; height: 17px; flex: none; color: var(--text-secondary); }
.x-blk-r { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; flex: none; max-width: 100%; min-width: 0; }
.x-blk-b { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* segmented choice */
.x-choice { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--surface-1); min-width: 0; }
.x-choice-b { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 32px; padding: 4px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; min-width: 0; }
.x-choice-b > .lucide { width: 15px; height: 15px; }
.x-choice-b small { font-size: 11px; font-weight: 500; opacity: .75; }
.x-choice-b:hover:not(:disabled):not(.is-on) { color: var(--text-primary); }
.x-choice-b.is-on { background: var(--text-primary); color: var(--app-bg); }
.x-choice-b:disabled { opacity: .4; cursor: default; }
@media (pointer: coarse) { .x-choice-b { min-height: 44px; } }

/* switch */
.x-switch { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.x-switch-l { flex: 1 1 auto; min-width: 0; }
.x-switch-t { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-active); flex: none; transition: background .15s; }
.x-switch-k { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-secondary); transition: transform .15s, background .15s; }
.x-switch[aria-checked="true"] .x-switch-t { background: var(--text-primary); }
.x-switch[aria-checked="true"] .x-switch-k { transform: translateX(16px); background: var(--app-bg); }
@media (pointer: coarse) { .x-switch { min-height: 44px; } }

/* step pills */
.x-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.x-step { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-1); color: var(--text-muted); overflow: hidden; white-space: nowrap; }
.x-step .lucide { width: 12px; height: 12px; }
.x-step--done { background: var(--text-primary); color: var(--app-bg); }
.x-step--active { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1.5px var(--text-primary); }
.x-step--failed { background: transparent; color: var(--st-crit); box-shadow: inset 0 0 0 1.5px var(--st-crit); }
.x-step-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--text-primary); }

/* "not delivered yet" */
.x-state--missing { color: var(--text-secondary); font-size: 13px; } .x-state--missing .x-state-i { color: var(--text-muted); }
/* an "i" inside a tile caption sits right after the label */
.x-kt-l .as2-f-i { width: 18px; height: 18px; flex: none; }
/* the short line under a key figure */
.x-kt-s { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* deadline ring (ui/blocks.js deadlineRing) */
.x-ring-s { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.x-ring-s svg { position: absolute; inset: 0; }
.x-ring-s-t { stroke: var(--surface-active); }
.x-ring-s-f { stroke: var(--st-ok); transition: stroke-dashoffset .6s ease; }
.x-ring-s--warn .x-ring-s-f { stroke: var(--st-warn); }
.x-ring-s--crit .x-ring-s-f { stroke: var(--st-crit); }
.x-ring-s--idle .x-ring-s-f { stroke: var(--st-idle); }
.x-ring-s-c { position: relative; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
