/* ============================================================
   timezoneconverter.co — v2 "time now" pages
   (us-time-now, uk-time-now, singapore-time-now, city-time-now,
   country-time-now). Loaded after v2/site.css and only adds what
   site.css does not have; colours come from its tokens so light
   and dark themes both work. Behaviour lives in v2/timenow.js.
   ============================================================ */

/* ---------- "your time" line + 12/24h switch ---------- */
.tn-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tn-you { margin: 0; color: var(--text-dim); font-size: .94rem; }
.tn-you b { color: var(--text); font-variant-numeric: tabular-nums; }
.tn-bar .seg { margin-left: auto; }
.tn-sec { font-size: .62em; opacity: .85; letter-spacing: 0; }

/* ---------- big single clock (UK, Singapore) ---------- */
.tn-panel { border-radius: var(--r-lg); border: 1px solid var(--stroke); min-height: 250px; }
.tn-panel .side-main { padding: 24px 26px 22px; }
.tn-panel .side-where { font-size: 1.02rem; }
.tn-big { font-size: clamp(3rem, 10vw, 5.2rem); margin: 8px 0 4px; }
.tn-big .tn-sec { font-size: .45em; opacity: .8; }
.tn-panel .side-date { font-size: 1rem; }
.tn-status { text-align: left; margin-top: 16px; }
@media (max-width: 720px) {
    .tn-panel { min-height: 210px; }
    .tn-panel .side-main { padding: 18px 18px 16px; }
}

/* ---------- live clock cards (built on .wc-card from site.css) ---------- */
.tn-card .wc-top { align-items: baseline; }
.tn-card .wc-top .wc-abbr { margin-left: auto; font-size: .78rem; }
.tn-card .tn-sub { font-size: .8rem; opacity: .92; line-height: 1.35; }
.tn-card .tn-line { font-size: .8rem; opacity: .95; margin-top: 8px; line-height: 1.35; }
.tn-card .tn-note { font-size: .76rem; opacity: .92; margin-top: 8px; line-height: 1.4; }
.tn-card .wc-state { margin-top: 10px; }
.tn-card .tn-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tn-card .tn-links a { color: #fff; text-decoration: none; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(6, 10, 24, .32); border: 1px solid rgba(255, 255, 255, .3); text-shadow: none; }
.tn-card .tn-links a:hover { background: rgba(6, 10, 24, .5); }
.tn-card .tn-links a:focus-visible { outline-color: #fff; }

/* US zones: four mainland zones on the first row, Arizona / Alaska / Hawaii on the second */
.tn-zones { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.tn-zones > .tn-card { grid-column: span 3; }
.tn-zones > .tn-card:nth-child(n+5) { grid-column: span 4; }
.tn-zones .wc-card { min-height: 190px; }
@media (max-width: 900px) {
    .tn-zones { grid-template-columns: repeat(6, 1fr); }
    .tn-zones > .tn-card { grid-column: span 3; }
    .tn-zones > .tn-card:nth-child(n+5) { grid-column: span 2; }
}
@media (max-width: 640px) {
    .tn-zones { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tn-zones > .tn-card, .tn-zones > .tn-card:nth-child(n+5) { grid-column: span 1; }
    .tn-zones > .tn-card:last-child { grid-column: span 2; }
}

/* ---------- search + filter (city and country pages) ---------- */
.tn-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tn-search { flex: 1 1 260px; min-width: 0; padding: 11px 14px; border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--card-2); color: var(--text); font: 500 .98rem 'Inter', sans-serif; outline: none; }
.tn-search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .14); }
.tn-search::placeholder { color: var(--text-faint); }
.tn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-count { margin: 0 0 4px; font-size: .86rem; color: var(--text-faint); }
.tn-empty { padding: 18px; border: 1px dashed var(--stroke-strong); border-radius: var(--r-md); color: var(--text-dim); text-align: center; }
.tn-empty[hidden], .tn-group[hidden], .tn-card[hidden] { display: none; }
.tn-group { margin-top: 26px; }
.tn-group h2 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.25rem; letter-spacing: -.01em; margin: 0 0 12px; }
.tn-group h2 small { font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600; color: var(--text-faint); margin-left: 6px; }
.tn-grid-country { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 480px) {
    .tn-filter .tn-chips { width: 100%; }
    .tn-grid-country { grid-template-columns: 1fr; }
    .tn-grid-country .wc-time { font-size: 1.7rem; }
    .tn-grid-country .wc-meta { flex-direction: row; gap: 8px; font-size: .82rem; }
    .tn-grid-country .wc-abbr { margin-left: auto; }
}

