/* Styles für Erweiterung „sketches“ (Wireframes & Bilder) */
:root {
  --sk-stroke: var(--text-3);
  --sk-ink: var(--text-2);
  --sk-fill: var(--surface);
  --sk-soft: var(--surface-2);
  --sk-paper: var(--surface);
  --sk-grid: var(--surface-3);
}

/* ---------- Galerie ---------- */
.sk-drop { transition: outline-color .15s; outline: 2px dashed transparent; outline-offset: -6px; }
.sk-drop.sk-over { outline-color: var(--accent); }
.sk-drop-hint { margin: 14px 0 0; text-align: center; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.sk-card {
  min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s;
}
.sk-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.sk-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sk-thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden; }
.sk-thumb > svg, .sk-thumb > img { width: 100%; height: 100%; display: block; }
.sk-thumb > img { object-fit: contain; }
.sk-card-body { padding: 10px 12px; min-width: 0; }
.sk-card-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-badge { background: var(--surface-2); color: var(--text-2); }
.sk-missing { font-size: 12px; color: var(--text-3); text-align: center; padding: 12px; }

/* ---------- Verknüpfte Skizzen im Anforderungs-Dialog ---------- */
.sk-linked { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-mini {
  display: flex; flex-direction: column; gap: 4px; width: 96px; padding: 6px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 12px;
}
.sk-mini:hover { border-color: var(--border-strong); }
.sk-mini:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sk-mini-thumb { height: 64px; background: var(--surface-2); border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sk-mini-thumb > svg, .sk-mini-thumb > img { width: 100%; height: 100%; object-fit: contain; }
.sk-mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Detail ---------- */
.sk-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.sk-preview { background: var(--surface-2); border-radius: var(--radius); padding: 12px; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.sk-preview .sk-big { width: 100%; max-height: 60vh; object-fit: contain; display: block; }
.sk-feats { max-height: 260px; }
@media (max-width: 720px) { .sk-detail { grid-template-columns: 1fr; } }

/* ---------- SVG-Darstellung (niedrige Detailtiefe, graue Striche) ---------- */
.sk-svg { font-family: var(--font); }
.sk-frame { fill: var(--sk-paper); stroke: var(--sk-stroke); stroke-width: 2; }
.sk-st { fill: none; stroke: var(--sk-stroke); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sk-st.sk-fill { fill: var(--sk-fill); }
.sk-st.sk-soft { fill: var(--sk-soft); }
.sk-st.sk-thin { stroke-width: 1; opacity: .7; }
.sk-ink { fill: var(--sk-ink); font-size: 15px; }
.sk-ink.sk-strong { font-weight: 600; fill: var(--text); }
.sk-ink.sk-faint { fill: var(--text-3); }
.sk-ink.sk-label { font-size: 13px; fill: var(--text-3); }
.sk-hit { fill: transparent; stroke: none; }
.sk-hitline { stroke: transparent; stroke-width: 14; }

/* ---------- Editor ---------- */
.modal.sk-editor { max-width: 1240px; height: calc(100vh - 40px); }
.modal.sk-editor .modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sk-ed { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.sk-ed-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.sk-ed-top .field { margin-bottom: 0; }
.sk-ed-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk-ed-snap { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; color: var(--text-2); cursor: pointer; }
.sk-ed-canvas { flex: 1; min-height: 240px; overflow: auto; background: var(--surface-2); border-radius: var(--radius); padding: 8px; text-align: center; }
.sk-ed-stage { position: relative; display: inline-block; vertical-align: top; }
.sk-ed-svg { display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; border-radius: var(--radius-sm); }
.sk-ed-svg:focus { outline: none; }
.sk-ed-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sk-ed-svg .sk-s { cursor: move; }
.sk-ed-svg.has-grid { background-image: radial-gradient(var(--sk-grid) 1px, transparent 1px); background-size: 8px 8px; }
.sk-ed-svg.has-grid .sk-frame { fill-opacity: .55; }
.sk-sel { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; pointer-events: none; }
.sk-handle { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; cursor: nwse-resize; }
.sk-ed-text {
  position: absolute; z-index: 2; min-width: 120px; padding: 6px 8px; font: inherit; font-size: 14px; resize: both;
  border: 2px solid var(--accent); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.sk-ed-help { margin: 0; }
.sk-ed-mobile { display: none; margin: 0; }
@media (max-width: 720px) {
  .modal.sk-editor { height: 92vh; }
  .sk-ed-top { grid-template-columns: 1fr; }
  .sk-ed-mobile { display: block; }
  .sk-ed-help { display: none; }
}
