/* dev/dev.css — imported by all dev tools in addition to shared.css */

/* .ts-workbench moved to shared/shared.css (used by finance/legal/hr tools too) */

.ts-workbench-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 820px) { .ts-workbench-4 { grid-template-columns: 1fr; } }

/* Code / structured output */
.ts-code-output {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
  min-height: 60px;
}
textarea.ts-code-input {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
  min-height: 220px;
}

/* JSON / code syntax highlight */
.ts-json-key  { color: var(--color-accent); }
.ts-json-str  { color: #1D9E75; }
.ts-json-num  { color: #2563EB; }
.ts-json-bool { color: #D97706; }
.ts-json-null { color: var(--color-muted); }
.ts-kw        { color: var(--color-accent); font-weight: 600; }
.ts-comment   { color: var(--color-muted); font-style: italic; }
[data-theme="dark"] .ts-json-str { color: #4ADE80; }
[data-theme="dark"] .ts-json-num { color: #7B9CFF; }

/* Match highlight */
.ts-match { background: #FFF3CD; border-radius: 2px; padding: 0 1px; }
[data-theme="dark"] .ts-match { background: rgba(251,191,36,0.25); color: #FCD34D; }

/* Error line / message */
.ts-error-line { background: rgba(220,38,38,0.08); border-left: 2px solid var(--color-danger); padding-left: 8px; }
.ts-err-msg { font-family: var(--font-mono); font-size: 12px; color: var(--color-danger); }
.ts-ok-msg  { font-size: 12px; color: var(--color-success); }

/* Field annotation row (CronLab) */
.ts-field-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px;
  font-size: 11px; color: var(--color-muted); font-family: var(--font-mono); margin-top: 6px;
}
.ts-field-row span {
  text-align: center; padding: 6px 4px; background: var(--color-bg-soft);
  border-radius: var(--radius-sm); border: 0.5px solid var(--color-border);
  min-width: 0; overflow-wrap: anywhere;
}
.ts-field-row span b { display: block; color: var(--color-text); font-size: 13px; overflow-wrap: anywhere; word-break: break-word; }
.ts-field-row span.active { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent); }

/* Pill tabs moved to shared/shared.css (used by marketing tools too) */

/* DiffCheck */
.diff-out { max-height: 480px; overflow-y: auto; }
.diff-out > div { white-space: pre-wrap; word-break: break-word; padding: 1px 6px; border-radius: 3px; }
.diff-add { background: rgba(29,158,117,0.12); color: var(--color-success); }
.diff-del { background: rgba(220,38,38,0.10); color: var(--color-danger); }
.diff-same { color: var(--color-muted); }

/* WSTester log */
.ws-log > div { padding: 3px 0; border-bottom: 0.5px solid var(--color-border); word-break: break-word; }
.ws-sent { color: var(--color-accent); }
.ws-recv { color: var(--color-success); }
.ws-sys { color: var(--color-muted); font-style: italic; }

/* CodePlay */
.play-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.play-grid > * { min-width: 0; }
@media (max-width: 900px) { .play-grid { grid-template-columns: 1fr; } }
.play-editor .ts-textarea { min-height: 220px; font-size: 12.5px; }
.play-preview { width: 100%; height: 340px; border: 0.5px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }

/* RegexLab cheat sheet */
.rx-cheat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; font-size: 12px; color: var(--color-muted); }
.rx-cheat code { font-family: var(--font-mono); color: var(--color-accent); background: var(--color-bg-soft); padding: 1px 5px; border-radius: 4px; margin-right: 4px; }

/* Data table (CSVExplore, TimezoneNow, cron next runs) */
.ts-tz-table { width: 100%; border-collapse: collapse; font-size: 13px; font-family: var(--font-mono); }
.ts-tz-table th {
  font-family: var(--font-body); font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--color-muted); padding: 8px 12px;
  border-bottom: 0.5px solid var(--color-border); text-align: left;
  position: sticky; top: 0; background: var(--color-surface); cursor: pointer; white-space: nowrap;
}
.ts-tz-table td { padding: 7px 12px; border-bottom: 0.5px solid var(--color-border); color: var(--color-text); white-space: nowrap; }
.ts-tz-table tr:last-child td { border-bottom: none; }
.ts-tz-table tr:hover td { background: var(--color-bg-soft); }

/* Calendar heatmap (CronLab) */
.ts-heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 12px; }
.ts-heatmap-cell {
  aspect-ratio: 1; border-radius: 3px; background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border); display: flex; align-items: center;
  justify-content: center; font-size: 9px; color: var(--color-muted); cursor: default;
}
.ts-heatmap-cell[data-count="1"] { background: #C7D2FE; border-color: #A5B4FC; }
.ts-heatmap-cell[data-count="2"] { background: #818CF8; border-color: #6366F1; color: white; }
.ts-heatmap-cell[data-count="3"] { background: #5B6CF0; border-color: #4555E0; color: white; }
.ts-heatmap-cell[data-count="4"] { background: #3730A3; border-color: #312E81; color: white; }

/* NL input strip (CronLab) */
.ts-nl-strip { display: flex; gap: 8px; align-items: center; padding: 10px 14px;
  background: var(--color-accent-soft); border-radius: var(--radius-md); margin-top: 12px; }
.ts-nl-strip input { flex: 1; border: none; background: transparent; font-size: 13px;
  color: var(--color-text); font-family: var(--font-body); outline: none; }
.ts-nl-strip input::placeholder { color: var(--color-muted); }

/* Badges / status pills */
.dev-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--color-accent-soft);
  color: var(--color-accent); border: 0.5px solid var(--color-border); }
.dev-badge.ok   { background: rgba(29,158,117,0.12); color: var(--color-success); }
.dev-badge.bad  { background: rgba(220,38,38,0.10);  color: var(--color-danger); }
.dev-badge.warn { background: rgba(217,119,6,0.12);  color: var(--color-warning); }

/* JWT panels */
.jwt-part-h { color: var(--color-danger); }
.jwt-part-p { color: var(--color-accent); }
.jwt-part-s { color: var(--color-success); }

/* Contrast checker */
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .cc-grid { grid-template-columns: 1fr; } }
.cc-field { display: flex; align-items: center; gap: 10px; }
.cc-field input[type="color"] { width: 44px; height: 40px; border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md); background: none; cursor: pointer; padding: 2px; }
.cc-preview { border-radius: var(--radius-lg); padding: 28px; text-align: center; font-size: 20px;
  border: 0.5px solid var(--color-border); margin-top: 4px; }
.cc-ratio { font-family: var(--font-mono); font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }

/* UUID list */
.uuid-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.uuid-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 7px 10px; }
.uuid-row span { word-break: break-all; }

