/* ============================================================
   time_zone_compare.css — /time-zone-converter/<slug1>/<slug2>/
   Uses variables from styles.css (light + dark via data-theme).
   ============================================================ */

/* ── PAGE ────────────────────────────────────────────────────────────────── */
.tzcp-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 64px;
  width: 100%;
}

/* ── BREADCRUMB ──────────────────────────────────────────────────────────── */
.tzcp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0 20px;
  font-size: 12px;
  color: var(--text3);
}
.tzcp-breadcrumb a { color: var(--text3); text-decoration: none; transition: color .13s; }
.tzcp-breadcrumb a:hover { color: var(--accent); }
.tzcp-breadcrumb-sep { color: var(--border2); }

/* ── HERO HEADING ────────────────────────────────────────────────────────── */
.tzcp-hero {
  text-align: center;
  margin-bottom: 24px;
}
.tzcp-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tzcp-hero-swap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  flex-shrink: 0;
  transition: background .13s, color .13s, border-color .13s;
}
/*
.tzcp-hero-swap:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
*/
.tzcp-hero-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: 6px;
}

/* ── CONTROLS BAR ────────────────────────────────────────────────────────── */
/*
   Three columns, matching the screenshot layout:
   [Date picker]  [Swap cities label+icon — centred]  [Time format toggle]
   All sit in a single borderless row with consistent label+control stacking.
*/
.tzcp-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}

.tzcp-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* centre column — swap — right-aligned on its column */
.tzcp-control-group.swap-group {
  align-items: center;
  justify-content: flex-end;
}
/* format column — right-aligned */
.tzcp-control-group.format-group {
  align-items: flex-end;
}

.tzcp-control-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text3);
}

/* Date input */
.tzcp-date-input {
  padding: 9px 36px 9px 11px;   /* right pad for calendar icon */
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .13s;
  cursor: pointer;
  width: 100%;
  /* native calendar icon tint */
  color-scheme: light dark;
}
.tzcp-date-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* Swap button — just the icon, sits between the two city cards */
.tzcp-swap-center-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s, transform .2s;
}
.tzcp-swap-center-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(180deg);
}

/* Inline swap label row (inside controls swap-group) */
.tzcp-swap-label-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* 12h / 24h toggle */
.tzcp-fmt-toggle {
  display: flex;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.tzcp-fmt-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .13s, color .13s;
  line-height: 1;
}
.tzcp-fmt-btn.active {
  background: var(--accent);
  color: #fff;
  border-radius: calc(var(--radius-sm) - 2px);
}

/* ── CITY CARDS ROW ──────────────────────────────────────────────────────── */
/*
   Layout: [card1] [swap-btn-40px] [card2]
   The swap button sits flush between the cards, styled as a dark circle
   (matching the screenshot's dark ⇄ button).
*/
.tzcp-cities-row {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  gap: 0;
  margin-bottom: 20px;
  align-items: stretch;
}

.tzcp-city-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tzcp-city-card:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: none;
}
.tzcp-city-card:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: none;
}

/* Flag + name header */
.tzcp-city-flag-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.tzcp-flag { font-size: 22px; line-height: 1; }
.tzcp-city-name-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* TZ abbreviation + offset */
.tzcp-city-tz-meta {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: 10px;
}
.tzcp-city-tz-abbr { font-weight: 600; color: var(--text2); }

/* Big clock row */
.tzcp-city-clock { /* wrapper */ }
.tzcp-city-time-edit {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

/* The large time span — city 1 gets edit cursor, city 2 doesn't */
.tzcp-city-time-display {
  font-family: 'Google Sans', monospace, sans-serif;
  font-size: 46px;
  font-weight: 300;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color .15s;
  outline: none;
  user-select: none;
}
#tzcp-time1:hover,
#tzcp-time1:focus {
  border-bottom-color: var(--accent);
}
#tzcp-time2 {
  cursor: default;
}

.tzcp-city-ampm {
  font-size: 20px;
  font-weight: 400;
  color: var(--text2);
  align-self: flex-end;
  padding-bottom: 4px;
}

/* Pencil edit icon — only shown for city 1 */
.tzcp-edit-icon {
  color: var(--text3);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .13s;
  align-self: flex-end;
  padding-bottom: 6px;
}
.tzcp-edit-icon:hover { color: var(--accent); }

.tzcp-city-date-line {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 4px;
}
.tzcp-city-daynight {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/*
   Centre swap button — a filled dark/accent circle sitting between the cards,
   matching the screenshot's ⇄ circle button.
*/
.tzcp-cities-swap-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  position: relative;
  z-index: 1;
}

