/* Date pickers stay in the form's scrolling flow, including native dialogs. */
.localized-date-field { min-inline-size: 0; inline-size: 100%; }
.dynamic-table .localized-date-field { min-inline-size: 260px; }
.localized-date-control { display: flex; align-items: stretch; gap: 8px; min-inline-size: 0; }
.localized-date-control .localized-date-input { flex: 1 1 0; inline-size: 0; min-inline-size: 0; font-variant-numeric: tabular-nums; text-align: start; }
.date-picker-trigger { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; min-block-size: 44px; padding: 8px; background: var(--surface, #fff); color: var(--cyan-dark, #087d90); border: 1px solid var(--line, #e1e7ee); border-radius: 12px; }
.date-picker-trigger:hover, .date-picker-trigger[aria-expanded="true"] { background: var(--cyan-pale, #e9f9fb); border-color: var(--cyan, #12a5bc); }
.localized-date-hint { display: block; margin-block-start: 5px; color: var(--muted, #7b8798); font-size: 11px; line-height: 1.8; }
.localized-date-error { display: block; color: var(--red, #d25461); font-size: 12px; line-height: 1.8; }
.localized-date-error:empty { display: none; }
.localized-date-input[aria-invalid="true"] { border-color: var(--red, #d25461); }
.date-picker-popover { inline-size: 100%; max-inline-size: 380px; min-inline-size: 0; margin-block-start: 10px; padding: 12px; border: 1px solid var(--line, #e1e7ee); border-radius: 16px; background: var(--surface, #fff); color: var(--text, #17263a); box-shadow: var(--shadow, 0 5px 25px #142c4614); }
.date-picker-popover[hidden] { display: none !important; }
.date-picker-header { display: grid; grid-template-columns: 32px 32px minmax(0, 1fr) 32px 32px; align-items: center; gap: 2px; margin-block-end: 10px; }
.date-picker-title { text-align: center; font-size: 13px; white-space: nowrap; }
.date-picker-nav { padding: 0; min-inline-size: 0; min-block-size: 36px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 22px; line-height: 1; }
.date-picker-nav:hover { background: var(--cyan-pale, #e9f9fb); }
.date-picker-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.date-picker-weekday { min-inline-size: 0; overflow: hidden; text-overflow: clip; padding-block: 6px; color: var(--muted, #7b8798); font-size: 10px; text-align: center; white-space: nowrap; }
.date-picker-day { display: flex; align-items: center; justify-content: center; min-inline-size: 0; min-block-size: 36px; margin: 1px 0; padding: 3px; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.date-picker-day:hover:not(:disabled) { background: var(--cyan-pale, #e9f9fb); }
.date-picker-day.is-outside { color: var(--muted, #7b8798); opacity: .65; }
.date-picker-day.is-today { border-color: var(--cyan, #12a5bc); font-weight: 700; }
.date-picker-day.is-selected, .date-picker-day.is-selected:hover { background: var(--cyan-dark, #087d90); color: #fff; opacity: 1; border-color: var(--cyan-dark, #087d90); }
.date-picker-day:disabled { opacity: .3; cursor: not-allowed; }
.date-picker-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; padding-block-start: 10px; border-block-start: 1px solid var(--line, #e1e7ee); }
.date-picker-footer button, .date-picker-popover > button { min-block-size: 36px; padding: 6px 10px; color: var(--cyan-dark, #087d90); background: transparent; border: 0; border-radius: 8px; font-size: 12px; }
.date-picker-footer button:hover, .date-picker-popover > button:hover { background: var(--cyan-pale, #e9f9fb); }
.date-picker-message { margin: 6px 0 14px; font-size: 12px; }
.date-picker-sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body[data-theme="dark"] .date-picker-popover, body[data-theme="dark"] .date-picker-trigger { background: #10243b; border-color: #25445f; color: #cde4fa; }
body[data-theme="dark"] .date-picker-trigger:hover, body[data-theme="dark"] .date-picker-nav:hover, body[data-theme="dark"] .date-picker-day:hover:not(:disabled), body[data-theme="dark"] .date-picker-footer button:hover { background: #193d55; }
body[data-theme="dark"] .date-picker-footer { border-color: #25445f; }
body[data-theme="dark"] .date-picker-footer button { color: #69d2e1; }
body[data-theme="dark"] .date-picker-day.is-selected { background: #0c8092; color: #fff; }
@media (max-width: 640px) {
  .date-picker-popover { padding: 10px; }
  .date-picker-header { grid-template-columns: 28px 28px minmax(0, 1fr) 28px 28px; gap: 0; }
  .date-picker-day { min-block-size: 40px; }
  .date-picker-trigger { flex-basis: 44px; }
}
