/* times.css (agent 7): time-label layer + time control */

/* ---------- labels on the globe (CSS2DObject elements inside #labels) ---------- */
.tl-label {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 7px; margin-bottom: 7px; /* room for the anchor stem */
  border-radius: 999px; white-space: nowrap; position: relative;
  font: 500 11px/1.25 var(--font-ui); color: var(--cream);
  background: rgba(6, 14, 28, 0.62); border: 1px solid rgba(242, 199, 102, 0.32);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 10px rgba(242, 199, 102, 0.10);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: tl-in 0.45s ease-out both;
  pointer-events: none;
}
.tl-label::after { /* stem + dot pointing at the exact spot */
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 1px; height: 7px; transform: translateX(-50%);
  background: linear-gradient(rgba(242, 199, 102, 0.6), rgba(242, 199, 102, 0.9));
  box-shadow: 0 2px 0 0 var(--gold);
}
.tl-name { color: var(--muted); font-weight: 500; letter-spacing: 0.01em; }
.tl-time { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; text-shadow: 0 0 8px rgba(242, 199, 102, 0.45); }
.tl-icon { font-size: 11px; color: #FFE2A0; width: 11px; text-align: center; }
.tl-night { background: rgba(3, 7, 15, 0.7); border-color: rgba(150, 175, 220, 0.28); }
.tl-night .tl-icon { color: #B9C8F0; }
.tl-night .tl-time { color: #F6DC9C; }
.tl-tier1 { font-size: 12px; }
.tl-tier1 .tl-name { color: var(--text); }
.tl-tier3 { font-size: 10.5px; padding: 2px 7px 2px 6px; }
@keyframes tl-in { from { opacity: 0; transform: translateY(4px) scale(0.92); } to { opacity: 1; transform: none; } }

/* ---------- time control (bottom-left) ---------- */
.tc {
  position: absolute; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  width: 300px; padding: 10px 12px 8px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  color: var(--text); font-family: var(--font-ui); user-select: none; -webkit-user-select: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.tc.tc-shifted { border-color: rgba(242, 199, 102, 0.55); box-shadow: var(--shadow), 0 0 22px rgba(242, 199, 102, 0.16); }
.tc-row { display: flex; align-items: center; gap: 8px; }
.tc-top { justify-content: space-between; }
.tc-clock { min-width: 0; }
.tc-utc { display: flex; align-items: baseline; font-variant-numeric: tabular-nums; line-height: 1; }
.tc-hm { font: 700 24px/1 var(--font-title); color: var(--gold); letter-spacing: 0.04em; text-shadow: 0 0 14px rgba(242, 199, 102, 0.35); }
.tc-sec { font: 600 13px/1 var(--font-ui); color: var(--gold-3); margin-left: 1px; }
.tc-z { font: 600 10px/1 var(--font-ui); color: var(--muted); letter-spacing: 0.12em; margin-left: 6px; }
.tc-sub { margin-top: 4px; font-size: 11px; color: var(--muted); display: flex; gap: 6px; white-space: nowrap; }
.tc-rel { color: var(--cream); font-variant-numeric: tabular-nums; }
.tc-rel.is-live { color: var(--teal); }

.tc-btns { display: flex; gap: 6px; flex-shrink: 0; }
.tc-btn {
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: rgba(242, 199, 102, 0.06); border: 1px solid rgba(242, 199, 102, 0.25); color: var(--cream);
  font: 600 11px/1 var(--font-ui); letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tc-btn:hover { background: rgba(242, 199, 102, 0.14); border-color: rgba(242, 199, 102, 0.5); }
.tc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tc-ff svg { fill: currentColor; stroke: none; }
.tc-btn.on { background: rgba(242, 199, 102, 0.2); border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(242, 199, 102, 0.25); }
.tc-speed:empty { display: none; }
.tc-speed { font-variant-numeric: tabular-nums; }
.tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.tc-live.on { color: var(--teal); border-color: rgba(94, 200, 216, 0.6); background: rgba(94, 200, 216, 0.12); box-shadow: 0 0 12px rgba(94, 200, 216, 0.2); }
.tc-live.on .tc-dot { background: var(--teal); animation: tc-pulse 1.6s ease-in-out infinite; }
.tc:not(.tc-shifted) .tc-live { cursor: default; }
@keyframes tc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(94, 200, 216, 0.7); } 50% { box-shadow: 0 0 0 5px rgba(94, 200, 216, 0); } }

.tc-scrub { margin-top: 8px; }
.tc-tick { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tc-range {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer;
  touch-action: none;
}
.tc-range::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(150, 175, 220, 0.25), rgba(242, 199, 102, 0.55) 50%, rgba(150, 175, 220, 0.25));
}
.tc-range::-moz-range-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(150, 175, 220, 0.25), rgba(242, 199, 102, 0.55) 50%, rgba(150, 175, 220, 0.25));
}
.tc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE7A8, var(--gold) 55%, var(--gold-3));
  border: 1px solid rgba(255, 240, 200, 0.8); box-shadow: 0 0 10px rgba(242, 199, 102, 0.6);
}
.tc-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE7A8, var(--gold) 55%, var(--gold-3));
  border: 1px solid rgba(255, 240, 200, 0.8); box-shadow: 0 0 10px rgba(242, 199, 102, 0.6);
}
.tc-range:focus-visible { outline: none; }
.tc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(242, 199, 102, 0.35), 0 0 10px rgba(242, 199, 102, 0.6); }

/* ---------- phones ---------- */
@media (max-width: 600px) {
  .tc { left: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(270px, calc(100vw - 20px)); padding: 8px 10px 6px; }
  .tc-hm { font-size: 20px; }
  .tc-btn { height: 34px; min-width: 34px; padding: 0 7px; } /* finger-sized */
  .tc-btns { gap: 5px; }
  .tc-scrub { margin-top: 6px; }
  .tc-range { height: 28px; }
  .tl-label { font-size: 10px; padding: 2px 6px; }
  .tl-tier1 { font-size: 11px; }
}
