/* our own pickers (owner, 5 Oct 2026): the calendar, the clock (src/ui/pickers.js) and the colour picker
   (src/ui/colourpicker.js); never the phone's own */

/* ---------------------------------------------------------------- the card over a dim */
.pk-dim { position: absolute; inset: 0; z-index: 40; border: none; padding: 0; background: rgba(43, 38, 34, 0.35); cursor: default; }
.pk-dim::after { display: none; }
.pk-card {
  position: absolute; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 340px; max-height: 372px;
  padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px; animation: pkIn .18s ease-out both;
}
@keyframes pkIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .pk-card { animation: none; } }
.pk-top { display: flex; align-items: center; gap: 8px; }
.pk-h { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-b {
  position: relative; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; border: 1.5px solid #D8CDBB; background: #FFFFFF;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.pk-b[data-on] { background: var(--honey); border: 2px solid var(--ink); }

/* ---------------------------------------------------------------- the calendar */
.pk-cal { display: flex; flex-direction: column; gap: 4px; }
.pk-head { display: flex; align-items: center; gap: 8px; }
.pk-title {
  flex: 1; height: 34px; border-radius: 17px; border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pk-title span { font-size: 11px; }
.pk-week, .pk-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.pk-week span { text-align: center; font-size: 11px; font-weight: 800; color: var(--label); }
.pk-day {
  position: relative; height: 38px; border: none; background: none; padding: 0; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 800; border-radius: 19px;
}
.pk-day::after { height: 100%; width: 100%; } /* the grid's cells are the targets: neighbours never overlap */
.pk-day.today { box-shadow: inset 0 0 0 2px #D8CDBB; }
.pk-day.on { background: var(--honey); box-shadow: inset 0 0 0 2px var(--ink); }
.pk-day[aria-disabled="true"] { color: #C9BBA6; }
.pk-empty { height: 38px; }
.pk-years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 246px; overflow-y: auto; padding: 4px 2px; }

/* ---------------------------------------------------------------- the clock */
.pk-clock { display: flex; flex-direction: column; gap: 4px; }
.pk-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pk-hours .pk-b { height: 32px; font-size: 13px; }
.pk-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pk-mins.fine { grid-template-columns: repeat(6, 1fr); }
.pk-mins .pk-b { height: 32px; font-size: 13px; }
.pk-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pk-now { flex: 1; font-size: 22px; font-weight: 800; }
/* the time wheel (owner, 6 Oct 2026): scroll the hours and the minutes; the band marks the picked ones */
.pk-wheels { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pk-band { position: absolute; left: 40px; right: 40px; top: 72px; height: 36px; border-radius: 12px; background: var(--honey-soft); border: 2px solid var(--ink); pointer-events: none; }
.pk-wheel {
  position: relative; z-index: 1; width: 92px; height: 180px; padding: 72px 0; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 68%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 68%, transparent 100%);
}
.pk-wheel::-webkit-scrollbar { display: none; }
@media (pointer: fine) { .pk-wheel, .pk-wheel .pk-wi { cursor: grab; } .pk-wheel:active, .pk-wheel:active .pk-wi { cursor: grabbing; } } /* (a mouse drags it) */
.pk-wi { display: block; width: 100%; height: 36px; padding: 0; border: none; background: none; scroll-snap-align: center; font: inherit; font-size: 20px; font-weight: 800; color: var(--label); }
.pk-wi::after { display: none; } /* (the rows are the targets: neighbours never overlap) */
.pk-wi[aria-selected="true"] { color: var(--ink); }
.pk-colon { position: relative; z-index: 1; font-size: 22px; font-weight: 800; }

/* ---------------------------------------------------------------- the colour picker */
.cp { position: absolute; inset: 0; z-index: 40; }
.cp-dim { position: absolute; inset: 0; background: rgba(43, 38, 34, 0.35); }
.cp-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 420px; padding: 12px 16px 14px;
  display: flex; flex-direction: column; gap: 8px; animation: pkIn .18s ease-out both;
}
.cp-h { font-size: 16px; font-weight: 800; }
.cp-body { display: flex; gap: 16px; }
.cp-left { display: flex; flex-direction: column; gap: 12px; }
.cp-sv {
  position: relative; width: 250px; height: 160px; border-radius: 12px; border: 2px solid var(--ink); touch-action: none; cursor: crosshair;
}
.cp-hue {
  position: relative; width: 250px; height: 26px; border-radius: 13px; border: 2px solid var(--ink); touch-action: none; cursor: pointer;
  background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
}
.cp-dot {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 11px; border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--ink); pointer-events: none;
}
.cp-hue .cp-dot { top: 50%; background: transparent !important; }
.cp-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cp-swatches { display: flex; height: 64px; border-radius: 14px; overflow: hidden; border: 2px solid var(--ink); }
.cp-swatches span { flex: 1; }
.cp-labels { display: flex; font-size: 11px; margin-top: -4px; }
.cp-labels span { flex: 1; text-align: center; }
.cp-done, .cp-cancel { height: 40px; }
.cp-done { margin-top: auto; }

/* a calendar that is part of a screen (Pair's "when did your story begin?") */
.pk-inline { width: 340px; padding: 10px 12px; }

/* ---------------------------------------------------------------- swipe to confirm (src/ui/swipe.js) */
.sw { position: relative; width: 240px; height: 44px; border-radius: 22px; background: #FBEDEA; border: 2px solid #B55A3C; overflow: hidden; }
.sw-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(181, 90, 60, 0.2); }
.sw-label { position: absolute; inset: 0; padding-left: 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #B55A3C; pointer-events: none; }
.sw-knob {
  position: absolute; left: 3px; top: 3px; width: 34px; height: 34px; border-radius: 17px; border: none; padding: 0; background: #B55A3C;
  color: #FFFFFF; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab;
}
.sw-knob::after { width: 44px; height: 44px; }
