/* ============================================================
   When2Sync — styles.css
   Single self-contained stylesheet (no build step required)
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --bg-page:        #f8fafc;
  --bg-card:        #ffffff;
  --bg-input:       #ffffff;
  --bg-muted:       #f1f5f9;
  --bg-muted2:      #e2e8f0;
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;
  --indigo:         #4f46e5;
  --indigo-hover:   #4338ca;
  --indigo-light:   #eef2ff;
  --indigo-text:    #4338ca;
  --green:          #16a34a;
  --green-hover:    #15803d;
  --green-light:    #f0fdf4;
  --green-text:     #15803d;
  --red-text:       #dc2626;
  --orange:         #f97316;
  --orange-hover:   #ea580c;
  --shadow-card:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --radius:         0.5rem;
  --radius-lg:      0.75rem;
  --red-light:      #fff1f1;
  --red-border:     #fca5a5;
  --orange-light:   #fff7ed;
}


/* ── Base reset ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Layout ────────────────────────────────────────────────── */
.page-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.page-wrap-sm {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.page-section {
  padding: 2.5rem 1rem;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.nav-inner-sm {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--indigo);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--indigo-hover);
}

.nav-sep {
  color: var(--border-strong);
}

.nav-crumb {
  font-size: 0.875rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-spacer {
  margin-left: auto;
}

.nav-logo {
  height: 3rem;
  width: auto;
  max-width: 45vw;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.325rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background-color 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.nav-link-placeholder {
  opacity: 0.45;
  pointer-events: none;
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-muted);
  font-weight: 500;
}

@media (max-width: 600px) {
  .nav-link-placeholder { display: none; }
  .nav-logo { height: 2rem; max-width: 38vw; }
}


/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}

.card-sm {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

/* ── Form elements ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-label-note {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.form-error {
  font-size: 0.875rem;
  color: var(--red-text);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
}

.btn-primary:hover {
  background: var(--indigo-hover);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-success {
  background: var(--green);
  color: #fff;
}

.btn-success:hover {
  background: var(--green-hover);
}

.btn-warning {
  background: var(--orange);
  color: #fff;
}

.btn-warning:hover {
  background: var(--orange-hover);
}

.btn-warning:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-muted);
}

.btn-link {
  background: none;
  border: none;
  color: var(--indigo);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-copy {
  background: var(--indigo-light);
  color: var(--indigo-text);
  border: 1px solid rgba(79,70,229,0.2);
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-copy:hover {
  filter: brightness(0.95);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* ── View toggle ───────────────────────────────────────────── */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 0.25rem;
  gap: 0;
}

.view-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 400;
  transition: all 0.15s;
}

.view-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-card);
}

/* ── Event page header ─────────────────────────────────────── */
.event-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.event-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.event-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.event-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.event-share-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Event page layout ─────────────────────────────────────── */
.event-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .event-layout {
    flex-direction: row;
  }
}

.event-panel {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .event-panel {
    width: 18rem;
  }
}

.event-grid-wrap {
  flex: 1;
  min-width: 0;
}

/* ── Participant panel ─────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.panel-section {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.panel-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.panel-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.panel-text strong {
  color: var(--text-primary);
}

.panel-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Confirmed meeting card ────────────────────────────────── */
.meeting-confirmed-card {
  background: var(--green-light);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.meeting-confirmed-card .label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green-text);
}

.meeting-confirmed-card .time {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.125rem;
}

