/* The Get-Go: date and colour pickers (pickers.js). Used by the app and by the guest registration page, so the
   colours fall back from the app's names (--plum, --muted) to the registration page's (--p, --mute). */
.pk-wrap, .pk-layer {
  --pk-acc: var(--plum, var(--p, #6b0147));
  --pk-ink: var(--ink, #23161e);
  --pk-mute: var(--muted, var(--mute, #85757e));
  --pk-line: var(--line, #ece4da);
  --pk-soft: color-mix(in srgb, var(--pk-acc) 8%, #fff);
}

/* ---- the date field: the hidden native input under a button */
.pk-wrap { position: relative; display: block; min-width: 0; }
.pk-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.dp-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; cursor: pointer; font-family: inherit; color: var(--pk-ink); line-height: 1.3; }
.dp-btn:not(.input) { border: 1px solid var(--pk-line); border-radius: 11px; padding: 10px 12px; font-size: 16px; background: #fff; }
@media (min-width: 600px) { .dp-btn:not(.input) { font-size: 14px; } }
.dp-btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--pk-acc) 35%, transparent); outline-offset: 0; border-color: var(--pk-acc); }
.dp-btn:disabled { opacity: .55; cursor: not-allowed; }
.bad .dp-btn { border-color: #b42318; }
.dp-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-ph { color: var(--pk-mute); }
.dp-ico { flex: none; color: var(--pk-mute); }

/* ---- the picker: a popover under the field, or a sheet from the bottom on phones */
.pk-layer *, .pk-layer *::before, .pk-layer *::after, .pk-wrap * { box-sizing: border-box; }
/* The pages' own button styles (padding, min sizes) must not leak into the picker grids. */
.pk-layer button { margin: 0; min-width: 0; min-height: 0; letter-spacing: normal; text-transform: none; }
.pk-layer { position: fixed; inset: 0; z-index: 95; pointer-events: none; font-family: inherit; color: var(--pk-ink); }
.pk-pop { position: fixed; pointer-events: auto; background: #fff; border: 1px solid var(--pk-line); border-radius: 12px; padding: 12px;
  box-shadow: 0 2px 6px rgb(42 10 31 / .06), 0 20px 44px -18px rgb(42 10 31 / .38); animation: pk-in .14s ease; }
@keyframes pk-in { from { opacity: 0; transform: translateY(-4px); } }
.pk-is-sheet { pointer-events: auto; }
.pk-bg { position: absolute; inset: 0; background: rgb(35 15 28 / .45); animation: pk-fade .15s ease; }
@keyframes pk-fade { from { opacity: 0; } }
.pk-is-sheet .pk-pop { left: 0; right: 0; bottom: 0; top: auto; border-radius: 18px 18px 0 0; border: 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px)); animation: pk-up .2s ease; }
@keyframes pk-up { from { transform: translateY(100%); } }
.pk-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--pk-line); margin: 0 auto 12px; }
.pk-icon { flex: none; padding: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--pk-ink); cursor: pointer; }
.pk-icon:hover { background: var(--pk-soft); }
.pk-link { border: 0; background: none; padding: 8px 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--pk-acc); cursor: pointer; border-radius: 6px; }
.pk-btn { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--pk-acc); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pk-pop button:focus-visible, .pk-pop [tabindex]:focus-visible { outline: 2px solid var(--pk-acc); outline-offset: 1px; }

/* ---- calendar */
.pk-date { width: 300px; }
.pk-is-sheet .pk-date { width: auto; }
.dp { max-width: 420px; margin: 0 auto; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.dp-title { flex: 1; height: 34px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--pk-ink); cursor: pointer; }
.dp-title:hover:not(:disabled) { background: var(--pk-soft); }
.dp-title:disabled { cursor: default; }
.dp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-wd { display: grid; place-items: center; height: 28px; font-size: 11.5px; font-weight: 600; color: var(--pk-mute); }
.dp-day { aspect-ratio: 1; min-height: 36px; max-height: 48px; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--pk-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-day:hover:not(:disabled):not(.dp-on) { background: var(--pk-soft); }
.dp-out { color: var(--pk-mute); opacity: .55; }
.dp-today { box-shadow: inset 0 0 0 1px var(--pk-acc); color: var(--pk-acc); font-weight: 600; }
.dp-on, .dp-on:hover { background: var(--pk-acc); color: #fff; box-shadow: none; opacity: 1; }
.dp-day:disabled, .dp-cell:disabled { opacity: .3; cursor: not-allowed; }
.dp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 0; }
.dp-cell { height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--pk-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-cell:hover:not(:disabled):not(.dp-on) { background: var(--pk-soft); }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--pk-line); }

/* ---- colour panel */
.pk-color { width: 300px; }
.pk-is-sheet .pk-color { width: auto; }
.cp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 420px; margin: 0 auto; }
.cp-sv { position: relative; height: 160px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.cp-hue { position: relative; height: 14px; border-radius: 7px; cursor: pointer; touch-action: none;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
.cp-knob { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .25), 0 2px 4px rgb(0 0 0 / .25); transform: translate(-50%, -50%); pointer-events: none; }
.cp-hue .cp-knob { top: 50%; }
.cp-row { display: flex; align-items: center; gap: 8px; }
.cp-prev { flex: none; width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.cp-hex { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--pk-line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--pk-ink); background: #fff; font-variant-numeric: tabular-nums; }
.cp-hex:focus { outline: none; border-color: var(--pk-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pk-acc) 15%, transparent); }
.cp-sw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cp-s { aspect-ratio: 1; width: 100%; padding: 0; border: 0; border-radius: 6px; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.cp-s.cp-on { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12), 0 0 0 2px #fff, 0 0 0 4px var(--pk-acc); }
