/* ==========================================================================
   timezone.css — Full blue-theme timezone styling (drop-in replacement)
   Purpose: layout + timeline + accent stroke + controls + accessibility
   ========================================================================== */

/* =========================
   THEME TOKENS — timezone.css (tool-scoped tokens)
   ========================= */

.tz-page, .timezone-card {
  /* shared geometry */
  --card-radius: 14px;
  --control-radius: 10px;
  --control-pad: 8px 12px;
  --card-pad: 16px;
  --tile-w: 112px;
  --label-w: 240px;
  --icon-w: 50px;

  /* neutral palette */
  --app-bg: #F5F9FF;
  --tile-bg: #FFFFFF;
  --muted: #5D6B7A;
  --text-dark: #0B223B;
  --border-weak: rgba(11,34,59,0.06);
  --border-strong: rgba(11,34,59,0.16);
  --soft-shadow: 0 10px 30px rgba(11,34,59,0.04);

  /* timezone accent (blue) */
  --accent: #2B7BE4;
  --accent-700: #185FCC;
  --accent-contrast: #ffffff;

  /* tz-specific shorthand */
  --tz-bg: var(--app-bg);
  --tz-tile: #F1F6FF;
  --tz-accent: var(--accent);
  --tz-accent-700: var(--accent-700);
  --tz-present: #E9F3FF;
  --tz-text-dark: var(--text-dark);
  --tz-muted: var(--muted);
  --tz-border: rgba(43,123,228,0.10);
  --tz-shadow: var(--soft-shadow);
}

/* ------------------ Card shell / palette ------------------ */
.tz-page, .timezone-card {
  --tz-radius: 14px;
  --tz-pad: 16px;
  border-radius: var(--tz-radius);
  background: linear-gradient(180deg, var(--tz-bg), #F2F7FF);
  color: var(--tz-text-dark);
  box-shadow: var(--tz-shadow);
  border: 1px solid rgba(11,34,59,0.04);
  padding: calc(var(--tz-pad) + 6px);
  isolation: isolate;
  -webkit-font-smoothing:antialiased;
  position: relative;
}

/* Accent stroke across top */
.tz-page::before,
.timezone-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--tz-accent), var(--tz-accent-700));
  box-shadow: 0 10px 28px rgba(43,123,228,0.10);
  opacity: 1;
  z-index: 40;
  pointer-events: none;
}

/* Header / title */
.timezone-card .section-title, .tz-page .section-title {
  color: var(--tz-text-dark);
  font-weight: 800;
  font-size: 1.05rem;
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:6px;
  position: relative;
  z-index: 42;
}
.timezone-card .section-title i {
  width:40px; height:40px; display:inline-grid; place-items:center;
  border-radius:10px;
  background: linear-gradient(180deg, rgba(43,123,228,0.11), rgba(255,255,255,0.6));
  color: var(--tz-accent-700);
  box-shadow: 0 8px 18px rgba(24,95,204,0.06);
}