/* Markdown preview */
.md-preview { background: var(--color-surface); border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md); padding: 16px 18px; min-height: 220px; overflow-y: auto; max-height: 60vh; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 12px 0 8px; line-height: 1.3; }
.md-preview p { margin: 8px 0; }
.md-preview ul, .md-preview ol { margin: 8px 0 8px 22px; }
.md-preview code { font-family: var(--font-mono); font-size: 0.9em; background: var(--color-bg-soft);
  padding: 1px 5px; border-radius: 4px; }
.md-preview pre { background: var(--color-bg-soft); padding: 12px; border-radius: var(--radius-md); overflow-x: auto; }
.md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { border-left: 3px solid var(--color-accent); padding-left: 12px; color: var(--color-muted); margin: 8px 0; }
.md-preview a { color: var(--color-accent); }
.md-preview table { border-collapse: collapse; }
.md-preview td, .md-preview th { border: 0.5px solid var(--color-border); padding: 6px 10px; }

/* HTML preview iframe */
.html-frame { width: 100%; min-height: 340px; border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md); background: #fff; }

/* Regex bits */
.rx-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.rx-flag { font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border-radius: var(--radius-md);
  border: 0.5px solid var(--color-border); background: var(--color-bg-soft); color: var(--color-muted); cursor: pointer; }
.rx-flag.on { background: var(--color-accent-soft); color: var(--color-accent); border-color: var(--color-accent); }
.rx-test { white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; }

