/* ============================================================
   Calendly Personal — "Liquid Glass" design system
   Grayscale base, single accent (amber/orange) reserved for
   selection / active / primary-action states only.
   ============================================================ */

:root {
  color-scheme: light;

  --bg-0: #eceae6;
  --bg-1: #f2f0ec;
  --bg-2: #ffffff;

  --fg: #17171a;
  --fg-dim: #35353a;
  --muted: #6c6c72;
  --muted-2: #8f8f94;

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(20, 20, 20, 0.09);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: rgba(30, 25, 20, 0.16);

  --divider: rgba(20, 20, 20, 0.08);

  --accent: #e2611a;
  --accent-2: #ff7f3f;
  --accent-fg: #fff8f3;
  --accent-glow: rgba(226, 97, 26, 0.28);
  --accent-glow-soft: rgba(226, 97, 26, 0.12);
  --success: #2f8f4e;
  --success-glow: rgba(47, 143, 78, 0.22);
  --danger: #a3341f;
  --danger-bg: rgba(200, 60, 40, 0.1);
  --danger-border: rgba(200, 60, 40, 0.25);

  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 11px;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: var(--font-sans);
  --font-display: var(--font-sans);
  --font-mono: "SFMono-Regular", "SF Mono", Consolas, monospace;

  --input-bg: rgba(0, 0, 0, 0.02);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 0.95rem;
  --text-md: 1.05rem;
  --text-lg: 1.28rem;
  --text-xl: 1.85rem;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-0: #0b0b12;
  --bg-1: #13131c;
  --bg-2: #1d1d28;

  --fg: #e6e6f0;
  --fg-dim: #c0c0cd;
  --muted: #9090a0;
  --muted-2: #707080;

  --glass: rgba(20, 20, 30, 0.55);
  --glass-strong: rgba(28, 28, 40, 0.78);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-highlight: rgba(255, 255, 255, 0.04);
  --glass-shadow: rgba(0, 0, 0, 0.45);

  --divider: rgba(255, 255, 255, 0.07);
  --input-bg: rgba(255, 255, 255, 0.04);
  --danger: #ff8a75;
  --danger-bg: rgba(255, 90, 60, 0.12);
  --danger-border: rgba(255, 90, 60, 0.3);

  /* Slightly brighter than the light-theme glow so selection/focus states
     stay legible against a near-black background — the accent hue itself
     stays identical between themes on purpose. */
  --accent-glow: rgba(255, 143, 79, 0.34);
  --accent-glow-soft: rgba(255, 143, 79, 0.16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* Baseline keyboard-focus ring for anything that doesn't define its own —
   most inputs/selects override this with a matching box-shadow glow instead
   (see their :focus rules below); this is the fallback for plain buttons,
   chips and links that don't. */
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg-0);
  background-image:
    radial-gradient(ellipse 900px 700px at 15% -10%, rgba(255, 122, 51, 0.07), transparent 55%),
    radial-gradient(ellipse 800px 600px at 110% 10%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 1000px 800px at 50% 120%, rgba(255, 255, 255, 0.035), transparent 60%);
  /* background-attachment: fixed is a known source of repaint jank on
     mobile Safari, especially with the keyboard resizing the viewport —
     left as normal scroll attachment instead. */
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  z-index: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.16;
  margin: 0 0 8px;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

/* ---------- Brand lockup (wordmark) ---------- */

.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}

.brand-word {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
}

.brand-name {
  font-weight: 700;
  color: var(--fg);
}

.brand-by {
  font-weight: 400;
  color: var(--muted-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

h1 { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }

.subtitle {
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0 0 28px;
}

/* ---------- Glass surface primitive ---------- */

.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 20px 50px -20px var(--glass-shadow);
}

.card {
  padding: 30px 28px;
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
}

.card + .card { margin-top: 24px; }

/* ---------- Animations ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.app > * {
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.app > *:nth-child(1) { animation-delay: 0.02s; }
.app > *:nth-child(2) { animation-delay: 0.08s; }
.app > *:nth-child(3) { animation-delay: 0.14s; }
.app > *:nth-child(4) { animation-delay: 0.2s; }
.app > *:nth-child(5) { animation-delay: 0.26s; }
.app > *:nth-child(6) { animation-delay: 0.32s; }

/* ---------- Duration segmented control ---------- */

.duration-picker { margin-bottom: 22px; }

.duration-picker > label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 10px;
}

.duration-options {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(20px);
}

