/* app/css/timeline.css — /timeline (Visits Over Time + Visits Overview) */
.gs-tl{
  --tl-ink:#1B2733; --tl-mut:#8C95A1; --tl-line:#E9EDF2; --tl-bg:#F7F9FB;
  --tl-blue:#2A6FE8; --tl-blue-soft:rgba(42,111,232,.14);
  --tl-green:#1FA463; --tl-red:#DC2626;
  font-family:'Open Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  color:var(--tl-ink); max-width:100%; min-width:0;
}

/* ---- page head ---- */
.gs-tl .tl-phead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px;}
.gs-tl .tl-eyebrow{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--tl-mut);}
.gs-tl .tl-h1{font-size:22px;font-weight:800;margin:2px 0 0;line-height:1.2;}

/* ---- card ---- */
.gs-tl .tl-card{
  background:#fff;border:1px solid var(--tl-line);border-radius:10px;
  padding:20px 22px 16px;margin-bottom:18px;box-shadow:0 1px 2px rgba(16,24,40,.04);
  min-width:0;overflow:hidden;
}
.gs-tl .tl-card-title{
  font-size:15px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:#5A6672;margin:0 0 12px;
}

/* ---- toolbars ---- */
.gs-tl .tl-tools{display:flex;align-items:center;gap:4px;flex-wrap:wrap;}
.gs-tl .tl-tools-bottom{margin-top:10px;}
.gs-tl .tl-tool{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:32px;min-width:32px;padding:0 6px;border:0;background:transparent;border-radius:6px;
  color:var(--tl-blue);cursor:pointer;font-size:13.5px;font-weight:600;
}
.gs-tl .tl-tool:hover{background:var(--tl-bg);}
.gs-tl .tl-tool svg{width:18px;height:18px;flex:none;}
.gs-tl .tl-tool-wide{padding:0 8px;}

/* dropdown menus */
.gs-tl .tl-period,.gs-tl .tl-nsel{position:relative;}
.gs-tl .tl-menu{
  position:absolute;z-index:20;top:calc(100% + 4px);left:0;min-width:120px;
  background:#fff;border:1px solid var(--tl-line);border-radius:8px;
  box-shadow:0 8px 24px rgba(16,24,40,.12);padding:4px;
}
.gs-tl .tl-menu-up{top:auto;bottom:calc(100% + 4px);left:auto;right:0;min-width:96px;}
.gs-tl .tl-menu button{
  display:block;width:100%;text-align:left;border:0;background:transparent;
  padding:7px 10px;border-radius:6px;font-size:13px;color:var(--tl-ink);cursor:pointer;
}
.gs-tl .tl-menu button:hover{background:var(--tl-bg);}
.gs-tl .tl-menu button[aria-current="true"]{color:var(--tl-blue);font-weight:700;}

/* ---- legend ---- */
.gs-tl .tl-legend{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--tl-ink);margin:6px 0 2px;}
.gs-tl .tl-legend-line{width:18px;height:2px;background:var(--tl-blue);border-radius:2px;display:inline-block;}