/* ── Participant list ──────────────────────────────────────── */
.participant-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.participant-dot {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.participant-info {
  min-width: 0;
}

.participant-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-tz {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-you {
  font-size: 0.75rem;
  color: var(--indigo);
  font-weight: 500;
}

.badge-lock {
  font-size: 0.875rem;
}

/* ── Best times list ───────────────────────────────────────── */
.best-times-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.best-time-item {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 0.5rem;
  font-size: 0.75rem;
}

.best-time-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.best-time-rank {
  color: var(--text-muted);
  width: 1rem;
  flex-shrink: 0;
}

.best-time-label {
  font-weight: 500;
  color: var(--text-primary);
}

.best-time-count {
  color: var(--text-secondary);
  margin-left: auto;
  flex-shrink: 0;
}

.avail-yes {
  color: #15803d;
  margin-left: 1rem;
}

.avail-no {
  color: #ef4444;
  margin-left: 1rem;
  margin-top: 0.125rem;
}


/* ── Availability grid ─────────────────────────────────────── */
.grid-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.grid-wrapper {
  overflow-x: auto;
  user-select: none;
  -webkit-user-select: none;
}

.grid-footer {
  margin-top: 0.75rem;
}

.grid-tz-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.grid-legend {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.grid-legend-bar {
  height: 0.5rem;
  width: 8rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.grid-select-hint {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 500;
  margin-top: 0.5rem;
}


.grid-join-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Grid cells */
[data-slot] {
  transition: background-color 0.05s;
}

.grid-slot {
  height: 1.25rem;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.grid-slot.hour-boundary {
  border-top: 2px solid var(--border-strong);
}

.grid-header-cell {
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
  text-align: center;
  padding: 0.25rem 0;
}

.grid-header-empty {
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.grid-label-cell {
  text-align: right;
  padding-right: 0.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 1px;
  height: 1.25rem;
  line-height: 1.25rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.grid-label-cell.on-hour {
  font-weight: 700;
  color: var(--text-primary);
  border-top: 2px solid var(--border-strong);
}

.grid-label-cell.off-hour {
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.slot-mine-available {
  background: #6366f1;
}

.slot-mine-empty {
  background: var(--bg-card);
}

.slot-mine-empty.editable:hover {
  background: #e0e7ff;
}

.slot-mine-empty.editable:active,
.slot-mine-available.editable:active {
  opacity: 0.7;
}

.slot-selectable {
  cursor: pointer;
}

.slot-selectable:hover {
  opacity: 0.75;
}

.slot-selectable:active {
  opacity: 0.6;
}

.editable {
  cursor: pointer;
}

.grid-slot:focus {
  outline: 2px solid var(--indigo);
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}

/* ── Banners ───────────────────────────────────────────────── */
.banner-confirmed {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.banner-hidden {
  display: none;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  pointer-events: none;
}

.toast.hidden {
  display: none;
}

.toast-inner {
  background: var(--green);
  color: #fff;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Sticky save bar (mobile) ──────────────────────────────── */
.sticky-save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  z-index: 40;
}

.sticky-save-bar.hidden {
  display: none;
}

@media (min-width: 768px) {
  .sticky-save-bar {
    display: none !important;
  }
}

/* ── Mobile bottom padding (avoid sticky bar overlap) ─────── */
@media (max-width: 767px) {
  .has-sticky-bar {
    padding-bottom: 5rem;
  }
}

/* ── Utility ───────────────────────────────────────────────── */
.hidden {
  display: none;
}

/* ── Error text ────────────────────────────────────────────── */
.error-text {
  font-size: 0.75rem;
  color: var(--red-text);
}

/* ── Calendar picker ───────────────────────────────────────── */
.calendar-wrap {
  width: 100%;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-nav-spacer {
  flex: 1;
}

.calendar-nav-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.6rem;
  font-size: 1rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
}

.calendar-nav-btn:hover {
  color: var(--brand);
  background: var(--bg-muted);
}

.calendar-months {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 480px) {
  .calendar-months {
    grid-template-columns: 1fr 1fr;
  }
}

.calendar-month {
  min-width: 0;
}

.calendar-month-title {
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

.calendar-dow-cell {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.1s;
}

.day-cell:hover:not(.disabled) {
  background-color: #e0e7ff;
}

.day-cell.disabled {
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

.day-cell.selected {
  background-color: #4f46e5;
  color: #fff;
}

.day-cell.today {
  box-shadow: 0 0 0 2px #818cf8;
}


/* ── Grid date header text helpers ────────────────────────── */
.grid-date-weekday {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.grid-date-md {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── How-it-works card ────────────────────────────────────── */
.hiw-card {
  background: var(--indigo-light);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.hiw-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--indigo-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.625rem;
}
.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hiw-step {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hiw-num {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}
.hiw-step strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Mobile: larger touch targets, flat page layout, sticky time labels ── */
@media (max-width: 767px) {
  .grid-slot       { height: 2rem; touch-action: none; }
  .grid-label-cell { height: 2rem; line-height: 2rem; font-size: 0.75rem; touch-action: pan-y;
                     position: sticky; left: 0; background: var(--bg-card); z-index: 2; }
  .grid-header-empty { position: sticky; left: 0; background: var(--bg-muted); z-index: 3; }

  /* Panel flows naturally with the page — no internal scroll */
  .event-panel     { max-height: none; height: auto; overflow: visible; }

  /* Remove floating card appearance — bake both sections into the page.
     Negative margins cancel .page-wrap's 1rem horizontal padding so both
     sections extend edge-to-edge. .grid-wrapper (base CSS) already owns
     the horizontal scroll, so .event-grid-wrap needs no overflow-x. */
  .panel {
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .grid-container {
    box-shadow: none;
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 0;
    padding-right: 0;
  }
  .event-layout { gap: 0; }
}

.panel-edit-prompt { margin-bottom: 0.75rem; }


/* ── Timezone Converter ─────────────────────────────────────── */

.conv-page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem 8rem; /* bottom pad leaves room for sticky rail on mobile */
}

/* Header */
.conv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.conv-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.conv-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.conv-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Settings panel */
.conv-settings {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.settings-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.settings-check {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: var(--indigo);
}

/* Search */
.conv-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.conv-search-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.625rem 0.875rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.conv-search-wrap:focus-within .conv-search-inner {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.conv-search-icon {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.5;
}

.conv-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  min-width: 0;
}

.conv-search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Search dropdown */
.tz-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  list-style: none;
  z-index: 100;
  overflow: hidden;
  max-height: 20rem;
  overflow-y: auto;
}

.tz-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  transition: background 0.1s;
}

.tz-dropdown-item:hover,
.tz-dropdown-item.highlighted {
  background: var(--indigo-light);
}

.tz-dropdown-item.added {
  opacity: 0.5;
  pointer-events: none;
}

.tz-drop-flag {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.tz-drop-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tz-drop-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tz-drop-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tz-drop-added {
  font-size: 0.6875rem;
  color: var(--indigo-text);
  font-weight: 500;
  flex-shrink: 0;
}

/* Location list */
.conv-location-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

/* Empty state */
.conv-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.conv-empty-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.conv-empty-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Location row card */
.conv-row {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s;
}

.conv-row:hover {
  box-shadow: var(--shadow-lg);
}

.conv-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.conv-row-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.conv-flag {
  font-size: 1.625rem;
  line-height: 1;
  flex-shrink: 0;
}

.conv-row-label-text {
  min-width: 0;
}

.conv-city {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-country {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-row-time {
  text-align: right;
  flex-shrink: 0;
}

.conv-time {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.conv-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.conv-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.conv-abbr {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.conv-offset {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.conv-diff {
  font-size: 0.75rem;
  color: var(--indigo-text);
  background: var(--indigo-light);
  border-radius: 0.25rem;
  padding: 0.1rem 0.375rem;
}

/* Callability badges */
.conv-call-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.1rem 0.375rem;
  border-radius: 0.25rem;
}

.conv-call-business  { color: var(--green-text);  background: var(--green-light); }
.conv-call-sleeping  { color: var(--red-text);     background: var(--red-light); }
.conv-call-afterhours,
.conv-call-early     { color: var(--orange);       background: var(--orange-light); }
.conv-call-unknown   { display: none; }

/* Row action buttons */
.conv-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
}

.conv-action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  min-width: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.conv-action-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.conv-action-remove:hover {
  background: var(--red-light);
  color: var(--red-text);
  border-color: var(--red-border);
}

/* Time rail */
.conv-rail-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem 0.875rem;
  box-shadow: var(--shadow-card);
}

.conv-rail-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  padding: 0 1.75rem; /* align with slider thumb range */
}

.conv-rail-labels span {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.conv-rail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.conv-step-btn {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.1s;
}

.conv-step-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

/* Range input — cross-browser */
.conv-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 0.375rem;
  border-radius: 0.25rem;
  background: var(--bg-muted2);
  outline: none;
  cursor: pointer;
}

.conv-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--indigo);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(79,70,229,0.35);
  transition: box-shadow 0.15s, transform 0.1s;
}

.conv-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(79,70,229,0.15);
  transform: scale(1.1);
}

.conv-slider::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--indigo);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(79,70,229,0.35);
}

.conv-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(79,70,229,0.25);
}

.conv-rail-time-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.conv-date-picker {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  outline: none;
}

.conv-date-picker:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.conv-date-picker:focus {
  background: var(--bg-muted);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.2);
  color: var(--text-primary);
}

.conv-rail-sep {
  color: var(--text-muted);
  font-size: 0.875rem;
  user-select: none;
}

.conv-rail-time {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  min-width: 5rem;
  text-align: center;
}

.conv-live-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--green);
  border-radius: 0.25rem;
  padding: 0.1rem 0.375rem;
}

/* Live dot in button */
.live-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.2s;
}

.live-dot-active {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}

/* Mobile */
@media (max-width: 767px) {
  .conv-page {
    padding-bottom: 6.5rem;
  }

  .conv-title {
    font-size: 1.25rem;
  }

  .conv-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .conv-header-actions {
    gap: 0.375rem;
  }

  .conv-time {
    font-size: 1.375rem;
  }

  .conv-flag {
    font-size: 1.375rem;
  }

  /* Sticky rail at bottom on mobile */
  .conv-rail-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 30;
    padding: 0.75rem 1rem 0.625rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  }

  .conv-search-input::placeholder {
    font-size: 0.875rem;
  }

  /* Full-width search on mobile */
  .conv-search-wrap {
    position: relative;
  }

  .tz-dropdown {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 7rem; /* anchored above sticky time rail */
    top: auto;
    max-height: 50vh;
  }

  .conv-action-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .conv-step-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .conv-slider::-webkit-slider-thumb {
    width: 2.75rem;
    height: 2.75rem;
  }

  .conv-slider::-moz-range-thumb {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 480px) {
  .conv-rail-labels span:nth-child(even) {
    display: none;
  }
}

/* ── Site footer ─────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.5rem 1rem;
  margin-top: 3rem;
}

.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer-inner a:hover {
  color: var(--text-primary);
}

/* Converter SEO description paragraph */
.conv-seo-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 0 1rem;
  margin-bottom: 1.25rem;
}