/* Toolbar (markdown) */
.dev-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.dev-toolbar button { font-size: 12px; padding: 5px 9px; border: 0.5px solid var(--color-border);
  background: var(--color-surface); color: var(--color-muted); border-radius: var(--radius-sm); cursor: pointer; }
.dev-toolbar button:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* Builder rows (cron) */
.cron-builder-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.cron-builder-row label { font-size: 13px; color: var(--color-muted); }
.cron-builder-row > .dev-row { min-width: 0; }

.dev-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.dev-muted { color: var(--color-muted); font-size: 12px; }

/* ── Interactive world map ──────────────────────────────────────────────── */
.tz-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.5px solid var(--color-border);
  background: color-mix(in srgb, var(--color-accent-soft) 35%, var(--color-bg-soft));
}
.tzm-svg { display: block; width: 100%; height: auto; }
.tzm-sea { fill: transparent; }
.tzm-land { fill: var(--color-accent); opacity: 0.32; }
[data-theme="dark"] .tzm-land { opacity: 0.4; }
.tzm-night { fill: #0B1130; opacity: 0.5; }
[data-theme="dark"] .tzm-night { fill: #000006; opacity: 0.68; }
.tzm-terminator { stroke: var(--color-warning); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: 0.7; }
.tzm-suntag { font-size: 11px; opacity: 0.75; }

.tzm-sweep {
  fill: var(--color-accent);
  opacity: 0.05;
  animation: tzmSweep 9s linear infinite;
}
@keyframes tzmSweep { from { transform: translateX(0); } to { transform: translateX(960px); } }

.tzm-arc {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.55;
  stroke-dasharray: 4 5;
  animation: tzmFlow 1.6s linear infinite;
}
@keyframes tzmFlow { to { stroke-dashoffset: -18; } }

.tz-map-wrap { position: relative; }
.tzm-marker { cursor: pointer; }
.tzm-hit { fill: transparent; }  /* enlarged invisible hover/click target */
.tzm-dot {
  r: 4.6;
  fill: var(--color-muted);
  stroke: var(--color-bg);
  stroke-width: 1.6;
  transition: fill var(--transition), r var(--transition);
}
.tzm-ring {
  r: 4.6;
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 1.5;
  opacity: 0;
}
.tzm-marker:hover .tzm-dot { fill: var(--color-accent); r: 6.4; }
.tzm-marker.on .tzm-dot { fill: var(--color-accent); r: 5.6; }
.tzm-marker.on .tzm-ring {
  stroke: var(--color-accent);
  animation: tzmPulse 2.2s ease-out infinite;
  animation-delay: inherit;
}
@keyframes tzmPulse {
  0%   { r: 5.6; opacity: 0.55; }
  100% { r: 17;  opacity: 0; }
}

/* Hover tooltip (city + local time) */
.tzm-tip {
  position: absolute;
  transform: translate(-50%, -115%);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
  .tzm-sweep { display: none; }
  .tzm-arc { animation: none; stroke-dasharray: none; }
  .tzm-ring { animation: none !important; }
}

/* Time slider (TZConvert) */
.tz-slider-wrap { padding: 4px 2px; }
.tz-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 999px; background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border); outline: none;
}
.tz-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid var(--color-bg); cursor: pointer;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.tz-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent);
  border: 2px solid var(--color-bg); cursor: pointer; box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.tz-slider-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--color-muted); margin-top: 4px; font-family: var(--font-mono); }

