/* Scheduling picker (js/when.js): quick choices, month calendar, time field with common times, summary. Only component styles – colours via tokens. */
.wp { display: flex; flex-direction: column; gap: 14px; }
.wp-form { gap: 14px; }
.wp-head { display: flex; flex-direction: column; gap: 2px; }
.wp-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wp-q { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; min-width: 0; }
.wp-q b { font-size: var(--fs-sm); font-weight: 600; }
.wp-q small { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wp-q:hover:not(:disabled) { border-color: var(--accent); }
.wp-q.on { border-color: var(--accent); background: var(--accent-50); box-shadow: inset 0 0 0 1px var(--accent); }
.wp-q.on small { color: var(--text-2); }
.wp-q:disabled { opacity: .55; cursor: default; }
.wp-q:focus-visible, .wp-day:focus-visible, .wp-t:focus-visible, .wp-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wp-custom { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.wp-calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wp-calhead b { font-size: var(--fs-sm); }
.wp-nav { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.wp-nav:disabled { opacity: .35; cursor: default; }
.wp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.wp-wd { text-align: center; font-size: 11px; color: var(--text-3); padding: 2px 0 4px; }
.wp-day { aspect-ratio: 1; min-height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; font-variant-numeric: tabular-nums; }
.wp-day:hover:not(:disabled):not(.on) { background: var(--surface-3); }
.wp-day.today { box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.wp-day.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.wp-day:disabled { color: var(--text-3); opacity: .45; cursor: default; }

.wp-time { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wp-tl { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.wp-tl input { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 8px 12px; max-width: 170px; height: auto; }
.wp-times { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-t { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-xs); cursor: pointer; font-variant-numeric: tabular-nums; }
.wp-t:hover { border-color: var(--accent); }
.wp-t.on { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.wp-tz { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.wp-ico { width: 14px; height: 14px; }

.wp-sum { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.45; }
.wp-sum > svg { flex: none; margin-top: 1px; }
.wp-sum > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wp-sum.ok { background: var(--ok-bg); color: var(--ok); }
.wp-sum.warn { background: var(--warn-bg); color: var(--warn); }
.wp-sum.err { background: var(--err-bg); color: var(--err); }
.wp-sum b { color: inherit; font-weight: 600; }
.wp-other { color: var(--text-2); font-size: var(--fs-xs); }
.wp-fix { align-self: flex-start; margin-top: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: var(--fs-xs); cursor: pointer; }

.wp-plan { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; counter-reset: wp; }
.wp-plan li { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: var(--fs-sm); counter-increment: wp; }
.wp-plan li::before { content: counter(wp); color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 1.4em; }
.wp-plan li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-plan li b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.wp-plan li.muted::before { content: ""; }

@media (max-width: 640px) {
  .wp-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wp-custom { grid-template-columns: 1fr; padding: 10px; }
  .wp-tl input { max-width: none; }
  .wp-sum { order: 1; } .wp-custom { order: 2; }   /* the summary stays in sight right below the quick choices */
}
