.date-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.date-picker:has(> .date-picker-source:is([hidden], .hidden)) { display: none; }
.date-picker > .date-picker-source {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.date-picker > .date-picker-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #cbdff2;
  border-radius: 12px;
  background: #fff;
  color: #102a4c;
  box-shadow: none;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.date-picker > .date-picker-trigger:hover,
.date-picker > .date-picker-trigger[aria-expanded="true"] {
  border-color: #0879c9;
  background: #f7fbff;
}
.date-picker > .date-picker-trigger[aria-disabled="true"] {
  color: #596f85;
  background: #edf3f8;
  cursor: default;
}
.date-picker > .date-picker-trigger[aria-invalid="true"] { border-color: #b64242; }
.date-picker-icon {
  position: relative;
  display: block;
  flex: 0 0 16px;
  box-sizing: border-box;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: #0875bb;
}
.date-picker-icon::before {
  position: absolute;
  top: 4px;
  right: 0;
  left: 0;
  border-top: 1.5px solid currentColor;
  content: "";
}
.date-picker-icon::after {
  position: absolute;
  top: -3px;
  left: 3px;
  width: 6px;
  height: 4px;
  border-inline: 1.5px solid currentColor;
  content: "";
}
.date-picker-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-picker-error { display: block; color: #963a3a; font-size: 12px; }
.date-picker-error:empty { display: none; }

.date-picker-popup {
  position: fixed;
  z-index: 2147483001;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 10px 13px 9px;
  border: 1px solid #cddff0;
  border-radius: 16px;
  background: #fff;
  color: #102a4c;
  box-shadow: 0 14px 40px #092c542e, 0 3px 8px #092c5410;
  font: 14px/1.3 Inter, system-ui, sans-serif;
  text-align: center;
}
.date-picker-header {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) 39px;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 3px;
  border-radius: 10px;
  background: #eff6fd;
}
.date-picker-popup button {
  appearance: none;
  box-sizing: border-box;
  min-width: 0;
  min-height: 39px;
  margin: 0;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}
.date-picker-popup .date-picker-nav { font-size: 24px; line-height: 1; }
.date-picker-popup .date-picker-heading { color: #0c5c96; font-weight: 750; }
.date-picker-popup .date-picker-heading:not(:disabled)::after { margin-left: 6px; content: "▾"; }
.date-picker-popup button:disabled { color: #8496a9; cursor: default; }
.date-picker-popup button:hover:not(:disabled) { background: #e8f3fd; }
.date-picker-popup button:focus-visible,
.date-picker-trigger:focus-visible { outline: 2px solid #0879c9; outline-offset: 2px; }
.date-picker-weekdays:not([hidden]), .date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.date-picker-weekdays { padding: 5px 0; color: #526d87; font-size: 11px; font-weight: 650; }
.date-picker-grid[data-view="month"], .date-picker-grid[data-view="year"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.date-picker-popup .date-picker-cell { font-variant-numeric: tabular-nums; }
.date-picker-popup .date-picker-cell[aria-current] { border-color: #78b7e6; color: #085d9c; font-weight: 750; }
.date-picker-popup .date-picker-cell[aria-pressed="true"]:not(:disabled) {
  background: #086db4;
  color: #fff;
  font-weight: 750;
}
.date-picker-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
  padding-top: 5px;
  border-top: 1px solid #e5eef7;
}
.date-picker-footer .date-picker-action { padding-inline: 11px; color: #526d87; font-weight: 650; }
.date-picker-footer .date-picker-today:not(:disabled) { background: #eef7ff; color: #0863a4; }
@media (pointer: coarse) {
  .date-picker-popup button { min-height: 42px; }
}
