/* Shared date/time picker, layered after Horizon v2. */
.hz-temporal-field { position: relative; min-width: 0; width: 100%; }
.hz-temporal-field > input, .hz-temporal-field > textarea { padding-inline-end: var(--control-h-m); }
.hz-temporal-field > .hz-temporal-source { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; pointer-events: none; }
.hz-temporal-field input::-webkit-calendar-picker-indicator { display: none; }
.hz-temporal-trigger { position: absolute; inset-block: 0; inset-inline-end: 0; width: var(--control-h-m); border: 0; padding: 0; display: grid; place-items: center; background: transparent; color: var(--muted-foreground); cursor: pointer; }
.hz-temporal-trigger:disabled { cursor: not-allowed; opacity: .5; }
.hz-temporal-trigger .hz-icon { font-size: var(--control-icon-m); }
body.hz-temporal-open { overflow: hidden; }
.hz-temporal-overlay { position: fixed; inset: 0; z-index: var(--z-popover); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; padding: var(--space-3); padding-top: max(var(--space-3), var(--hz-temporal-safe-top, 0px)); background: rgba(0, 0, 0, .45); box-sizing: border-box; }
.hz-temporal-overlay[hidden] { display: none; }
.hz-temporal-dialog { width: min(calc(var(--control-h-m) * 8), 100%); max-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); }
.hz-temporal-overlay[data-mode="popover"] { background: transparent; }
.hz-temporal-overlay[data-mode="popover"] .hz-temporal-dialog { position: absolute; max-width: calc(100% - var(--space-3) * 2); }
.hz-temporal-dialog.hz-temporal-short { display: block; overflow: auto; }
.hz-temporal-short .hz-temporal-body { overflow: visible; }
.hz-temporal-header, .hz-temporal-footer { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2); }
.hz-temporal-header { justify-content: space-between; border-bottom: 1px solid var(--border); }
.hz-temporal-title { margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }
.hz-temporal-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--space-2); display: flex; flex-direction: column; gap: var(--space-2); }
.hz-temporal-footer { justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--border); }
.hz-temporal-footer > :first-child { margin-inline-end: auto; }
.hz-temporal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.hz-temporal-fields[hidden], .hz-temporal-calendar[hidden] { display: none; }
.hz-temporal-fields .hz-field { min-width: 0; }
.hz-temporal-fields input { min-width: 0; }
.hz-temporal-nav { display: flex; align-items: center; flex: 1; min-width: 0; gap: var(--space-1); }
.hz-temporal-month { flex: 1; min-width: 0; height: auto; min-height: var(--control-h-s); padding-inline: var(--space-1); white-space: normal; font-weight: 600; }
.hz-temporal-step, .hz-temporal-dismiss { flex-shrink: 0; width: var(--control-h-s); padding: 0; font-size: var(--fs-h2); }
.hz-temporal-time { display: flex; gap: var(--space-2); }
.hz-temporal-time .hz-field { flex: 1; min-width: 0; gap: var(--space-1); }
.hz-temporal-time .hz-field-label { font-size: var(--fs-xs); color: var(--muted-foreground); }
.hz-temporal-time input { width: 100%; min-width: 0; text-align: center; font-size: var(--fs-h2); font-variant-numeric: tabular-nums; padding-inline: var(--space-1); }
.hz-temporal-calendar { width: 100%; table-layout: fixed; border-spacing: var(--space-0-5); }
.hz-temporal-calendar th { padding: 0; color: var(--muted-foreground); font-size: var(--fs-xs); font-weight: 500; text-align: center; }
.hz-temporal-calendar td { padding: 0; text-align: center; }
.hz-temporal-day { display: grid; place-items: center; width: 100%; min-height: var(--control-h-s); padding: 0; border: 0; border-radius: var(--radius-sm); color: var(--foreground); background: transparent; font-family: inherit; font-size: var(--fs-xs); line-height: var(--lh-xs); cursor: pointer; font-variant-numeric: tabular-nums; }
.hz-temporal-day:hover:not(:disabled) { background: var(--hover-overlay); color: var(--foreground); }
.hz-temporal-calendar [aria-selected="true"] .hz-temporal-day { background: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.hz-temporal-day[aria-current="date"] { box-shadow: inset 0 -2px var(--primary); }
.hz-temporal-calendar [aria-selected="true"] .hz-temporal-day[aria-current="date"] { box-shadow: inset 0 -2px var(--primary-foreground); }
.hz-temporal-day:disabled { color: var(--muted-foreground); opacity: .5; cursor: not-allowed; }
.hz-temporal-status { margin: 0; color: var(--muted-foreground); font-size: var(--fs-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.hz-temporal-status[data-tone="error"] { color: var(--destructive); }
@media (max-width: 640px) {
  .hz-temporal-overlay { align-items: end; }
}
