/* kod-editoru.css — CodeEditor bileşeni (frontend/_shared/kod-editoru). Yalnız sunum; renkler AA kontrastlıdır (yazı >= 4.5:1). */
.ke {
  --ke-bg: #1e222d; --ke-fg: #d1d4dc; --ke-gutter-fg: #8b909d; --ke-gutter-bg: #1e222d; --ke-gutter-line: #2a2e39;
  --ke-cur: #2a2e39; --ke-sel: rgba(41, 98, 255, .45); --ke-caret: #ffffff;
  --ke-kw: #6cb2ff; --ke-fn: #c8a6ff; --ke-cs: #4fd6bd; --ke-nu: #f2a65e; --ke-st: #9fdc82; --ke-cm: #8e97aa; --ke-op: #a7b0c4; --ke-p: #d1d4dc;
  --ke-err: #ff6b6b; --ke-warn: #ffb74d; --ke-info: #6cb2ff; --ke-br-bg: rgba(108, 178, 255, .28); --ke-br-bd: #6cb2ff;
  --ke-fnd: rgba(255, 183, 77, .30); --ke-fnd-cur: rgba(255, 183, 77, .65);
  --ke-font: 'JetBrains Mono', 'Cascadia Mono', 'Cascadia Code', 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Liberation Mono', monospace;
  position: relative; display: flex; flex-direction: row; min-height: 0; min-width: 0;
  background: var(--ke-bg); color: var(--ke-fg); font-family: var(--ke-font); font-size: 13px; line-height: 20px;
}
:root[data-theme="light"] .ke {
  --ke-bg: #ffffff; --ke-fg: #1f2937; --ke-gutter-fg: #5b6472; --ke-gutter-bg: #f5f7fa; --ke-gutter-line: #e1e5ec;
  --ke-cur: #eef3fb; --ke-sel: rgba(41, 98, 255, .25); --ke-caret: #111827;
  --ke-kw: #0b5fc7; --ke-fn: #6a3fb8; --ke-cs: #0b7a6b; --ke-nu: #a64b00; --ke-st: #2d6f1c; --ke-cm: #5f6b7a; --ke-op: #475467; --ke-p: #1f2937;
  --ke-err: #c62828; --ke-warn: #a15c00; --ke-info: #0b5fc7; --ke-br-bg: rgba(11, 95, 199, .16); --ke-br-bd: #0b5fc7;
  --ke-fnd: rgba(255, 193, 7, .35); --ke-fnd-cur: rgba(255, 152, 0, .55);
}
.ke-body { flex: 1 1 auto; display: flex; align-items: stretch; overflow: auto; min-height: 0; position: relative; background: var(--ke-bg); }
.ke-gutter {
  --ke-digits: 2; position: sticky; left: 0; z-index: 2; flex: none; box-sizing: content-box; width: calc(var(--ke-digits) * 1ch + 34px);
  padding: 6px 0; background: var(--ke-gutter-bg); border-inline-end: 1px solid var(--ke-gutter-line); color: var(--ke-gutter-fg);
  user-select: none; -webkit-user-select: none; cursor: default;
}
.ke-gl { display: flex; align-items: center; justify-content: flex-end; height: 20px; padding-inline-end: 8px; }
.ke-gl.ke-cur { background: var(--ke-cur); color: var(--ke-fg); }
.ke-gn { min-width: calc(var(--ke-digits) * 1ch); text-align: end; font-variant-numeric: tabular-nums; }
.ke-gm { width: 18px; text-align: center; font-size: 10px; font-weight: 700; line-height: 20px; }
.ke-gm-error { color: var(--ke-err); cursor: help; }
.ke-gm-warning { color: var(--ke-warn); cursor: help; }
.ke-gm-info { color: var(--ke-info); cursor: help; font-style: italic; }
.ke-stack { position: relative; flex: 1 0 auto; min-width: 0; }
.ke-code, .ke-input {
  margin: 0; border: 0; padding: 6px 24px 6px 12px; font: inherit; line-height: 20px; letter-spacing: 0; tab-size: 4; -moz-tab-size: 4;
  white-space: pre; word-wrap: normal; overflow-wrap: normal; font-variant-ligatures: none; font-kerning: none; text-rendering: auto;
}
.ke-code { position: relative; display: block; min-height: 100%; min-width: 100%; box-sizing: border-box; color: var(--ke-p); pointer-events: none; }
.ke-code::after { content: ''; display: block; height: 2px; }
.ke-l { min-height: 20px; }
.ke-l.ke-cur { background: var(--ke-cur); }
.ke-input {
  position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; resize: none; overflow: hidden; background: transparent;
  color: transparent; caret-color: var(--ke-caret); outline: none; z-index: 1;
}
.ke-input::selection { background: var(--ke-sel); color: transparent; }
.ke-body:focus-within { box-shadow: inset 0 0 0 1px var(--color-accent-primary, #1295EB); }
.ke-t-kw { color: var(--ke-kw); font-weight: 600; }
.ke-t-fn { color: var(--ke-fn); }
.ke-t-cs { color: var(--ke-cs); }
.ke-t-nu { color: var(--ke-nu); }
.ke-t-st { color: var(--ke-st); }
.ke-t-cm { color: var(--ke-cm); font-style: italic; }
.ke-t-op { color: var(--ke-op); }
.ke-t-p { color: var(--ke-p); }
.ke-err { text-decoration: underline wavy var(--ke-err); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ke-warn { text-decoration: underline dashed var(--ke-warn); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ke-info { text-decoration: underline dotted var(--ke-info); text-underline-offset: 3px; }
.ke-br { background: var(--ke-br-bg); outline: 1px solid var(--ke-br-bd); outline-offset: -1px; border-radius: 2px; }
.ke-fnd { background: var(--ke-fnd); border-radius: 2px; }
.ke-fnd-cur { background: var(--ke-fnd-cur); outline: 1px solid var(--ke-warn); }
.ke-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ke-probe { position: absolute; visibility: hidden; white-space: pre; pointer-events: none; font: inherit; left: -9999px; top: 0; }
.ke-tip {
  position: absolute; z-index: 6; max-width: min(520px, 90%); padding: 6px 10px; border-radius: 6px; font-family: system-ui, sans-serif; font-size: 12px; line-height: 1.4;
  background: #131722; color: #fff; border: 1px solid var(--ke-err); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); pointer-events: none;
}
:root[data-theme="light"] .ke-tip { background: #ffffff; color: #1f2937; }
.ke-tip-warning { border-color: var(--ke-warn); }
.ke-tip-info { border-color: var(--ke-info); }
.ke-find {
  position: absolute; z-index: 5; top: 6px; inset-inline-end: 22px; display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  background: var(--ke-gutter-bg); border: 1px solid var(--ke-gutter-line); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  font-family: system-ui, sans-serif; font-size: 12px;
}
.ke-find[hidden] { display: none; }
.ke-find-in { width: 150px; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--ke-gutter-line); background: var(--ke-bg); color: var(--ke-fg); font: inherit; }
.ke-find-cnt { min-width: 44px; text-align: center; color: var(--ke-gutter-fg); }
.ke-find-btn { min-width: 26px; height: 26px; border-radius: 4px; border: 0; background: transparent; color: var(--ke-fg); cursor: pointer; font-size: 14px; }
.ke-find-btn:hover { background: var(--ke-cur); }
.ke-find-in:focus-visible, .ke-find-btn:focus-visible { outline: 2px solid var(--color-accent-primary, #1295EB); outline-offset: 1px; }
@media (forced-colors: active) {
  .ke-input { color: CanvasText; }
  .ke-code { visibility: hidden; }
}
.ke-minimap { flex: none; width: 84px; background: var(--ke-gutter-bg); border-inline-start: 1px solid var(--ke-gutter-line); cursor: pointer; touch-action: none; }
.ke-compact { font-size: 12px; line-height: 18px; }
.ke-compact .ke-code, .ke-compact .ke-input { line-height: 18px; padding-top: 4px; padding-bottom: 4px; }
.ke-compact .ke-l, .ke-compact .ke-gl { height: 18px; min-height: 18px; }
@media (max-width: 640px) { .ke-minimap { display: none !important; } }
/* ConsolePanel (konsol-paneli.js) */
.kp { overflow: auto; font-family: var(--ke-font, ui-monospace, Consolas, monospace); font-size: 12px; }
.kp-head { display: flex; justify-content: flex-end; }
.kp-clear { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 4px; font: inherit; padding: 1px 8px; cursor: pointer; opacity: .85; }
.kp-list { list-style: none; margin: 0; padding: 0; }
.kp-item { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; flex-wrap: wrap; }
.kp-ico { width: 14px; text-align: center; font-weight: 700; flex: none; }
.kp-time { opacity: .75; flex: none; font-variant-numeric: tabular-nums; }
.kp-err .kp-ico, .kp-err .kp-text { color: #ff6b6b; }
.kp-warn .kp-ico, .kp-warn .kp-text { color: #ffb74d; }
.kp-ok .kp-ico, .kp-ok .kp-text { color: #4cd08a; }
:root[data-theme="light"] .kp-err .kp-ico, :root[data-theme="light"] .kp-err .kp-text { color: #c62828; }
:root[data-theme="light"] .kp-warn .kp-ico, :root[data-theme="light"] .kp-warn .kp-text { color: #8a5300; }
:root[data-theme="light"] .kp-ok .kp-ico, :root[data-theme="light"] .kp-ok .kp-text { color: #0f7a3c; }
.kp-link { background: none; border: 0; padding: 0; color: #6cb2ff; text-decoration: underline; cursor: pointer; font: inherit; }
:root[data-theme="light"] .kp-link { color: #0b5fc7; }
.kp-empty { opacity: .8; padding: 6px 0; list-style: none; }