/* Controls: inputs & buttons */
.tz-page .topbar, .tz-page .controls { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tz-page .controls select,
.tz-page .controls input,
.tz-page .add-zone input {
  background: linear-gradient(180deg, #fff, #fbfdfb);
  color: var(--tz-text-dark);
  border: 1px solid var(--border-strong);
  padding:8px 10px;
  border-radius:8px;
  font-weight:700;
  box-shadow: 0 6px 14px rgba(11,34,59,0.02);
  -webkit-appearance: none;
}

/* Input groups: pill surface + icon cell support */
.tz-page .input-group,
.tz-page .input-pill {
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #fff, #fbfdfb);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
}

/* icon cell inside input group */
.tz-page .input-group .input-group-text,
.tz-page .input-pill .input-icon-cell {
  width: var(--icon-w);
  min-width: var(--icon-w);
  display:inline-flex !important;
  align-items:center; justify-content:center !important;
  background: transparent !important;
  border: none !important;
  color: var(--tz-accent-700);
  font-weight:800;
  z-index:2;
}

/* Curved divider between icon and input */
.tz-page .input-group::after,
.tz-page .input-pill::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: calc(var(--icon-w));
  width: 1px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  pointer-events: none;
  z-index:1;
}

/* Input field */
.tz-page .controls input[type="text"],
.tz-page .controls input[type="search"],
.tz-page .add-zone input,
.tz-page .controls select {
  border: none;
  padding: 8px 12px;
  background: transparent;
  color: var(--tz-text-dark);
  font-weight:700;
  width: 100%;
  z-index:2;
}

/* Buttons baseline */
.tz-page .controls button,
.tz-page .add-zone button,
.tz-page .remove-btn {
  padding:8px 12px;
  border-radius:10px;
  font-weight:800;
  cursor:pointer;
  background: linear-gradient(180deg, rgba(43,123,228,0.10), rgba(24,95,204,0.06));
  color: var(--tz-text-dark);
  border: 1px solid rgba(24,95,204,0.06);
  box-shadow: 0 8px 20px rgba(11,34,59,0.03);
  transition: transform 140ms ease, box-shadow 140ms ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.tz-page .controls button:hover,
.tz-page .add-zone button:hover,
.tz-page .remove-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(11,34,59,0.06);
}

/* Pale-blue small pill (Reset/Today) */
.btn.pale-pill,
.tz-page .btn.pale-pill,
#reset-zones,
.timezone-card .btn.pale-pill {
  background: linear-gradient(180deg,#E6F1FF,#DDEBFF) !important;
  color: #072243 !important;
  border: 1px solid rgba(24,95,204,0.12) !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.94rem !important;
  box-shadow: 0 8px 28px rgba(24,95,204,0.08) !important;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 120ms ease;
  z-index: 30;
}

/* Suggestion box */
.tz-suggest-box {
  background: #ffffff;
  color: var(--tz-text-dark);
  border-radius: 8px;
  border: 1px solid rgba(11,34,59,0.05);
  box-shadow: 0 10px 30px rgba(11,34,59,0.08);
  max-height: 320px;
  overflow:auto;
  font-size: 14px;
}

/* Row / Label / Cells */
.tz-page .row {
  display:grid;
  grid-template-columns: var(--label-w, 240px) 1fr;
  gap:0;
  padding:12px 0;
  border-bottom: 1px solid rgba(11,34,59,0.04);
  position: relative;
  box-sizing: border-box;
}
.tz-page .row:last-child { border-bottom: none; }

.tz-page .row-label {
  padding-left:12px;
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:12px;
  min-height:56px;
  box-sizing: border-box;
}
.tz-page .row-label > .label-info {
  flex: 0 0 calc(var(--label-w) - 20px);
  min-width: 160px;
  max-width: 100%;
  overflow: visible;
}
.tz-page .label-info .tz-name {
  font-weight:800;
  font-size:15px;
  color: var(--tz-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.tz-page .label-info .tz-sub {
  font-size:12px;
  color: var(--tz-muted);
  line-height:1;
  margin-top:4px;
}

/* Make each .cell positioned (needed for ::before ghost) */
.tz-page .cell, .timezone-card .cell { position: relative; }

/* Cells / Tiles */
.tz-page .cells {
  display:flex;
  gap: var(--gutter,12px);
  padding:8px 6px;
  align-items:center;
  overflow:hidden;
  scroll-behavior:smooth;
}
.tz-page .cell {
  width: var(--tile-w);
  min-width: var(--tile-w);
  max-width: var(--tile-w);
  border-radius:12px;
  padding:10px 6px;
  text-align:center;
  background: var(--tz-tile);
  border: 1px solid rgba(11,34,59,0.04);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  box-shadow: 0 6px 14px rgba(11,34,59,0.03);
  user-select:none;
}
.tz-page .cell .time { font-weight:800; font-size:14px; color: var(--tz-text-dark); }
.tz-page .cell .date { font-size:12px; color: var(--tz-muted); }

.tz-page .cell:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(11,34,59,0.06); }
.tz-page .cell:active { transform: translateY(-2px); }

/* Past / Present / Future */
.tz-page .cell.past { background: #F2F7FB; color: #6B746E; }
.tz-page .cell.present {
  background: var(--tz-present);
  border: 1px solid rgba(43,123,228,0.12);
  color: var(--tz-accent-700);
  font-weight:800;
  box-shadow: 0 12px 36px rgba(24,95,204,0.06);
}
.tz-page .cell.future { background: #F7FBFF; color: var(--tz-text-dark); }

/* Hover interactions */
.tz-page .cell:hover,
.timezone-card .cell:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11,34,59,0.06);
}

/* Focus for present tile (keyboard) */
.tz-page .cell.present:focus,
.timezone-card .cell.present:focus {
  outline: none;
  box-shadow: 0 0 0 6px rgba(43,123,228,0.10);
}

/* Decorative left ghost */
.tz-page .cell::before,
.timezone-card .cell::before {
  content: "" ;
  display: block;
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0.08;
}
.tz-page .cell.past::before { background: linear-gradient(180deg,#EAF6FF,#F6FBFF) !important; }
.tz-page .cell.present::before { background: linear-gradient(180deg,#CFE8FF,#EAF6FF) !important; }
.tz-page .cell.future::before { background: linear-gradient(180deg,#FFFFFF,#F3F8FF) !important; }

/* Master scroller */
.tz-page .master-scroller,
#masterScroller {
  height: 48px;
  overflow-x:auto;
  padding:6px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}

/* Make master-scroller children measurable but non-interactive */
.master-scroller .cell {
  display: inline-block;
  min-width: var(--tile-w);
  width: var(--tile-w);
  height: 2px;
  padding: 0;
  margin: 0 6px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: transparent;
  opacity: 0.01;
  pointer-events: none;
}

/* Tooltip */
.tz-page .tz-tooltip {
  position:absolute;
  z-index:9999;
  min-width:220px;
  max-width:420px;
  background:#ffffff;
  border-radius:10px;
  padding:10px 12px;
  box-shadow: 0 12px 30px rgba(11,34,59,0.12);
  font-size:13px;
  color: var(--tz-text-dark);
  border: 1px solid rgba(11,34,59,0.04);
  pointer-events:none;
}

/* Hide legend (user choice) */
.tz-page .timeline-legend, .timezone-card .timeline-legend { display: none; }

/* Current time */
.tz-page .current-time { color: var(--tz-muted); font-weight:700; text-align:center; margin-top:8px; }

/* Compact mobile adjustments */
@media (max-width: 520px) {
  .tz-page { --tile-w: 84px; --label-w: 0px; }
  .tz-page .row { display:block; padding:10px 8px; border-bottom:1px solid rgba(11,34,59,0.03); }
  .tz-page .row-label { padding:0 6px 8px 6px; align-items:flex-start; gap:8px; }
  .tz-page .cells { overflow-x:auto !important; gap:10px; padding:8px; }
  .tz-page .cell { min-width: var(--tile-w); width: var(--tile-w); border-radius:10px; padding:10px 8px; }
  .tz-page .master-scroller { display:none; }
  .tz-page .label-info .tz-name { white-space: normal; overflow: visible; text-overflow: unset; }
  .tz-page .row-label > .label-info { flex: 1 1 auto; min-width: 0; }
}

/* Focus styles for accessibility */
.tz-page .controls select:focus,
.tz-page .controls input:focus,
.tz-page .add-zone input:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(43,123,228,0.10);
  border-color: rgba(24,95,204,0.14);
}

/* Add timezone button stronger */
.tz-page .add-zone button,
.tz-page .controls button.add-tz-btn {
  background: linear-gradient(180deg, rgba(24,95,204,0.22), rgba(24,95,204,0.18));
  color: #042a4a;
  border: 1px solid rgba(24,95,204,0.25);
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(24,95,204,0.12);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tz-page .add-zone button:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(24,95,204,0.18); }

/* Reset button (pale-blue pill) */
#reset-zones {
  background: linear-gradient(180deg,#E6F1FF,#DDEBFF);
  color: #0b2a55;
  border: 1px solid rgba(24,95,204,0.12);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.94rem;
  box-shadow: 0 8px 26px rgba(24,95,204,0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 120ms ease;
  display:inline-flex;
  gap:8px;
  align-items:center;
  z-index: 30;
}
#reset-zones:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(24,95,204,0.12); }

/* Today button — match pale-pill reset (same look) */
.timezone-card #todayBtn,
.tz-page #todayBtn,
.timezone-card .today-under .btn, .tz-page .today-under .btn {
  /* use pale-pill style by default */
  background: linear-gradient(180deg,#E6F1FF,#DDEBFF) !important;
  color: #072243 !important;
  border: 1px solid rgba(24,95,204,0.12) !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.94rem !important;
  box-shadow: 0 8px 28px rgba(24,95,204,0.08) !important;
  display:inline-flex !important;
  gap:8px !important;
  align-items:center !important;
  transition: transform 140ms ease, box-shadow 140ms ease !important;
  z-index: 30 !important;
  cursor: pointer !important;
}
.timezone-card #todayBtn:hover, .tz-page #todayBtn:hover { transform: translateY(-3px) !important; box-shadow: 0 14px 40px rgba(24,95,204,0.12) !important; }

/* Ensure icons inherit button color (so they remain visible on active backgrounds) */
.tz-page .btn i,
.tz-page .btn .bi,
.tz-page .btn svg {
  color: inherit !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  filter: none !important;
  opacity: 1 !important;
}

/* If some button uses gradient active state, ensure its child icon becomes white for contrast */
.tz-page .btn.active,
.tz-page .btn:active,
.tz-page .btn:focus {
  color: var(--accent-contrast) !important;
  fill: var(--accent-contrast) !important;
  stroke: var(--accent-contrast) !important;
}

/* Provide a small pale-pill helper for elements that should match Reset/Today */
.tz-page .controls .pale-pill,
.tz-page .add-zone .pale-pill { display: inline-flex; }

/* Master scroller visual placement & behavior */
.timeline-wrap,
.timezone-card .timeline-area {
  overflow: visible !important;
  position: relative;
}

/* Master scroller — keep consistent placement */
.master-row { position: relative; display: flex; align-items: center; gap: 0; }
.master-row > .row-label { flex: 0 0 var(--label-w); min-width: var(--label-w); box-sizing: border-box; padding-left: 12px; }

/* master scroller itself */
.master-scroller,
#masterScroller {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  height: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}

/* tooltip and accessibility tweaks */
.tz-page .tz-tooltip { pointer-events: none; }

/* Add breathing space below the controls row */
.tz-page .topbar { margin-bottom: 12px !important; }

/* Add spacing below the Add Timezone row */
.tz-page .add-zone { margin-bottom: 16px !important; }

#masterScroller { overflow-x: scroll !important; }

/* small responsive nudge */
@media (max-width: 720px) {
  .tz-page::before, .timezone-card::before { left: 10px !important; right: 10px !important; top: 10px !important; height: 5px !important; }
  .tz-page .input-group::after, .tz-page .input-pill::after { left: calc(var(--icon-w)); }
}

/* Defensive anchor */
body .tz-page, body .timezone-card { box-sizing: border-box; }

/* ==============================
   TZ INPUT VISIBILITY PATCH (keeps selects visible & single-arrow)
   Paste at END of css/timezone.css
   ============================== */

/* stronger visible input surface for timezone controls */
.tz-page .controls select,
.tz-page .controls input,
.tz-page .add-zone input,
.tz-page .input-group,
.tz-page .input-pill {
  background: linear-gradient(180deg,#ffffff,#f7fbff) !important;
  border: 1.5px solid rgba(11,34,59,0.12) !important;   /* darker border */
  box-shadow: inset 0 2px 6px rgba(11,34,59,0.03), 0 6px 14px rgba(11,34,59,0.02);
  color: var(--tz-text-dark) !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  -webkit-appearance: none;
}

/* tune the icon cell so it sits visually apart */
.tz-page .input-group .input-group-text,
.tz-page .input-pill .input-icon-cell {
  background: linear-gradient(180deg,#f3f8ff,#ffffff) !important;
  border-right: 1px solid rgba(11,34,59,0.06) !important;
  margin-right: 6px;
  z-index: 3;
}

/* stronger placeholder contrast for legibility */
.tz-page ::placeholder,
.tz-page .controls ::placeholder,
.tz-page .add-zone ::placeholder {
  color: rgba(11,34,59,0.32) !important;
  font-weight: 600;
}

/* make focused state unmistakable (larger ring & slightly darker border) */
.tz-page .controls select:focus,
.tz-page .controls input:focus,
.tz-page .add-zone input:focus,
.tz-page .input-group:focus-within,
.tz-page .input-pill:focus-within {
  outline: none !important;
  border-color: rgba(24,95,204,0.22) !important;
  box-shadow: 0 6px 20px rgba(43,123,228,0.10), inset 0 2px 8px rgba(11,34,59,0.04) !important;
}

/* slightly enlarge icon width so divider lines up neatly */
.tz-page .input-group .input-group-text,
.tz-page .input-pill .input-icon-cell { width: 56px !important; min-width:56px !important; }

/* ensure disabled/readonly fields remain readable */
.tz-page .controls input[disabled],
.tz-page .controls select[disabled],
.tz-page .input-group[aria-disabled="true"] {
  opacity: 0.95 !important;
  color: rgba(11,34,59,0.8) !important;
  background: linear-gradient(180deg,#fbfdff,#f3f8ff) !important;
}

/* smaller devices — maintain contrast & padding */
@media (max-width:520px) {
  .tz-page .controls select,
  .tz-page .controls input,
  .tz-page .input-group,
  .tz-page .input-pill {
    padding: 10px !important;
  }
}

/* =========================
   TZ: FIX STEP / COLUMNS / TIMEFORMAT ALIGNMENT
   ========================= */

/* Ensure controls row uses single horizontal alignment */
.tz-page .controls {
  display: flex;
  gap: 12px;
  align-items: center;     /* center vertically */
  flex-wrap: wrap;
}

/* Make each label behave as inline row: label text + pill aligned center */
.tz-page .controls label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  white-space: nowrap;

  /* Match Date label visuals */
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--tz-muted);
  line-height: 1;
}

/* Normalize pill geometry for the interactive control elements */
.tz-page .controls select,
.tz-page .controls input[type="number"],
.tz-page .controls input[type="text"],
.tz-page .controls .form-select,
.tz-page .controls .form-control {
  height: 40px;                        /* consistent height */
  min-height: 40px;
  padding: 8px 14px;                   /* internal spacing */
  border-radius: 10px;                 /* pill corners */
  border: 1.5px solid rgba(11,34,59,0.12);
  background: linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow: inset 0 2px 6px rgba(11,34,59,0.02);
  font-weight: 800;
  color: var(--tz-text-dark);
  vertical-align: middle;
  box-sizing: border-box;
}

/* Make columns input slightly narrower and centered text */
.tz-page .controls input#colCount {
  width: 68px !important;
  text-align: center;
  padding-left: 10px;
  padding-right: 10px;
  margin: 0;                /* remove earlier left margin that misaligned */
}

/* Make step / time format selects match width of other pills */
.tz-page .controls select#stepSelect,
.tz-page .controls select#hourMode {
  min-width: 72px;
  width: auto;
}

/* Restore native number spinners where allowed (if suppressed globally) */
.tz-page .controls input[type=number]::-webkit-inner-spin-button,
.tz-page .controls input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  display: inline-block;
  margin: 0;
}

/* Focus style parity with other pills */
.tz-page .controls select:focus,
.tz-page .controls input:focus {
  outline: none !important;
  border-color: rgba(24,95,204,0.20) !important;
  box-shadow: 0 6px 20px rgba(43,123,228,0.10) !important;
}

/* Small responsive tweak to avoid overflow */
@media (max-width: 880px) {
  .tz-page .controls { gap: 10px; }
  .tz-page .controls select, .tz-page .controls input { height: 38px; padding: 7px 12px; font-weight:800; }
  .tz-page .controls input#colCount { width: 60px; }
}

/* ======================================================
   TZ: match Date card top-stroke / title / reset spacing
   ====================================================== */

/* Use the same top padding as date card so title sits at same distance from stroke */
.tz-page, .timezone-card {
  padding: calc(var(--tz-pad) + 8px) !important; /* same calc used in date.css */
}

/* Accent stroke placement (ensure identical top offset/height as date card) */
.tz-page::before,
.timezone-card::before {
  left: 12px !important;
  right: 12px !important;
  top: 12px !important;
  height: 6px !important;
  border-radius: 6px !important;
  z-index: 40 !important;
}

/* Title placement: same margin as date (title sits right under stroke) */
.tz-page .section-title,
.timezone-card .section-title {
  margin-top: 6px !important;  /* same as date.css */
  position: relative !important;
  z-index: 42 !important;
}

/* Make sure header row spacing mirrors date card's header spacing */
.tz-page .panel-header,
.tz-page .d-flex.align-items-center.mb-3,
.timezone-card .d-flex.align-items-center.mb-3 {
  margin-bottom: 12px !important; /* same spacing under header as date */
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* Reset button: align vertical placement & subtle margin like date resetDates */
#reset-zones {
  margin-top: 0 !important;   /* keep it visually aligned with the title */
  position: relative !important;
  z-index: 45 !important;
}

/* Keep title icon styling consistent with date card's icon look */
.tz-page .section-title i,
.timezone-card .section-title i {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(24,95,204,0.06);
}

/* Ensure topbar spacing matches date card */
.tz-page .topbar { margin-bottom: 12px !important; }

/* Defensive: ensure timezone card is positioned relative so the stroke & title z-index behave identically */
.tz-page, .timezone-card { position: relative !important; }

/* Provide parity for small screens as used in date.css */
@media (max-width: 720px) {
  .tz-page::before,
  .timezone-card::before { left: 10px !important; right: 10px !important; top: 10px !important; height: 5px !important; }
  .tz-page .section-title, .timezone-card .section-title { margin-top: 6px !important; }
}

/* =========================
   TZ: base-sublabel green + present tiles match + live-clock restored
   ========================= */

:root{
  --tz-green-500: #2BAF6D;
  --tz-green-700: #1F7A52;
}

/* Only the Base Timezone sublabel (first/base row) -> green + bold */
.tz-page .row:first-of-type .label-info .tz-sub,
.tz-page .row.base-row .label-info .tz-sub,
.timezone-card .row:first-of-type .label-info .tz-sub {
  color: var(--tz-green-500) !important;
  font-weight: 800 !important;
}

/* Restore live-clock to timezone default */
.tz-page .live-clock,
.timezone-card .live-clock {
  color: var(--tz-accent-700) !important;
  font-weight: 800 !important;
  display: block !important;
}

/* Slightly reduce UTC info font size */
.tz-page .utc-label,
.timezone-card .utc-label {
  font-size: 12px !important;
  color: var(--tz-muted) !important;
  font-weight: 600 !important;
  margin-top: 4px;
}

/* Make present/current tiles use same green tone (stack visual) */
.tz-page .cell.present,
.timezone-card .cell.present {
  background: linear-gradient(180deg, rgba(43,175,109,0.12), rgba(223,243,234,0.95)) !important;
  border: 1px solid rgba(43,175,109,0.14) !important;
  color: var(--tz-green-700) !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 36px rgba(31,122,82,0.06) !important;
  transform: none !important;
}

/* ensure the time text inside present tiles is green as well */
.tz-page .cell.present .time,
.timezone-card .cell.present .time {
  color: var(--tz-green-700) !important;
  font-weight: 900 !important;
}

/* keep the small left-ghost for present tiles consistent with green */
.tz-page .cell.present::before,
.timezone-card .cell.present::before {
  background: linear-gradient(180deg,#CFF3E1,#EAF9F3) !important;
  opacity: 0.95 !important;
}

/* keep past tiles muted */
.tz-page .cell.past,
.timezone-card .cell.past {
  color: #8a9196 !important;
}

/* Defensive: ensure only base sublabel changed */
.tz-page .label-info .tz-sub:not(.base-only),
.timezone-card .label-info .tz-sub:not(.base-only) {}

/* Bring remove (×) button above tiles */
.tz-page .remove-btn,
.timezone-card .remove-btn {
  position: relative !important;
  z-index: 9999 !important;
}

/* Faint accent glow for present tile (left-side) */
.tz-page .cell.present::after,
.timezone-card .cell.present::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  bottom: 6px;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(43,123,228,0.35), rgba(24,95,204,0.28));
  filter: blur(3px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
.tz-page .cell.present,
.timezone-card .cell.present { position: relative; z-index: 2; }

/* Move remove button fully to left side (if used) */
.tz-page .row:not(:first-of-type) .remove-btn {
  position: absolute;
  left: -48px !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid rgba(11,34,59,0.10);
  box-shadow: 0 6px 14px rgba(11,34,59,0.06);
  cursor: pointer;
}
.tz-page .row:not(:first-of-type) .remove-btn:hover { transform: translateY(-50%) scale(1.07); }

/* Restore tooltip header visibility */
.tz-tooltip .tt-head { display: block !important; visibility: visible !important; opacity: 1 !important; height: auto !important; margin: 0 0 6px 0 !important; padding: 6px 0 4px 0 !important; font-weight: 700 !important; font-size: 13px !important; color: #334155 !important; border-bottom: 1px solid rgba(6, 38, 56, 0.04) !important; }

/* show small offsets under labels */
.grid-label .tz-offset,
.tz-row .tz-offset,
.zone-meta .tz-offset,
.grid-label .utc-offset,
.tz-row .utc-offset {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #0F766E !important;
  margin-top: 4px !important;
  line-height: 1 !important;
  opacity: 0.95 !important;
}

/* Keep UTC suffix small if present */
#grid .cell .time .utc-suffix,
.grid .cell .time .utc-suffix,
.anchor-row .cell .time .utc-suffix,
.grid-label .cell .time .utc-suffix {
  display: inline-block !important;
  font-size: 11px !important;
  margin-left: 6px !important;
  color: rgba(11,34,59,0.35) !important;
}

/* Improve Base Timezone label contrast */
.base-timezone, .base-tz-label, .controls .label, .form-label, .tz-row .tz-label, .grid-label .label {
  font-weight: 600 !important;
  color: #1F2937 !important;
  opacity: 0.95 !important;
}

/* Make sure tooltip head not hidden by other rules */
.tz-tooltip .tt-head[style*="display:none"] { display: block !important; }

/* Base Timezone — same UTC style, slightly bolder, with soft shadow */
.tz-page .row:first-of-type .label-info .tz-sub,
.tz-page .row.base-row .label-info .tz-sub,
.timezone-card .row:first-of-type .label-info .tz-sub {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.1px !important;
  line-height: 1 !important;
  color: var(--tz-green-500) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  opacity: 1 !important;
  margin-top: 4px !important;
}

/* Restore native dropdown arrow & single-arrow behaviour for tz selects */
.tz-page select,
.timezone-card select {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  background-position: right 10px center !important;
  background-repeat: no-repeat !important;
}

/* Restore number spinner visibility */
.tz-page input[type="number"],
.timezone-card input[type="number"] {
  -moz-appearance: auto !important;
  -webkit-appearance: auto !important;
  appearance: auto !important;
}
.tz-page input[type="number"]::-webkit-inner-spin-button,
.tz-page input[type="number"]::-webkit-outer-spin-button,
.timezone-card input[type="number"]::-webkit-inner-spin-button,
.timezone-card input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: auto !important;
  display: inline-flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* TZ: force native arrow & uniform white pill (single arrow only) */
.tz-page .controls select,
.timezone-card .controls select,
.tz-page .controls .form-select {
  background: linear-gradient(180deg,#ffffff,#fbfdfb) !important;
  border: 1.5px solid rgba(11,34,59,0.12) !important;
  box-shadow: inset 0 2px 6px rgba(11,34,59,0.03) !important;
  color: var(--tz-text-dark) !important;
  height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  box-sizing: border-box !important;
  -webkit-appearance: menulist-button !important;
  appearance: menulist-button !important;
  background-image: none !important;
  background-position: right 12px center !important;
}

/* Defensive: hide any ::after pseudo arrow on tz selects to avoid double arrow */
.tz-page .controls select::after,
.timezone-card .controls select::after,
.tz-page .controls .form-select::after {
  display: none !important;
  content: none !important;
}

/* ======================================================================
   TZ: Make all timezone dropdowns visually match currency converter
   - pill surface, SVG arrow, same border/focus, single-arrow only
   - columns input uses the small "123" box style with visible spinners
   Paste at END of css/timezone.css
   ====================================================================== */

/* Shared tokens so the colours/gradients match currency styles */
:root {
  --tz-pick-bg: linear-gradient(180deg,#ffffff,#fbfdfb);
  --tz-pick-border: rgba(11,34,59,0.12);
  --tz-pick-shadow-inset: inset 0 2px 6px rgba(11,34,59,0.02);
  --tz-pick-accent: #2B7BE4;
  --tz-pick-accent-700: #185FCC;
  --tz-pick-contrast: #0B223B;
}

/* Make all .controls selects look like the currency Range pill with a single SVG arrow */
.tz-page .controls select,
.timezone-card .controls select,
.tz-page .controls .form-select,
.timezone-card .controls .form-select,
.tz-page select#stepSelect,
.tz-page select#hourMode,
.tz-page .controls select#baseTimezone,
.tz-page .add-zone select {
  /* pill geometry (match currency) */
  background: var(--tz-pick-bg) !important;
  border: 1.5px solid var(--tz-pick-border) !important;
  box-shadow: var(--tz-pick-shadow-inset), 0 6px 14px rgba(11,34,59,0.02) !important;
  color: var(--tz-pick-contrast) !important;
  font-weight: 800 !important;
  height: 40px !important;
  padding: 8px 40px 8px 12px !important; /* space for arrow */
  border-radius: 10px !important;
  -webkit-appearance: none !important;  /* suppress native arrow so only single SVG arrow appears */
  -moz-appearance: none !important;
  appearance: none !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px 14px !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5' stroke='%232B7BE4' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  z-index: 50 !important; /* ensure above nearby decorative layers */
}

/* Focus and hover parity with currency */
.tz-page .controls select:focus,
.timezone-card .controls select:focus,
.tz-page .controls select:hover {
  outline: none !important;
  box-shadow: 0 6px 20px rgba(43,123,228,0.10) !important;
  border-color: rgba(24,95,204,0.20) !important;
}

/* Defensive: hide any existing pseudo-arrow ::after to avoid double arrow */
.tz-page .controls select::after,
.timezone-card .controls select::after,
.tz-page .controls .form-select::after,
.timezone-card .controls .form-select::after {
  display: none !important;
  content: none !important;
}

/* Ensure mobile sizing matches */
@media (max-width: 520px) {
  .tz-page .controls select,
  .time zone-card .controls select {
    padding-right: 30px !important;
    background-position: right 10px center !important;
    background-size: 11px 11px !important;
    height: 40px !important;
  }
}

/* ---------- Make the Range (history) select match currency exact (redundant-safe) ---------- */
#history-range {
  background: var(--tz-pick-bg) !important;
  border: 1.5px solid var(--tz-pick-border) !important;
  box-shadow: var(--tz-pick-shadow-inset) !important;
  color: var(--tz-pick-contrast) !important;
  font-weight: 800 !important;
  height: 40px !important;
  padding: 8px 40px 8px 12px !important;
  border-radius: 10px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5' stroke='%232B7BE4' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px 14px !important;
  z-index: 9999 !important;
}

/* Hide legacy IE arrow for Range */
#history-range::-ms-expand { display: none !important; }

/* ---------- 123 box for Columns (numeric) ---------- */
/* Make the numeric columns input visually match the small boxed number in currency (centered, outlined, visible spinners) */
.tz-page .controls input#colCount,
.timezone-card .controls input#colCount {
  /* geometry */
  width: 72px !important;
  min-width: 64px !important;
  height: 40px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--tz-pick-border) !important;
  background: var(--tz-pick-bg) !important;
  box-shadow: var(--tz-pick-shadow-inset) !important;
  text-align: center !important;
  font-weight: 900 !important;
  font-size: 0.98rem !important;
  color: var(--tz-pick-contrast) !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

/* Keep the native spinner visible and usable (do NOT remove -webkit-appearance on this input) */
.tz-page .controls input#colCount,
.timezone-card .controls input#colCount {
  -webkit-appearance: number-input !important;
  -moz-appearance: textfield !important;
  appearance: auto !important;
}

/* Ensure spinner style & visibility cross-browser */
.tz-page .controls input#colCount::-webkit-inner-spin-button,
.tz-page .controls input#colCount::-webkit-outer-spin-button,
.timezone-card .controls input#colCount::-webkit-inner-spin-button,
.timezone-card .controls input#colCount::-webkit-outer-spin-button {
  -webkit-appearance: auto !important;
  display: inline-block !important;
  opacity: 1 !important;
  margin: 0 !important;
}

/* Focus style similar to other pills */
.tz-page .controls input#colCount:focus,
.timezone-card .controls input#colCount:focus {
  outline: none !important;
  box-shadow: 0 6px 20px rgba(43,123,228,0.10) !important;
  border-color: rgba(24,95,204,0.20) !important;
}

/* If you have a label+input pair where the label previously nudged the input, ensure alignment */
.tz-page .controls label[for="colCount"] { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- micro parity: ensure pills/icons inherit the accent when needed ---------- */
.tz-page .controls .input-group .input-group-text,
.tz-page .controls .form-select i,
.tz-page .controls select i {
  color: var(--tz-pick-accent-700) !important;
}

/* ---------- safety: suppress any earlier rules that force a second arrow ---------- */
.tz-page .controls select[style*="background-image"]::after,
.tz-page .controls select::after,
.timezone-card .controls select::after { display: none !important; content: none !important; }

/* ====== TZ: currency-style dropdown arrow (wrapper-based) ======
   Apply the arrow ONLY when the wrapper contains a SELECT element.
   This preserves native spinners on number inputs (Columns).
   ================================================================== */

/* Ensure wrappers used on the page can host the arrow */
label.small,
.tz-page .controls > label.small,
.timezone-card .controls > label.small {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Range (top) wrapper */
.form-select.form-select-sm.d-inline-block.w-auto {
  position: relative !important;
  display: inline-block !important;
}

/* Remove select native arrow and give room for wrapper arrow ONLY for wrappers that contain select */
/* Uses :has(select) so number inputs are not affected */
label.small:has(select) > select,
.tz-page .controls > label.small:has(select) > select,
.timezone-card .controls > label.small:has(select) > select,
.form-select.form-select-sm.d-inline-block.w-auto:has(select) > select,
.tz-page .controls select:where(:not([type="number"])) {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  padding-right: 44px !important;
  background-clip: padding-box !important;
}

/* Wrapper arrow only when wrapper contains a SELECT (best fix) */
label.small:has(select)::after,
.tz-page .controls > label.small:has(select)::after,
.form-select.form-select-sm.d-inline-block.w-auto:has(select)::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5' stroke='%232B7BE4' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 30;
  display: block;
}

/* Keep number input spinner usable but aligned (Columns) */
label.small > input#colCount,
.tz-page .controls input#colCount,
.timezone-card .controls input#colCount {
  padding-right: 12px !important;
}

/* Focus visuals for select wrappers */
label.small:has(select) > select:focus,
.form-select.form-select-sm.d-inline-block.w-auto:has(select) > select:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(43,123,228,0.10);
}
/* Hide the Timezone Reset button (top-right) */
.tz-page #resetBtn,
.timezone-card #resetBtn {
  display: none !important;
}

/* Darken timezone row divider lines */
.tz-page .row,
.timezone-card .row {
  border-bottom: 1px solid rgba(11,34,59,0.12) !important;
}

/* ===== Tooltip visual styling — match provided mockup =====
   Paste at the END of css/timezone.css (appearance only)
   ======================================================= */

.tz-page .tz-tooltip,
.timezone-card .tz-tooltip {
  background: #ffffff !important;
  border-radius: 10px !important;
  padding: 0 !important;                /* outer padding removed; inner pieces handle spacing */
  box-shadow: 0 18px 40px rgba(11,34,59,0.12) !important;
  border: 1px solid rgba(11,34,59,0.06) !important;
  min-width: 180px !important;
  max-width: 320px !important;
  color: #0B223B !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  pointer-events: auto !important;      /* keep current interactivity unchanged */
}

/* Header (UTC X:XX) — subtle top band with divider */
.tz-page .tz-tooltip .tt-head,
.timezone-card .tz-tooltip .tt-head {
  padding: 10px 14px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: #0F1724 !important;
  border-bottom: 1px solid rgba(6,38,56,0.04) !important;
  background: transparent !important;
}

/* List area */
.tz-page .tz-tooltip .tt-list,
.timezone-card .tz-tooltip .tt-list {
  padding: 8px 0 !important;
  display: block !important;
}

/* Each timezone row (item) */
.tz-page .tz-tooltip .tt-item,
.timezone-card .tz-tooltip .tt-item {
  padding: 10px 14px !important;
  display: block !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid rgba(6,38,56,0.03) !important;
}

/* Last item: remove bottom divider */
.tz-page .tz-tooltip .tt-item:last-child,
.timezone-card .tz-tooltip .tt-item:last-child {
  border-bottom: none !important;
}

/* Timezone name (bold left) */
.tz-page .tz-tooltip .tt-item .tz,
.timezone-card .tz-tooltip .tt-item .tz {
  display: block !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  color: #0B223B !important;
  margin-bottom: 6px !important;
}

/* Time + date row (muted, smaller) */
.tz-page .tz-tooltip .tt-item .val,
.timezone-card .tz-tooltip .tt-item .val {
  display: block !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: rgba(11,34,59,0.72) !important;
}

/* Slight inner radius on top to match shadow */
.tz-page .tz-tooltip::before,
.timezone-card .tz-tooltip::before {
  display: none !important; /* hide earlier caret if present; your tooltip can remain positioned by JS */
}

/* Small accessibility/focus hint — when tooltip receives focus keep same look */
.tz-page .tz-tooltip:focus,
.timezone-card .tz-tooltip:focus {
  outline: none !important;
  box-shadow: 0 22px 48px rgba(11,34,59,0.14) !important;
}

/* Mobile / narrow: allow tooltip to stretch and remain readable */
@media (max-width: 520px) {
  .tz-page .tz-tooltip,
  .timezone-card .tz-tooltip {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: auto !important;
    max-width: none !important;
  }
  .tz-page .tz-tooltip .tt-item,
  .timezone-card .tz-tooltip .tt-item { padding-left: 12px !important; padding-right: 12px !important; }
}
/* Remove the UTC line at the top of the tooltip */
.tz-tooltip .tt-head {
    display: none !important;
}

/* =========================================
   TZ: Column Hover Highlight (final)
   ========================================= */

.tz-page .hover-highlight {
  position: absolute;
  pointer-events: none;
  border: 2px solid rgba(43,123,228,0.55);   /* blue accent */
  background: rgba(43,123,228,0.12);        /* soft blue fill */
  border-radius: 8px;
  z-index: 60;                              /* above cells, below tooltips */
  display: none;
}

/* =========================================
   TZ: Disable hover tooltip popup (final)
   ========================================= */

/* Completely suppress tooltip rendering */
.tz-page .tz-tooltip,
.timezone-card .tz-tooltip {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== FORCE past / future visual separation (final override) ===== */

.tz-page .cell.past {
  background: #EDF2F7 !important;
  color: #8A9196 !important;
  opacity: 0.7 !important;
}

.tz-page .cell.future {
  background: #F7FBFF !important;
  color: #0B223B !important;
  opacity: 1 !important;
}

/* Shared floating action buttons (like SIP) */
.tool-action-wrap {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

/* Mobile floating bar */
@media (max-width: 576px) {
  .tool-action-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border-top: 1px solid rgba(46,106,255,0.18);
    box-shadow: 0 -10px 28px rgba(15,44,85,0.12);
  }

  body {
    padding-bottom: 80px;
  }
}