#tzcp-swap-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  /* dark filled — visible on both light and dark themes */
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .25s;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
#tzcp-swap-center:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(180deg);
}

/* ── TIME EDIT INLINE INPUT ──────────────────────────────────────────────── */
.tzcp-time-input {
  font-family: 'Google Sans', monospace, sans-serif;
  font-size: 42px;
  font-weight: 300;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  outline: none;
  /* width adapts to content — a rough ch-based width */
  width: 5ch;
  min-width: 3ch;
  padding: 0;
}

/* ── TIMELINE ────────────────────────────────────────────────────────────── */
.tzcp-timeline-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.tzcp-timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.tzcp-timeline-sub {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 18px;
}
.tzcp-timeline-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  padding-top: 12px;
}
.tzcp-timeline {
  min-width: 580px;
}

/* hour labels row */
.tzcp-tl-hours {
  display: grid;
  grid-template-columns: 90px repeat(24, 1fr);
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 6px;
}
.tzcp-tl-city-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  padding-right: 8px;
  display: flex;
  align-items: center;
}
.tzcp-tl-hour { text-align: center; }

/* bars row */
.tzcp-tl-row {
  display: grid;
  grid-template-columns: 90px repeat(24, 1fr);
  align-items: center;
  margin-bottom: 8px;
}
.tzcp-tl-bar-cell { position: relative; height: 28px; }

.tzcp-tl-bar {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.tzcp-tl-bar.day   { background: var(--accent); color: #fff; }
.tzcp-tl-bar.night { background: var(--bg2);    color: var(--text3); }

/* current-time needle */
.tzcp-tl-needle {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}
.tzcp-tl-needle-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

/* legend */
.tzcp-tl-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text3);
}
.tzcp-tl-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tzcp-tl-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── STATS GRID ──────────────────────────────────────────────────────────── */
.tzcp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.tzcp-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tzcp-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tzcp-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.tzcp-stat-icon { color: var(--accent); flex-shrink: 0; }

/* time difference */
.tzcp-diff-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}
.tzcp-diff-sub { font-size: 12px; color: var(--text2); }
.tzcp-diff-dst { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* best time to meet */
.tzcp-meet-time { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; }
.tzcp-meet-city { font-size: 11px; color: var(--text3); margin-top: 1px; }
.tzcp-meet-quality {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent-text);
}

/* quick facts */
.tzcp-facts-list { display: flex; flex-direction: column; gap: 8px; }
.tzcp-fact-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}
.tzcp-fact-icon { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.tzcp-fact-text { color: var(--text2); }
.tzcp-fact-text strong { color: var(--text); font-weight: 600; }

/* ── SHARE BAR ───────────────────────────────────────────────────────────── */
.tzcp-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.tzcp-share-left { display: flex; flex-direction: column; gap: 2px; }
.tzcp-share-title { font-size: 13px; font-weight: 600; color: var(--text); }
.tzcp-share-sub { font-size: 12px; color: var(--text3); }
.tzcp-share-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tzcp-share-url {
  padding: 8px 12px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text2);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  cursor: text;
  min-width: 200px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tzcp-share-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .13s, color .13s;
  white-space: nowrap;
}
.tzcp-share-copy:hover { background: var(--bg2); color: var(--text); }
.tzcp-share-copy.copied { color: var(--accent); border-color: var(--accent); }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.tzcp-faq-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}
.tzcp-faq-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

/* ── FOOTER NAV ──────────────────────────────────────────────────────────── */
.tzcp-footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.tzcp-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .13s;
}
.tzcp-footer-link:hover { opacity: 0.75; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .tzcp-page { padding: 0 15px 48px; }
  .tzcp-hero-title { font-size: 18px; gap: 8px; }
  .tzcp-cities-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .tzcp-city-card:first-child { border-radius: var(--radius) var(--radius) 0 0; border-right: 1.5px solid var(--border); border-bottom: none; }
  .tzcp-city-card:last-child  { border-radius: 0 0 var(--radius) var(--radius); border-left: 1.5px solid var(--border); border-top: none; }
  .tzcp-cities-arrow { display: none; }
  .tzcp-city-time-display { font-size: 36px; }
  .tzcp-stats-grid { grid-template-columns: 1fr; }
  .tzcp-controls { gap: 8px; }
  .tzcp-share { flex-direction: column; align-items: flex-start; }
  .tzcp-share-url { max-width: 100%; min-width: unset; width: 100%; }
}