/* Custom dropdown and date + time picker (js/picker.js) */

.select {
  display: inline-flex; align-items: center; gap: 0.55rem; text-align: left; cursor: pointer;
  background: var(--paper); box-shadow: var(--shadow-sm);
}
.select > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select .placeholder { color: var(--muted); }
.select svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.select .chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s; }
.select .cal { width: 17px; height: 17px; color: var(--gold); }
.select.open { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16); }
.select.open .chev { transform: rotate(180deg); }

.pop {
  position: fixed; z-index: 200; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(17, 17, 24, 0.02);
  animation: pop-in 0.16s ease-out; transform-origin: top left;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

/* dropdown list */
.pop-list { padding: 0.35rem; }
.pop-list button {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; width: 100%;
  border: 0; background: none; padding: 0.6rem 0.75rem; border-radius: 10px; font-size: 0.86rem; text-align: left; outline: none;
}
.pop-list button:hover, .pop-list button:focus-visible { background: var(--surface-2); }
.pop-list button svg { width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.pop-list button[aria-selected="true"] { font-weight: 600; }
.pop-list button[aria-selected="true"] svg { opacity: 1; }

/* calendar */
.pop-date { width: 25rem; padding: 1rem 1.05rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.cal-head strong { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.cal-head strong span { color: var(--muted); font-weight: 500; }
.cal-head .nav { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; }
.cal-head .nav:hover { background: var(--surface-2); }
.cal-head .nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.15rem; }
.cal-grid em { font-style: normal; text-align: center; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); padding: 0.25rem 0 0.4rem; }
.cal-grid button {
  aspect-ratio: 1; border: 0; background: none; border-radius: 50%; font-size: 0.85rem; font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s;
}
.cal-grid button:hover:not(:disabled) { background: var(--surface-2); }
.cal-grid button.today { color: var(--gold); font-weight: 700; }
.cal-grid button.on { background: var(--gold-grad); color: #fff; font-weight: 600; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.8); }
.cal-grid button:disabled { color: #c9c9d0; cursor: default; }

/* time */
.time { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.4rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.time .label { margin: 0 0.2rem 0 0; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.time b { color: var(--muted); font-weight: 600; }
.spin { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.spin output { min-width: 1.9rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.spin button { width: 26px; height: 32px; border: 0; background: var(--surface); display: grid; place-items: center; }
.spin button:hover { background: var(--surface-2); }
.spin svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--paper); padding: 0.42rem 0.45rem; min-width: 1.95rem; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--surface-2); }
.seg button.on { background: var(--ink); color: #fff; font-weight: 600; }
.ampm { margin-left: auto; flex: none; }
.seg { flex: none; }

.pop-date .quick { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.85rem; }
.pop-foot { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
