/* Time zone converter - controls bar + stacked zone rows with aligned 24h strips.
   Reuses base .field / .seg / .btn-outline; colors from theme tokens only. */

.tz-controls {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px;
}
.tz-search { position: relative; flex: 1 1 260px; min-width: 0; }
.tz-search .field { width: 100%; box-sizing: border-box; }
.tz-results {
    position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
    overflow: hidden; max-height: 280px; overflow-y: auto;
}
.tz-result {
    display: block; width: 100%; text-align: left; font: inherit; font-size: 14px;
    padding: 9px 12px; background: none; border: none; color: var(--text); cursor: pointer;
}
.tz-result:hover { background: var(--bg); color: var(--accent-strong); }

.tz-work { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.tz-work label { display: flex; align-items: center; gap: 8px; }
.tz-work .select { padding: 6px 1.8rem 6px 8px; background-position: right 0.55rem center; }

.tz-anchor {
    margin: 0 0 14px; color: var(--muted); font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.tz-rows { display: flex; flex-direction: column; gap: 8px; }
.tz-empty { color: var(--muted); font-size: 14px; padding: 16px 12px; margin: 0; }

.tz-row {
    display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: center;
    padding: 10px 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px;
}
.tz-row--local { border-color: var(--accent); }
.tz-row[draggable="true"] { cursor: grab; }

.tz-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tz-city { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tz-localtag {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--accent-strong); border: 1px solid var(--accent); border-radius: 6px; padding: 0 6px;
}
.tz-offset { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tz-time {
    font-size: 18px; font-variant-numeric: tabular-nums;
    display: flex; align-items: center; gap: 8px;
}
.tz-daybadge {
    font-size: 12px; font-weight: 700; color: var(--bad);
    border: 1px solid var(--bad); border-radius: 6px; padding: 0 5px;
}

.tz-strip {
    position: relative; display: grid; grid-template-columns: repeat(24, 1fr);
    height: 40px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    touch-action: none; user-select: none;
}
.tz-cell {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--muted); border-right: 1px solid var(--border);
    background: var(--bg); font-variant-numeric: tabular-nums;
}
.tz-cell:last-child { border-right: none; }
.tz-cell--work { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); }
.tz-nowline {
    position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-strong);
    pointer-events: none; transform: translateX(-1px);
}

.tz-remove {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 1px solid var(--border-strong); border-radius: 8px;
    background: var(--surface); color: var(--muted); cursor: pointer;
    transition: border-color .15s, color .15s;
}
.tz-remove:hover { border-color: var(--bad); color: var(--bad); }

/* On phones the 24h strip is tight: let the rows scroll horizontally as a block so the
   label and strip stay aligned. */
@media (max-width: 680px) {
    .tz-rows { overflow-x: auto; }
    .tz-row { grid-template-columns: 150px 520px auto; }
}
