/* AutoVoltCAD — Elektronik devre tasarımı araçları ek stilleri.
   Yalnızca site değişkenlerini (css/style.css :root) kullanır. */

/* Adım adım tasarım listesi */
.ve-steps-panel { margin-top: 24px; display: grid; gap: 12px; }
.ve-steps-panel h2 { font-size: 1.1rem; margin: 0; }
.ve-steps { margin: 0; padding-left: 1.6rem; display: grid; gap: 10px; counter-reset: none; }
.ve-steps li { padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 4px; min-width: 0; }
.ve-steps li::marker { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.ve-steps li.warn { border-color: rgba(245, 180, 0, .55); background: rgba(245, 180, 0, .06); }
.ve-st-t { font-weight: 700; color: var(--text); }
.ve-st-f { font-family: var(--mono); font-size: .86rem; color: var(--cyan); white-space: pre-wrap; overflow-wrap: anywhere; }
.ve-st-r { font-family: var(--mono); font-size: .9rem; color: var(--accent); overflow-wrap: anywhere; }
.ve-st-n { font-size: .85rem; color: var(--muted); }

/* Şema SVG */
.ve-sch-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-width: 0; overflow: hidden; }
.ve-sch { display: block; width: 100%; height: auto; max-height: 460px; }
.ve-sym, .ve-sym * { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ve-sym .ve-fill { fill: var(--text); }
.ve-wire { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ve-dot { fill: var(--cyan); stroke: none; }
.ve-lbl { fill: var(--text); font-family: var(--mono); font-size: 12px; }
.ve-lbl-m { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.ve-lbl-a { fill: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ve-box { fill: var(--bg-2); stroke: var(--text); stroke-width: 2; }

/* Sekmeler */
.ve-tablist { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border-strong); margin-bottom: 20px; }
.ve-tablist [role="tab"] { appearance: none; background: transparent; border: 1px solid transparent; border-bottom: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; min-height: 44px; border-radius: var(--radius) var(--radius) 0 0; cursor: pointer; }
.ve-tablist [role="tab"][aria-selected="true"] { color: var(--accent); background: var(--surface); border-color: var(--border-strong); margin-bottom: -1px; }
.ve-tablist [role="tab"]:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; }

/* Osiloskop */
.ve-scope-ctl { display: grid; gap: 10px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ve-scope-ctl { grid-template-columns: 1fr 1fr; } }
.ve-cur { display: grid; gap: 4px; font-size: .88rem; color: var(--muted); }
.ve-cur b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.ve-cur input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; margin: 0; }
.ve-scope-plot { touch-action: none; cursor: ew-resize; }

/* ================= Devre simülatörü ================= */
.sim-app { display: grid; gap: 16px; min-width: 0; }
.sim-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sim-toolbar .sep { width: 1px; height: 28px; background: var(--border-strong); margin: 0 4px; }
.sim-toolbar .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sim-toolbar select, .sim-toolbar input[type="text"] { min-height: 38px; padding: 6px 10px; width: auto; max-width: 100%; }
.sim-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .sim-main { grid-template-columns: 150px minmax(0, 1fr) 300px; } }
.sim-palette { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
@media (min-width: 1100px) { .sim-palette { flex-direction: column; flex-wrap: nowrap; } }
.sim-palette h2, .sim-side h2 { font-size: .78rem; font-family: var(--mono); color: var(--cyan); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; width: 100%; }
.sim-palette button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.sim-palette button:hover { border-color: var(--accent); }
.sim-palette button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; }
.sim-palette button svg { width: 30px; height: 22px; flex: none; }
.sim-canvas-box { position: relative; min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); overflow: hidden; height: min(68vh, 620px); min-height: 360px; }
.sim-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.sim-canvas:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; }
.sim-canvas.mode-wire { cursor: crosshair; }
.sim-canvas.panning { cursor: grabbing; }
.sim-status { position: absolute; left: 8px; bottom: 6px; right: 8px; font-family: var(--mono); font-size: .75rem; color: var(--muted); pointer-events: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sim-canvas .part .ve-sym, .sim-canvas .part .ve-sym * { pointer-events: none; }
.sim-canvas .part .hit { fill: transparent; stroke: none; pointer-events: all; cursor: move; }
.sim-canvas .part.sel .ve-sym, .sim-canvas .part.sel .ve-sym * { stroke: var(--accent); }
.sim-canvas .part.sel .ve-sym .ve-fill { fill: var(--accent); }
.sim-canvas .whit { stroke: transparent; stroke-width: 12; fill: none; pointer-events: stroke; cursor: pointer; }
.sim-canvas .wsel { stroke: var(--accent); }
.sim-canvas .pin { fill: var(--bg); stroke: var(--muted); stroke-width: 1.2; pointer-events: none; }
.sim-canvas .pin.open { stroke: var(--danger); }
.sim-canvas .ghost { opacity: .55; pointer-events: none; }
.sim-canvas .draft { stroke: var(--accent); stroke-dasharray: 5 4; stroke-width: 2; fill: none; pointer-events: none; }
.sim-canvas .kcur { stroke: var(--accent); stroke-width: 1.2; fill: none; pointer-events: none; }
.sim-canvas .nv-tag rect { fill: rgba(11, 23, 38, .88); stroke: var(--success); stroke-width: 1; }
.sim-canvas .nv-tag text { fill: var(--success); font-family: var(--mono); font-size: 11px; }
.sim-canvas .plbl { fill: var(--text); font-family: var(--mono); font-size: 11px; pointer-events: none; }
.sim-canvas .plbl.id { fill: var(--accent); font-weight: 700; }
.sim-canvas .probe-name { fill: var(--cyan); font-family: var(--mono); font-size: 11px; font-weight: 700; pointer-events: none; }
.sim-side { display: grid; gap: 14px; min-width: 0; }
.sim-side .panel { padding: 14px; display: grid; gap: 10px; }
.sim-side .field label { font-size: .85rem; }
.sim-side input[type="text"], .sim-side select { min-height: 38px; padding: 6px 10px; }
.sim-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.sim-parts button { width: 100%; text-align: left; min-height: 36px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .84rem; font-family: var(--mono); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-parts button[aria-current="true"] { border-color: var(--accent); color: var(--accent); }
.sim-an { display: grid; gap: 16px; }
.sim-an-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ve-check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: .9rem; cursor: pointer; }
.ve-check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); }
.kbd-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 3px; font-size: .88rem; }
kbd { font-family: var(--mono); font-size: .8rem; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; color: var(--text); }
.verify-table td.ok { color: var(--success); font-weight: 700; }
.verify-table td.bad { color: var(--danger); font-weight: 700; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Küçük ekran: hiçbir şey sayfayı yatay taşırmasın */
.sim-main > *, .hesap-layout > *, .plot-panel, .ve-steps-panel { min-width: 0; max-width: 100%; }
.table-scroll .mini-table { min-width: 0; }
@media print { .sim-toolbar, .sim-palette, .sim-side, .ve-scope-ctl, .ve-tablist { display: none !important; } }
