/* Satnam Siri WaheGuru Shaib Ji */
/* datatools.css — the Data Tools multi-output workbench. Uses the shared design tokens from
   main.css (loaded site-wide). Light + dark both covered via those variables. */

.dt-main { padding-top: 24px; padding-bottom: 60px; }
.dt-main [hidden] { display: none !important; }
.dt-main svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dt-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.dt-head h1 { font-size: 1.5rem; letter-spacing: -.02em; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--bg-3); }
.pill svg { width: 14px; height: 14px; }
.pill-client { color: var(--c-teal); border-color: color-mix(in srgb, var(--c-teal) 40%, var(--border)); }

.dt-layout { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; }
.dt-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 4px; }
.dt-seclabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint);
  font-weight: 700; margin: 10px 2px 4px; }
.dt-views { display: flex; flex-direction: column; gap: 2px; }
.dt-vcat { font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 700; margin: 11px 2px 3px; }
.dt-view { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 6px 9px; border-radius: 8px;
  font-size: .89rem; color: var(--text); border: 1px solid transparent; }
.dt-view:hover { background: var(--bg-3); }
.dt-view.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dt-vbadge { width: 26px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none;
  font-family: ui-monospace, monospace; font-weight: 700; font-size: .72rem; }
.dt-vbadge svg { width: 14px; height: 14px; }
.dt-b-auto { background: var(--accent-soft); color: var(--accent); }
.dt-b-structured { background: color-mix(in srgb, var(--c-purple) 16%, transparent); color: var(--c-purple); }
.dt-b-numeric    { background: color-mix(in srgb, var(--c-blue) 16%, transparent);   color: var(--c-blue); }
.dt-b-encoding   { background: color-mix(in srgb, var(--c-amber) 20%, transparent);  color: var(--c-amber); }
.dt-b-web        { background: color-mix(in srgb, var(--c-green) 17%, transparent);  color: var(--c-green); }
.dt-b-text       { background: color-mix(in srgb, var(--c-teal) 17%, transparent);   color: var(--c-teal); }
.dt-gens { display: flex; flex-direction: column; gap: 5px; }
.dt-gen { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: .86rem; }
.dt-gen:hover { border-color: var(--accent); color: var(--accent); }
.dt-gen svg { width: 14px; height: 14px; }
.dt-genout { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; }
.dt-genout code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; word-break: break-all; flex: 1; }
.dt-genout button { flex: none; }
.dt-genhelp { font-size: .74rem; color: var(--muted); line-height: 1.5; margin: 8px 2px 0; }
.dt-genhelp b { color: var(--text); font-family: ui-monospace, monospace; font-weight: 700; }

.dt-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dt-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm); }
.dt-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dt-card-head h2 { font-size: .95rem; margin: 0; }
.dt-actions { display: flex; gap: 6px; }
.dt-mini { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: .78rem; font-weight: 600; }
.dt-mini svg { color: var(--muted); }   /* was inheriting --muted everywhere → faint in dark mode; keep text crisp, icon soft */
.dt-mini:hover, .dt-mini:hover svg { border-color: var(--accent); color: var(--accent); }
.dt-mini svg { width: 14px; height: 14px; }
.dt-mini.copied { color: var(--ok); border-color: var(--ok); }
.dt-area { width: 100%; min-height: 150px; resize: vertical; border: 0; outline: 0; background: transparent;
  color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; }
.dt-area::placeholder { color: var(--faint); }

.dt-detect { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 2px; font-size: .86rem; color: var(--muted); }
.dt-badge { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--accent); }
.dt-badge svg { width: 15px; height: 15px; }
.dt-valid { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.dt-valid svg { width: 14px; height: 14px; }
.dt-valid.ok { color: var(--ok); }
.dt-valid.bad { color: var(--c-red); }
.dt-stats { color: var(--faint); }
.dt-forced { color: var(--faint); font-style: italic; }

.dt-optcard { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; }
.dt-opt { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); }
.dt-opt select { background: var(--bg-3); border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px;
  color: var(--text); font-size: .85rem; }
.dt-toggle { position: relative; display: inline-block; width: 34px; height: 19px; }
.dt-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.dt-toggle .tk { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: .15s; }
.dt-toggle .tk::before { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .15s; }
.dt-toggle input:checked + .tk { background: var(--accent); }
.dt-toggle input:checked + .tk::before { transform: translateX(15px); }

.dt-outputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dt-pane { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.dt-pane-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px;
  border-bottom: 1px solid var(--border-2); background: var(--bg-3); }
.dt-pane-label { font-size: .8rem; font-weight: 700; color: var(--text); }
.dt-out { padding: 11px 13px; overflow-x: auto; flex: 1; }
.dt-out pre { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5;
  white-space: pre; color: var(--text); }
.dt-loading { color: var(--faint); }
.dt-err { color: var(--c-red); font-size: .84rem; }
.dt-swatch-wrap { grid-column: 1/-1; display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: ui-monospace, monospace; font-size: .85rem; }
.dt-swatch { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--border); flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }

/* ambiguous → pick a reading */
.dt-badge-amb { color: var(--muted); font-weight: 700; }
.dt-pick { padding: 20px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg-2); }
.dt-pick-h { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .92rem; color: var(--muted); }
.dt-pick-h svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.dt-pick-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.dt-pill { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-3);
  color: var(--text); font-size: .88rem; font-weight: 600; cursor: pointer; }
.dt-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.dt-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 50px 20px; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg-2); }
.dt-empty svg { width: 34px; height: 34px; color: var(--faint); }

/* mobile drawer + read-mode bar — hidden on desktop, where the sidebar is always visible */
.dt-scrim, .dt-drawer-close, .dt-side-head, .dt-bar { display: none; }
.dt-iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2);
  color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.dt-iconbtn:hover { color: var(--accent); border-color: var(--accent); }
.dt-bar-reset:hover { color: var(--c-red); border-color: var(--c-red); }
.dt-iconbtn svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  .dt-layout { grid-template-columns: 1fr; }
  /* the picker becomes a slide-in drawer, so the input is first in the flow (like Text Tools) */
  .dt-side { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 60;
    background: var(--bg-2); border-right: 1px solid var(--border); border-radius: 0; padding: 14px;
    overflow-y: auto; transform: translateX(-102%); transition: transform .22s; }
  .dt-side.open { transform: none; }
  .dt-side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .dt-drawer-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); margin-left: auto; cursor: pointer; }
  .dt-drawer-close svg { width: 18px; height: 18px; }
  .dt-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55;
    opacity: 0; pointer-events: none; transition: opacity .2s; }
  .dt-scrim.open { opacity: 1; pointer-events: auto; }
  /* read-mode bar, sticky at the bottom — "Auto" by default, ↻ change + × back-to-auto */
  .dt-bar { display: block; position: sticky; bottom: 8px; margin-top: 40px; z-index: 40; order: 5; padding: 0;
    box-shadow: 0 -1px 12px rgba(0, 0, 0, .3); }
  .dt-bar-open { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0;
    background: none; cursor: pointer; color: var(--text); text-align: left; font: inherit; }
  .dt-bar-open > svg:last-child { width: 18px; height: 18px; color: var(--faint); flex: none; }
  .dt-bar-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .dt-bar-tt b { font-size: .95rem; font-weight: 650; }
  .dt-bar-tt small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-bar-top { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
  .dt-outputs { grid-template-columns: 1fr; }
}
/* hayerapps · v0.1.0 */