.duration-options button {
  flex: 1;
  padding: 9px 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: color 0.25s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.duration-options button:hover:not(.active) { color: var(--fg); background: var(--glass-strong); }

.duration-options button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow-soft); }

.duration-options button.active {
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  color: var(--accent-fg);
  box-shadow: 0 6px 18px -4px var(--accent-glow);
}

/* ---------- Day picker ---------- */

.day-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 6px;
}

.day-picker button {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--fg);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(16px);
}

.day-picker button:hover:not(:disabled) {
  border-color: var(--accent);
  transform: scale(1.06);
}

.day-picker button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.day-picker button:disabled { opacity: 0.3; cursor: default; }

.current-day {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--fg);
}

/* When .current-day is a <button> (i.e. it opens the calendar dropdown
   below) it needs its own reset — plain divs elsewhere keep the bare
   styling above untouched. */
button.current-day {
  /* .day-picker button (the round ‹ › nav buttons) also matches this
     element and would otherwise force it into a 38px circle, clipping the
     date text — reset every box property it sets. */
  width: auto;
  height: auto;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-md);
  cursor: pointer;
  padding: 6px 12px;
  white-space: nowrap;
  backdrop-filter: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
button.current-day:hover { background: var(--glass); border-color: var(--glass-border); }
button.current-day:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow-soft); }

/* ---------- Calendar dropdown popover ---------- */

.day-picker { position: relative; }

.cal-dd-popover {
  position: absolute;
  top: calc(100% + 8px);
  /* Centered via left+margin, NOT translateX(-50%) — the dialog-in
     animation below animates `transform`, and an animated transform fully
     replaces the static value, silently dropping the centering once the
     animation applies (the popover then hangs off to the right). */
  left: 50%;
  margin-left: -138px; /* half of width */
  z-index: 60;
  width: 276px;
  padding: 16px;
  border-radius: var(--radius-md);
  /* Fully opaque on purpose: it floats over the hour grid, and a
     translucent glass panel lets the numbers underneath bleed through.
     Border is deliberately stronger than --glass-border — the popover is
     the same near-white as the card below it, and the default hairline
     visually dissolved into the background. */
  background: var(--bg-2);
  border: 1px solid rgba(20, 20, 20, 0.14);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 24px 60px -16px rgba(0, 0, 0, 0.35);
  animation: dialog-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .cal-dd-popover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 24px 60px -16px rgba(0, 0, 0, 0.7);
}

.cal-dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-dd-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--fg);
  text-transform: capitalize;
}

.cal-dd-nav {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--fg);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: border-color 0.15s ease;
}
.cal-dd-nav:hover { border-color: var(--accent); }
.cal-dd-nav:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow-soft); }

.cal-dd-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-dd-weekdays span {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
}

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

.cal-dd-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--fg-dim);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cal-dd-cell.empty { visibility: hidden; cursor: default; }
.cal-dd-cell:hover:not(.disabled):not(.selected) { background: var(--glass-strong); }
.cal-dd-cell:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-glow-soft); }
.cal-dd-cell.today { color: var(--accent-2); font-weight: 700; }
.cal-dd-cell.selected {
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  color: var(--accent-fg);
  font-weight: 700;
}
.cal-dd-cell.disabled { opacity: 0.28; cursor: default; }

@media (max-width: 400px) {
  .cal-dd-popover { width: 240px; left: 50%; margin-left: -120px; }
}

/* ---------- Slots ---------- */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  min-height: 60px;
}

.slots .loading, .slots .empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
  padding: 30px 0;
}

/* Marks where slots cross into the next calendar day for the viewer's
   selected timezone — without it, late slots (e.g. 03:00 the next day in a
   far-ahead zone) silently read as the same evening. */
.slot-day-divider {
  grid-column: 1 / -1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  padding: 10px 2px 2px;
  margin-top: 4px;
  border-top: 1px solid var(--divider);
}

.slot-btn {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--fg-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  backdrop-filter: blur(16px);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.slot-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px var(--accent-glow);
}

.slot-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.slot-btn:active {
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  color: var(--accent-fg);
  border-color: transparent;
}

/* ---------- Dialog ---------- */

dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 30px;
  background: var(--bg-2);
  background-image:
    radial-gradient(ellipse 400px 300px at 20% -20%, rgba(255, 122, 51, 0.1), transparent 60%);
  color: var(--fg);
  max-width: 400px;
  width: 90%;
  /* Anchored near the top instead of vertically centered, and sized off the
     dynamic viewport (dvh) rather than vh — on mobile Safari, vh recalculates
     as the address bar / keyboard show or hide, which makes a centered
     element visibly jump while typing. Top-anchored + dvh stays put. */
  /* Horizontal centering via left/right/margin-auto (not transform) — the
     entrance animation below also animates `transform`, and animated
     transforms fully replace the static value, so a translateX(-50%) here
     would get silently dropped once the animation finishes. */
  position: fixed;
  top: 6dvh;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 30px 80px -20px rgba(0, 0, 0, 0.65);
}

dialog::backdrop {
  background: rgba(4, 4, 5, 0.6);
  backdrop-filter: blur(4px);
}

dialog[open] {
  animation: dialog-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#selectedSlotLabel {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider);
}

#bookingForm label,
#captchaLabel {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  margin: 16px 0 7px;
}

#bookingForm label:first-of-type { margin-top: 0; }

#bookingForm input,
#bookingForm textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--input-bg);
  color: var(--fg);
  font-size: var(--text-base);
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#bookingForm input:focus,
#bookingForm textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.dialog-error {
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 600;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.dialog-actions button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background 0.2s ease, transform 0.15s ease;
}

.dialog-actions button:hover { background: var(--glass); }
.dialog-actions button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow-soft); }

#confirmBooking {
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  color: var(--accent-fg);
  border-color: transparent;
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}

#confirmBooking:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px -6px var(--accent-glow); }
#confirmBooking:active:not(:disabled) { transform: translateY(0); }
#confirmBooking:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  color: var(--fg);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: 0 12px 30px -10px var(--glass-shadow);
  z-index: 10;
}

/* ---------- Generic link / button chips (landing + admin links) ---------- */

.link-card {
  display: block;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.link-card .link-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.link-card .link-desc {
  color: var(--muted);
  font-size: var(--text-sm);
}

.hint {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ---------- Timezone awareness (client booking pages) ---------- */

.timezone-panel {
  margin: -4px 0 24px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.2)),
    var(--glass);
}

.timezone-status {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.timezone-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-fg);
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 20px -10px var(--accent-glow);
  font-weight: 700;
  font-size: var(--text-sm);
}

.timezone-panel.same .timezone-icon {
  background: var(--success);
  box-shadow: 0 8px 20px -10px var(--success-glow);
}

.timezone-title {
  color: var(--fg);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
}

.timezone-copy {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.timezone-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.timezone-pair > div {
  position: relative;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.34);
}

.timezone-pair span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: 2px;
}

.timezone-choice label {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: 2px;
}

.timezone-select-value {
  padding-right: 22px;
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timezone-pair strong {
  display: block;
  min-width: 0;
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timezone-choice select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  line-height: 1.35;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
}

.timezone-choice select:focus {
  outline: none;
}

.timezone-choice::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.timezone-choice:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.tz-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.tz-row label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  flex-shrink: 0;
}

.tz-row select {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--fg);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.tz-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

@media (max-width: 520px) {
  .timezone-pair { grid-template-columns: 1fr; }
  .tz-row {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 400px) {
  /* "60 мин" etc. wrap to two lines inside the pill at this width otherwise —
     tightening padding/tracking/size keeps every label on one line. */
  .duration-options { gap: 3px; padding: 4px; }
  .duration-options button {
    padding: 9px 4px;
    font-size: var(--text-xs);
    white-space: nowrap;
  }
}

/* ---------- Dark theme overrides ---------- */

[data-theme="dark"] body {
  background: var(--bg-0);
  background-image:
    radial-gradient(ellipse 900px 700px at 15% -10%, rgba(226, 97, 26, 0.04), transparent 55%),
    radial-gradient(ellipse 800px 600px at 110% 10%, rgba(255, 255, 255, 0.02), transparent 60%),
    radial-gradient(ellipse 1000px 800px at 50% 120%, rgba(255, 255, 255, 0.015), transparent 60%);
}

[data-theme="dark"] body::before {
  opacity: 0.22;
}

[data-theme="dark"] dialog {
  background: var(--bg-2);
  background-image:
    radial-gradient(ellipse 400px 300px at 20% -20%, rgba(226, 97, 26, 0.07), transparent 60%);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 30px 80px -20px rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .timezone-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--glass);
}

[data-theme="dark"] .timezone-pair > div {
  background: rgba(255, 255, 255, 0.04);
}