/* Convert result rows */
.tzc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border); margin-bottom: 8px;
}
.tzc-row .tzc-name { font-size: 13px; font-weight: 500; color: var(--color-text); }
.tzc-row .tzc-off { font-size: 11px; color: var(--color-muted); font-family: var(--font-mono); }
.tzc-row .tzc-time { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--color-accent); }
.tzc-row .tzc-day { font-size: 10px; color: var(--color-muted); margin-left: 6px; }
.tzc-remove { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.tzc-remove:hover { color: var(--color-danger); }

/* Timezone meeting planner */
.tz-planner { border-collapse: collapse; font-family: var(--font-mono); font-size: 11px; }
.tz-planner th, .tz-planner td { border: 0.5px solid var(--color-border); text-align: center; padding: 4px 6px; color: var(--color-muted); }
.tz-planner td:first-child, .tz-planner th:first-child { text-align: left; color: var(--color-text); white-space: nowrap; position: sticky; left: 0; background: var(--color-surface); }
.tz-planner td.work { background: var(--color-accent-soft); color: var(--color-accent); }
.tz-planner td.ov { background: var(--color-accent); }
.tz-remove { cursor: pointer; color: var(--color-muted); background: none; border: none; font-size: 15px; }
.tz-remove:hover { color: var(--color-danger); }

/* World map: persistent labels on selected cities + fullscreen mode */
.tzm-label { font-size: 9px; font-family: var(--font-body); fill: var(--color-text); paint-order: stroke; stroke: var(--color-surface); stroke-width: 2.5px; pointer-events: none; }
.tz-map-wrap:fullscreen { background: var(--color-bg); display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; }
.tz-map-wrap:fullscreen > div, .tz-map-wrap:fullscreen svg { width: 100%; height: auto; max-height: 92vh; }

/* WorldClock — themed analog clocks */
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.wc-grid:fullscreen { background: #0b0e14; padding: 4vh 4vw; align-content: center; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.wc-clock { position: relative; background: var(--color-surface); border: 0.5px solid var(--color-border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.wc-face { width: 100%; max-width: 240px; }
.wc-dial { fill: var(--color-bg-soft); stroke: var(--color-border); stroke-width: 1; }
.wc-tick { stroke: var(--color-muted); stroke-width: 0.7; }
.wc-tick.major { stroke: var(--color-text); stroke-width: 1.6; }
.wc-hand { stroke-linecap: round; }
.wc-hour { stroke: var(--color-text); stroke-width: 3.4; }
.wc-minute { stroke: var(--color-text); stroke-width: 2.2; }
.wc-second { stroke: var(--color-danger); stroke-width: 1; }
.wc-hub { fill: var(--color-text); }
.wc-city { font-weight: 600; font-size: 15px; color: var(--color-text); margin-top: 10px; }
.wc-sub { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.wc-rm { position: absolute; top: 10px; right: 12px; }
.wc-night .wc-dial { fill: #141824; }
.wc-night .wc-city::after { content: ' 🌙'; font-size: 11px; }

/* Airport theme: dark dial, bold Swiss-railway look */
[data-wc-theme="airport"] .wc-dial { fill: #10131c; stroke: #2a3040; }
[data-wc-theme="airport"] .wc-tick { stroke: #e8eaf0; stroke-width: 1; }
[data-wc-theme="airport"] .wc-tick.major { stroke: #ffffff; stroke-width: 2.4; }
[data-wc-theme="airport"] .wc-hour, [data-wc-theme="airport"] .wc-minute { stroke: #ffffff; }
[data-wc-theme="airport"] .wc-second { stroke: #e63946; stroke-width: 1.4; }
[data-wc-theme="airport"] .wc-hub { fill: #e63946; }

/* Classic theme: light dial, thin elegant hands */
[data-wc-theme="classic"] .wc-dial { fill: #faf8f2; stroke: #d8d2c4; }
[data-wc-theme="classic"] .wc-tick { stroke: #8a8470; }
[data-wc-theme="classic"] .wc-tick.major { stroke: #3c382e; }
[data-wc-theme="classic"] .wc-hour { stroke: #3c382e; stroke-width: 2.6; }
[data-wc-theme="classic"] .wc-minute { stroke: #3c382e; stroke-width: 1.6; }
[data-wc-theme="classic"] .wc-second { stroke: #b8860b; }
[data-wc-theme="classic"] .wc-hub { fill: #3c382e; }

/* Minimal theme: no minor ticks, hairline hands */
[data-wc-theme="minimal"] .wc-tick { display: none; }
[data-wc-theme="minimal"] .wc-tick.major { display: initial; stroke-width: 0.8; }
[data-wc-theme="minimal"] .wc-second { display: none; }
.tzm-labelbox { pointer-events: none; }
