/* The time zone picker with the meeting time that recalculates: a white meeting card in Kinnet, an invented meetings
   app. The whole card is scaled by the script to fit the window (height too), so every size here is in plain pixels. */
:root {
  --page: #ffffff;          /* the page */
  --card: #ffffff;          /* the card */
  --ink: #12141a;           /* the words */
  --muted: #7a7f8c;         /* the small words */
  --line: #eceef3;          /* the thin lines */
  --accent: #3b5bfd;        /* the accent: the marker, the check, the focus */
  --night: #1b2147;         /* the night on the day bars */
  --dawn: #f2a07b;          /* dawn and dusk on the day bars */
  --day: #ffe3a3;           /* the middle of the day on the day bars */
  --glow: #ffd27a;          /* set by the script: the light at the top of the card, warm by day, indigo by night */
}

* { box-sizing: border-box; }
html { touch-action: manipulation; }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.tz {
  position: relative;
  width: 360px;
  padding: 20px 20px 18px;
  border-radius: 24px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(18, 20, 26, .07),
    0 1px 2px rgba(18, 20, 26, .05),
    0 8px 18px -6px rgba(18, 20, 26, .10),
    0 30px 60px -24px rgba(30, 40, 90, .22);
  transform-origin: 50% 50%;
  isolation: isolate;
}
.tz::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  pointer-events: none;
}
.tz__glow {
  position: absolute;
  left: 8%; right: 8%; top: -1px;
  height: 120px;
  border-radius: 24px 24px 50% 50%;
  background: radial-gradient(60% 90% at 50% 0%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
}

/* head */
.tz__head { display: flex; align-items: center; gap: 11px; }
.tz__app {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(160deg, #20253a, #0c0e16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 6px -2px rgba(12, 14, 22, .5);
}
.tz__app svg { width: 20px; fill: none; stroke: #fff; stroke-width: 1.5; }
.tz__app circle:last-child { stroke: #9fb0ff; }
.tz__meta { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tz__title { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.tz__sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tz__people { display: flex; }
.tz__people span {
  width: 26px; height: 26px; margin-left: -4px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 8.5px; font-weight: 650; letter-spacing: 0;
  color: hsl(var(--h) 45% 30%);
  background: hsl(var(--h) 70% 92%);
  box-shadow: 0 0 0 2px var(--card);
}

/* the meeting time */
.tz__time { margin-top: 20px; display: grid; gap: 4px; }
.tz__label { font-size: 11px; font-weight: 560; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tz__clock { position: relative; display: flex; align-items: flex-start; gap: 8px; height: 58px; }
.tz__digits {
  display: flex;
  font-size: 54px;
  line-height: 58px;
  height: 58px;
  font-weight: 560;
  font-variation-settings: 'wdth' 92;
  letter-spacing: -.035em;
}
.tz__drum { position: relative; display: block; height: 58px; overflow: hidden; width: .64em; text-align: center; }
.tz__drum-in { display: block; will-change: transform; }
.tz__drum-in span { display: block; height: 58px; }
.tz__colon { display: block; width: .3em; text-align: center; transform: translateY(-3px); color: #b9bdc8; }
.tz__plus {
  align-self: flex-start;
  margin-top: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px; font-weight: 620;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, white);
  white-space: nowrap;
}
.tz__plus:empty { display: none; }
.tz__read { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tz__where { font-size: 13px; color: var(--muted); height: 18px; overflow: hidden; }
.tz__where b { color: var(--ink); font-weight: 600; }

/* the local day */
.tz__day { margin-top: 14px; }
.tz__strip {
  position: relative;
  display: block;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    var(--night) 0%, var(--night) 18%, var(--dawn) 27%, var(--day) 38%, var(--day) 66%, var(--dawn) 78%, var(--night) 88%, var(--night) 100%);
  box-shadow: inset 0 0 0 1px rgba(18, 20, 26, .06), inset 0 1px 2px rgba(0, 0, 0, .12);
}
.tz__mark {
  position: absolute;
  top: -5px; left: 0;
  width: 3.125%;
  height: 20px;
}
.tz__mark-in {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 0 0 2px var(--accent), 0 4px 10px -2px color-mix(in srgb, var(--accent) 60%, transparent);
  backdrop-filter: blur(2px);
}
.tz__hours {
  display: flex; justify-content: space-between;
  margin-top: 7px;
  font-size: 10px; color: #a3a8b4;
}

/* the field */
.tz__field-wrap { position: relative; margin-top: 18px; }
.tz__field-label { display: block; font-size: 11px; font-weight: 560; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.tz__field {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px 0 12px;
  border-radius: 14px;
  background: linear-gradient(#fcfcfd, #f6f7f9);
  box-shadow: inset 0 0 0 1px #e3e5eb, inset 0 1px 0 #fff, 0 1px 2px rgba(18, 20, 26, .05);
  cursor: pointer;
  transition: box-shadow .25s ease;
}
.tz__field:focus-visible { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
@media (hover: hover) {
  .tz__field:hover { box-shadow: inset 0 0 0 1px #d4d7df, inset 0 1px 0 #fff, 0 2px 6px -2px rgba(18, 20, 26, .12); }
}
.tz__field[aria-expanded='true'] { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.tz__globe svg { width: 18px; display: block; fill: none; stroke: #5d6270; stroke-width: 1.3; }
.tz__city { flex: 1; height: 20px; overflow: hidden; font-size: 15px; font-weight: 580; }
.tz__city-in { display: block; line-height: 20px; }
.tz__now { font-size: 13px; color: var(--muted); }
.tz__chev svg { width: 12px; display: block; fill: none; stroke: #5d6270; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.tz__field[aria-expanded='true'] .tz__chev svg { transform: rotate(0deg); }

/* the list, opening upwards over the card */
.tz__pop {
  position: absolute;
  left: -8px; right: -8px;
  bottom: 58px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    0 0 0 1px rgba(18, 20, 26, .08),
    0 12px 24px -8px rgba(18, 20, 26, .18),
    0 36px 60px -20px rgba(30, 40, 90, .28),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transform-origin: 50% 100%;
  z-index: 3;
}
.tz__search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 11px;
  border-radius: 11px;
  background: #f3f4f7;
  box-shadow: inset 0 0 0 1px #e8eaef;
}
.tz__search svg { width: 16px; flex: none; fill: none; stroke: #8a8f9b; stroke-width: 1.6; stroke-linecap: round; }
.tz__search input {
  all: unset;
  flex: 1;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  caret-color: var(--accent);
}
.tz__search input::placeholder { color: #a3a8b4; }
.tz__list {
  position: relative;
  margin-top: 6px;
  max-height: 196px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.tz__list::-webkit-scrollbar { display: none; }
.tz__hi {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 44px;
  border-radius: 11px;
  background: #f1f3f8;
  box-shadow: inset 0 0 0 1px #e6e9f1;
  opacity: 0;
  pointer-events: none;
}
.tz__opt {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 18px;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  height: 44px;
  padding: 0 10px 0 11px;
  border-radius: 11px;
  cursor: pointer;
  user-select: none;
}
.tz__opt-name { font-size: 14px; font-weight: 560; line-height: 18px; }
.tz__opt-off { font-size: 11px; color: var(--muted); line-height: 14px; grid-row: 2; }
.tz__opt-time { grid-column: 2; grid-row: 1 / 3; font-size: 13px; color: #3c404a; text-align: right; }
.tz__opt-bar {
  grid-column: 2; grid-row: 2;
  justify-self: end;
  position: relative;
  width: 54px; height: 4px; margin-top: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--night) 0%, var(--night) 18%, var(--dawn) 27%, var(--day) 38%, var(--day) 66%, var(--dawn) 78%, var(--night) 88%);
  align-self: start;
}
.tz__opt-time { align-self: start; margin-top: 6px; }
.tz__opt-tick {
  position: absolute;
  top: -2px; width: 2px; height: 8px; margin-left: -1px;
  border-radius: 1px;
  background: var(--ink);
  box-shadow: 0 0 0 1.5px #fff;
}
.tz__opt-check { grid-column: 3; grid-row: 1 / 3; width: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tz__opt[aria-selected='true'] .tz__opt-check { opacity: 1; }
.tz__opt[aria-selected='true'] .tz__opt-name { color: var(--accent); }
.tz__empty { margin: 0; padding: 18px 0 8px; text-align: center; font-size: 13px; color: var(--muted); }

/* the drawn pointer of the pilot */
.pilot {
  position: absolute;
  left: 0; top: 0;
  width: 22px;
  fill: #12141a;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}