/* ---- chart ---- */
.gs-tl .tl-chart{position:relative;width:100%;min-width:0;}
.gs-tl .tl-chart svg{display:block;width:100%;height:auto;}
.gs-tl .tl-loading{padding:28px 0;text-align:center;color:var(--tl-mut);font-size:13px;}
.gs-tl .tl-empty{padding:34px 0;text-align:center;color:var(--tl-mut);font-size:13px;}
.gs-tl .tl-grid{stroke:var(--tl-line);stroke-width:1;}
.gs-tl .tl-axis{fill:var(--tl-mut);font-size:11px;}
.gs-tl .tl-dot{fill:var(--tl-blue);}
.gs-tl .tl-dot-hollow{fill:#fff;stroke:var(--tl-blue);stroke-width:2;}
.gs-tl .tl-hit{fill:transparent;cursor:pointer;}
.gs-tl .tl-tip{
  position:absolute;pointer-events:none;z-index:15;background:#1B2733;color:#fff;
  border-radius:6px;padding:6px 9px;font-size:12px;line-height:1.35;white-space:nowrap;
  box-shadow:0 6px 18px rgba(16,24,40,.22);transform:translate(-50%,-100%);opacity:0;transition:opacity .1s;
}
.gs-tl .tl-tip.on{opacity:1;}
.gs-tl .tl-tip b{font-weight:700;}

/* ---- visits overview ---- */
.gs-tl .tl-ov{display:grid;grid-template-columns:1fr 1fr;gap:12px 34px;}
.gs-tl .tl-row{display:flex;align-items:flex-start;gap:14px;padding:6px 0;min-width:0;}
.gs-tl .tl-spark{flex:none;width:130px;height:34px;}
.gs-tl .tl-spark svg{display:block;width:130px;height:34px;}
.gs-tl .tl-txt{font-size:13.5px;line-height:1.5;color:var(--tl-ink);min-width:0;}
.gs-tl .tl-txt b{font-weight:700;}
.gs-tl .tl-delta{display:inline-flex;align-items:center;gap:3px;font-size:12.5px;font-weight:600;white-space:nowrap;margin-left:4px;}
.gs-tl .tl-delta svg{width:11px;height:11px;}
.gs-tl .tl-delta.up{color:var(--tl-green);}
.gs-tl .tl-delta.down{color:var(--tl-red);}
.gs-tl .tl-delta.flat{color:var(--tl-mut);}
.gs-tl .tl-delta.flat .sq{width:7px;height:7px;background:#C7CED8;border-radius:1px;display:inline-block;}

/* ---- responsive: stack, never scroll sideways ---- */
@media (max-width:900px){
  .gs-tl .tl-ov{grid-template-columns:1fr;gap:2px;}
}
@media (max-width:576px){
  .gs-tl .tl-card{padding:16px 14px 12px;border-radius:8px;}
  .gs-tl .tl-card-title{font-size:13.5px;}
  .gs-tl .tl-h1{font-size:19px;}
  .gs-tl .tl-spark{width:92px;height:30px;}
  .gs-tl .tl-spark svg{width:92px;height:30px;}
  .gs-tl .tl-txt{font-size:12.5px;}
  .gs-tl .tl-row{gap:10px;}
}

/* ---- Metrics to plot -------------------------------------------------- */
.gs-tl .tl-metrics{position:relative}
.gs-tl .tl-mm{min-width:232px;max-height:340px;overflow:auto;padding:6px 0}
.gs-tl .tl-mm-h{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:#6B7280;padding:6px 12px 8px}
.gs-tl .tl-mm-i{display:flex;align-items:center;gap:9px;padding:6px 12px;cursor:pointer;font-size:13px;color:#374151}
.gs-tl .tl-mm-i:hover{background:#F3F6FB}
.gs-tl .tl-mm-i.on{color:#111827;font-weight:600}
.gs-tl .tl-mm-i input{position:absolute;opacity:0;width:0;height:0}
.gs-tl .tl-mm-c{flex:none;width:14px;height:14px;border-radius:3px;border:1.5px solid #CBD5E1;
  position:relative;transition:background .12s,border-color .12s}
.gs-tl .tl-mm-i.on .tl-mm-c::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.gs-tl .tl-mm-l{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* legend: one entry per plotted metric */
.gs-tl .tl-legend{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.gs-tl .tl-lg{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#4B5563}
.gs-tl .tl-lg-line{width:14px;height:2.5px;border-radius:2px;flex:none}

/* "≈" marks a figure that is a sum of daily values and can double-count */
.gs-tl .tl-apx{font-style:normal;color:#D97706;cursor:help;font-weight:700}

/* tooltip swatch */
.gs-tl .tl-tk{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:6px;vertical-align:middle}

/* "new" — shown when the preceding period held nothing, so no percentage exists. Deliberately not
   green or red: it is neither good news nor bad, it is an absence of comparison. */
.tl-delta.new{background:#EEF1F6;color:#6B7686;font-weight:700;letter-spacing:.02em;cursor:help}
.tl-delta.new .sq{display:none}
.tl-muted{color:var(--muted);font-weight:400}