/* ---------- content helpers ---------- */
.tn-map { margin: 0; background: #fff; border: 1px solid var(--stroke); border-radius: var(--r-md); padding: 12px; }
.tn-map img { display: block; width: 100%; height: auto; }
.tn-map figcaption { font-size: .86rem; color: #4a5670; margin-top: 8px; }
.conv-table td.tn-live { font-weight: 700; color: var(--text); }
.conv-table td.tn-dim { color: var(--text-faint); }
.tn-two { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .tn-two { grid-template-columns: 1fr; } }
.tn-two > * { min-width: 0; }

/* three-up comparison grids (UK, Singapore) and small fixes */
.tn-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .tn-grid-3 { grid-template-columns: 1fr 1fr; } }
.tn-card .wc-top { flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
.tn-card h3.wc-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.sect.tn-cont { margin-top: 0; }
@media (max-width: 640px) { .tn-zones .tn-sub { display: none; } }
.tn-zones .tn-sub { padding-right: 18%; }

/* ---------- tap-to-convert clocks ---------- */
.tn-card[data-tn-pick] { cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.tn-card[data-tn-pick]:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(6, 10, 24, .6); }
.tn-card[data-tn-pick]:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.tn-go { position: absolute; right: 12px; bottom: 12px; z-index: 3; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(6, 10, 24, .35); border: 1px solid rgba(255, 255, 255, .35); color: #fff; text-shadow: none; opacity: .9; }
.tn-card[data-tn-pick]:hover .tn-go { background: rgba(6, 10, 24, .55); opacity: 1; }
.tn-pick-link { border: 0; padding: 0; background: none; font: inherit; font-weight: 700; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tn-pick-link:hover { color: var(--text); }

/* ---------- US: compact strip of zone tiles above the converter ---------- */
.tn-strip-wrap { margin: 0 0 14px; }
.tn-zones.tn-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tn-zones.tn-strip > .tn-card, .tn-zones.tn-strip > .tn-card:nth-child(n+5) { grid-column: auto; }
.tn-strip .wc-card { min-height: 0; }
.tn-strip .wc-body { padding: 10px 11px 30px; }
.tn-strip .wc-top { display: block; }
.tn-strip .wc-name { font-size: .88rem; }
.tn-strip .wc-top .wc-abbr { display: block; margin: 1px 0 0; font-size: .64rem; opacity: .9; }
.tn-strip .tn-sub, .tn-strip .tn-next, .tn-strip .wc-meta { display: none; }
.tn-strip .wc-time { font-size: 1.28rem; margin: 6px 0 2px; }
.tn-strip .wc-time .tn-sec { display: none; }
.tn-strip .wc-state { margin-top: 4px; font-size: .64rem; padding: 2px 7px; }
.tn-strip .tn-go { right: 8px; bottom: 8px; font-size: .6rem; padding: 2px 7px; }
.tn-strip .sky-sun { width: 26px; height: 26px; } .tn-strip .sky-moon { width: 22px; height: 22px; }
@media (max-width: 1100px) { .tn-zones.tn-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tn-zones.tn-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-zones.tn-strip > .tn-card:last-child { grid-column: span 2; }
}
.tn-strip .wc-state { white-space: nowrap; font-size: .6rem; padding: 2px 6px; gap: 4px; max-width: 100%; overflow: hidden; }
.tn-strip .sky-sun, .tn-strip .sky-moon { opacity: .75; }
@media (max-width: 640px) {
  .tn-strip .wc-body { padding: 8px 10px; }
  .tn-strip .wc-state, .tn-strip .tn-go { display: none; }
  .tn-strip .wc-time { font-size: 1.15rem; margin: 3px 0 0; }
  .tn-strip .wc-top { display: flex; align-items: baseline; gap: 6px; }
  .tn-strip .wc-top .wc-abbr { margin: 0 0 0 auto; }
  .tn-strip .sky-sun, .tn-strip .sky-moon { width: 18px; height: 18px; }
}

/* ================= world pages: find, answer card, your clocks, right now ================= */
.wf-search { margin-bottom: 14px; }
.wf-lab { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.wf-box { position: relative; }
.wf-input { width: 100%; padding: 13px 16px 13px 42px; border: 1px solid var(--field-stroke); border-radius: var(--r-md); background-color: var(--card-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2356617b' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px 50%; color: var(--text); font: 500 1rem 'Inter', sans-serif; outline: none; }
.wf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(100, 70, 240, .15); }
.wf-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow); }
.wf-list[hidden] { display: none; }
.wf-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 9px 11px; border-radius: var(--r-sm); cursor: pointer; }
.wf-list li.hi, .wf-list li:hover { background: var(--card-2); }
.wf-list li small { color: var(--text-faint); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-list li span { font-weight: 700; font-variant-numeric: tabular-nums; }
.wf-list .wf-none { display: block; color: var(--text-dim); cursor: default; }
.wf-answer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: stretch; }
.wf-clock { border-radius: var(--r-lg); border: 1px solid var(--stroke); min-height: 230px; }
.wf-clock .side-main { padding: 20px 22px; }
.wf-sub { font-size: .84rem; opacity: .92; margin-top: 2px; }
.wf-time { font-size: clamp(2.6rem, 6vw, 3.8rem); margin: 10px 0 2px; }
.wf-sec { font-size: .45em; opacity: .8; }
.wf-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wf-facts { margin: 0; display: grid; }
.wf-row { display: grid; grid-template-columns: 138px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--stroke); font-size: .9rem; }
.wf-row:first-child { padding-top: 0; }
.wf-row dt { color: var(--text-faint); font-size: .8rem; font-weight: 600; }
.wf-row dd { margin: 0; color: var(--text-dim); line-height: 1.45; }
.wf-row dd b { color: var(--text); }
.wf-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 4px; }
.wf-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wf-badge.is-open { color: var(--good); background: var(--good-bg); }
.wf-badge.is-closed { color: var(--text-dim); background: var(--card-2); }
.wf-zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.wf-zones li { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; font-size: .84rem; }
.wf-zones li b { color: var(--text); font-variant-numeric: tabular-nums; }
.wf-zones li i { font-style: normal; color: var(--text-faint); font-size: .74rem; text-align: right; }
.wf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.wf-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--field-stroke); background: var(--card); color: var(--text); font: 600 .86rem 'Inter', sans-serif; text-decoration: none; cursor: pointer; }
.wf-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.wf-btn[hidden] { display: none; }
.wf-pin.on { background: var(--warn-bg); border-color: #d97706; color: var(--warn-ink); }
.wf-pin.on span { color: #d97706; }
.wf-sect { margin-top: 40px; }
.wf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wf-tile { display: grid; gap: 1px; text-align: left; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--stroke); border-left: 4px solid var(--stroke-strong); background: var(--card); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.wf-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.wf-tn { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-tt { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wf-td { font-size: .72rem; color: var(--text-faint); }
.wf-tile.m-work { border-left-color: #10b981; }
.wf-tile.m-evening, .wf-tile.m-morning, .wf-tile.m-day { border-left-color: #f59e0b; }
.wf-tile.m-night { border-left-color: #818cf8; }
.wf-tile.m-weekend { border-left-color: #94a3b8; }
.wf-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.wf-group { background: var(--card); border: 1px solid var(--stroke); border-top: 4px solid var(--stroke-strong); border-radius: var(--r-md); padding: 12px 14px; }
.wf-group.g-work { border-top-color: #10b981; }
.wf-group.g-evening, .wf-group.g-morning, .wf-group.g-day { border-top-color: #f59e0b; }
.wf-group.g-night { border-top-color: #818cf8; }
.wf-group.g-weekend { border-top-color: #94a3b8; }
.wf-group h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.wf-group h3 span { font-size: .72rem; font-weight: 700; color: var(--text-dim); background: var(--card-2); border-radius: 999px; padding: 1px 8px; }
.wf-group p { margin: 2px 0 8px; font-size: .74rem; color: var(--text-faint); }
.wf-group ul { list-style: none; margin: 0; padding: 0; }
.wf-group li button, .wf-li { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 5px 6px; margin: 0 -6px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.wf-group li button:hover, .wf-li:hover { background: var(--card-2); }
.wf-group li button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-group li button b, .wf-li b { font-variant-numeric: tabular-nums; font-size: .84rem; white-space: nowrap; }
.wf-more { margin-top: 6px; border: 0; background: none; color: var(--accent-ink); font: 700 .8rem 'Inter', sans-serif; cursor: pointer; padding: 4px 0; }
#all-cities h3 { font-size: 1rem; margin: 22px 0 8px; }
#all-cities h3 small { font-weight: 600; color: var(--text-faint); font-size: .78rem; margin-left: 4px; }
.wf-all { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 18px; }
.wf-all li { border-bottom: 1px solid var(--stroke); }
.wf-li { margin: 0; padding: 7px 6px; }
.wf-li span { font-weight: 700; white-space: nowrap; }
.wf-li small { flex: 1; min-width: 0; color: var(--text-faint); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .wf-answer { grid-template-columns: 1fr; } .wf-clock { min-height: 190px; } }
@media (max-width: 480px) { .wf-row { grid-template-columns: 1fr; gap: 2px; } .wf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
