/* Date, time and colour choices are pages, with the form draft behind them. */
body.date-picker-open,
body.value-picker-open { overflow: hidden; }

.value-picker-backdrop,
#date-overlay .picker-backdrop {
  padding: 0;
  background: var(--bg, #151618);
  backdrop-filter: none;
  align-items: stretch;
  justify-content: stretch;
  z-index: 2000;
}

.value-picker,
#date-overlay .date-dialog {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg, #151618);
  color: var(--text, #eeeeef);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  animation: picker-page-enter 180ms ease-out;
}

#date-overlay .date-dialog { grid-template-rows: auto minmax(0, 1fr) auto; }
#date-overlay .date-dialog.is-continuing { animation: none; }

.value-picker > header,
#date-overlay .date-dialog > header {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line, #303137);
}

.value-picker > header > .icon-btn,
#date-overlay .date-dialog > header > .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  background: transparent;
  color: var(--text, #eeeeef);
  border: 0;
  border-radius: 50%;
}

.value-picker > header > div,
#date-overlay .date-dialog > header > div { min-width: 0; }

.value-picker h2,
#date-overlay .date-dialog h2 {
  font-size: clamp(20px, 5.8vw, 24px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 0;
}

.value-picker > header p,
#date-overlay .date-dialog > header p {
  font-size: 13px;
  line-height: 1.5;
  margin: 5px 0 0;
  color: var(--muted, #a6a6b1);
}

.value-picker-body,
.date-picker-body {
  width: 100%;
  max-width: 560px;
  min-height: 0;
  margin: 0 auto;
  padding: 28px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.value-picker > footer,
#date-overlay .date-dialog > footer {
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px max(20px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  background: var(--bg, #151618);
  border-top: 1px solid var(--line, #303137);
}

.value-picker > footer .btn,
#date-overlay .date-dialog > footer .btn {
  min-height: 50px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 550;
  box-shadow: none;
  white-space: normal;
}

.value-picker-error,
.date-picker-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.value-picker-error:not(:empty) {
  box-sizing: border-box;
  width: 100%;
  max-width: 600px;
  padding: 10px 20px;
  margin: 0 auto;
}

.date-picker-error:not(:empty) { margin: 12px 0 0; }

.value-wheels { gap: 16px; }
.value-wheel-label {
  color: var(--muted, #a6a6b1);
  font-size: 13px;
  margin: 0 0 14px;
}

.value-wheel {
  height: 264px;
  padding-block: 110px;
  border-radius: 18px;
  background: linear-gradient(to bottom, transparent 110px, var(--surface-2, #292a30) 110px, var(--surface-2, #292a30) 154px, transparent 154px);
  mask-image: linear-gradient(transparent, #000 34%, #000 66%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 34%, #000 66%, transparent);
}

.value-wheel-option {
  height: 44px;
  line-height: 44px;
  font-size: 25px;
  color: var(--muted, #a6a6b1);
  font-weight: 400;
  transition: color 100ms ease;
}

.value-wheel-option.selected {
  color: var(--text, #eeeeef);
  font-size: 30px;
  font-weight: 600;
}

.value-manual,
.color-custom {
  border: 0;
  border-top: 1px solid var(--line, #303137);
  margin: 28px 0 0;
  padding: 24px 0 0;
}

.value-manual .field,
.color-custom .field { display: grid; gap: 10px; margin: 0; }

.value-manual .field > span,
.color-custom .field > span,
.color-custom h3 {
  color: var(--text, #eeeeef);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.value-manual input,
.date-manual input,
.color-custom .field input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 1px solid var(--line, #36373e);
  border-radius: 14px;
  background: var(--surface-2, #292a30);
  color: var(--text, #eeeeef);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.value-manual small { color: var(--muted, #a6a6b1); font-size: 12px; line-height: 1.4; }
.value-clear { margin-top: 16px; min-height: 44px; color: var(--muted, #a6a6b1); }

.color-picker-preview {
  border: 1px solid var(--line, #303137);
  background: var(--surface, #212227);
  border-radius: 18px;
  margin-bottom: 24px;
}
.color-picker-preview strong { color: var(--text, #eeeeef); letter-spacing: 0; }
.color-picker-preview > span,
.color-picker-preview small { color: var(--muted, #a6a6b1); }
.color-palette { gap: 14px; }
.color-swatch { height: 50px; border-radius: 14px; }
.color-swatch[aria-pressed="true"] { outline-color: var(--text, #eeeeef); }
.color-hue { padding-block: 24px; color: var(--muted, #a6a6b1); }

.date-month-nav { margin: 0 0 20px; }
.date-month-nav button:disabled { opacity: .35; cursor: default; }
.date-month-nav strong { font-size: 18px; font-weight: 550; }
.date-calendar { gap: 8px 4px; }
.date-weekday { color: var(--muted, #a6a6b1); font-size: 11px; }
.date-day { min-height: 46px; border-radius: 50%; font-size: 16px; }
.date-day.today { border-color: var(--accent-border); color: var(--accent-ink); }
.date-day.selected { background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
.date-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.date-shortcuts .btn { min-height: 46px; border-radius: 14px; }
.date-manual { display: grid; gap: 12px; margin-top: 28px; }

@keyframes picker-page-enter {
  from { opacity: .8; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-height: 650px) {
  .value-picker-body, .date-picker-body { padding-top: 18px; }
  .value-manual, .color-custom { margin-top: 20px; padding-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .value-picker, #date-overlay .date-dialog { animation: none; }
  .value-wheel-option { transition: none; }
}
/* E-007: calendar header and actions in the Account A component family. */
#date-overlay .date-dialog h2{font-size:20px;font-weight:650;letter-spacing:-.4px}
#date-overlay .date-dialog>footer .btn{border-radius:14px;font-weight:600}
#date-overlay .date-dialog button:focus-visible{outline:2px solid var(--accent-graphic);outline-offset:2px}
/* E-008: numeric values retain the wheel, range and manual entry. */
.value-picker[data-picker-kind=number] h2{font-size:20px;font-weight:650;letter-spacing:-.4px}
.value-picker[data-picker-kind=number]>footer .btn{border-radius:14px;font-weight:600}
.value-picker[data-picker-kind=number] :is(button,input,[role=spinbutton]):focus-visible{outline:2px solid var(--accent-graphic);outline-offset:2px}
/* E-010: colour preview matches the grouped surfaces; swatches keep their hues. */
.value-picker[data-picker-kind=color] h2{font-size:20px;font-weight:650;letter-spacing:-.4px}
.value-picker[data-picker-kind=color]>footer .btn{border-radius:14px;font-weight:600}
.value-picker[data-picker-kind=color] .color-picker-preview{border-radius:17px;box-shadow:none}
.value-picker[data-picker-kind=color] :is(button,input):focus-visible{outline:2px solid var(--accent-graphic);outline-offset:3px}
