/* The date chooser is its own native modal, above the time editor. */
.record-date-field #recordDate[hidden] { display: none !important; }
#recordDateButton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid rgba(58, 82, 69, .13);
  border-radius: 12px;
  color: var(--ink, #263a30);
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, background-color .16s ease;
}
#recordDateButton svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--ink-muted, #7a877f); }
#recordDateButton:hover { border-color: rgba(58, 82, 69, .3); }
#recordDateButton:focus-visible { outline: 3px solid rgba(53, 121, 95, .25); outline-offset: 2px; }
#recordDateDisplay { min-width: 0; overflow-wrap: anywhere; }
.record-date-picker {
  box-sizing: border-box;
  width: min(356px, calc(100vw - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-width: none;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: auto;
  padding: 18px 16px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(56, 79, 66, .07);
  border-radius: 24px;
  color: #273c32;
  background: #fff;
  box-shadow: 0 24px 80px rgba(31, 49, 39, .2);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.record-date-picker[open] { animation: rdp-appear .18s ease-out; }
.record-date-picker::backdrop { background: rgba(23, 37, 29, .2); }
.record-date-picker * { box-sizing: border-box; }
.record-date-picker button,
.record-date-picker input,
.record-date-picker select { font-family: inherit; }
.rdp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rdp-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 14px; }
.rdp-heading {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #273c32;
  font-size: 16px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.rdp-heading svg { width: 15px; height: 15px; flex: 0 0 auto; color: #89968e; transition: transform .15s ease; }
.rdp-heading[aria-expanded="true"] svg { transform: rotate(180deg); }
.rdp-month-title { min-width: 0; overflow-wrap: anywhere; }
.rdp-nav { display: flex; align-items: center; flex: 0 0 auto; gap: 0; }
.rdp-icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #61756a;
  font-size: 24px;
  cursor: pointer;
  touch-action: manipulation;
}
.rdp-icon-button svg { width: 19px; height: 19px; }
.rdp-icon-button.rdp-close { width: 34px; margin-left: 2px; color: #99a59e; }
.rdp-icon-button:disabled { opacity: .28; cursor: default; }
.rdp-icon-button:not(:disabled):hover { background: #f0f5f1; }
.record-date-picker button:focus-visible { outline: 2px solid #3c7b60; outline-offset: 2px; }
.rdp-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 6px; }
.rdp-weekdays span { padding: 6px 0; color: #99a59e; font-size: 11px; font-weight: 550; text-align: center; }
.rdp-grid { display: flex; flex-direction: column; gap: 3px; }
.rdp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rdp-cell { display: flex; align-items: center; justify-content: center; min-width: 0; }
.rdp-day {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 42px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #354d40;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .12s ease, background-color .12s ease;
}
.rdp-day:hover { background: #f0f5f1; }
.rdp-day.is-today { color: #327555; box-shadow: inset 0 0 0 1px #d8e9df; font-weight: 650; }
.rdp-day.is-selected { color: #fff; background: #39765a; box-shadow: none; font-weight: 650; }
.rdp-day.is-selected:hover { background: #30674e; }
.rdp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 3px 0;
  border-top: 1px solid #edf1ee;
}
.rdp-selected-date { color: #89978e; font-size: 12px; font-variant-numeric: tabular-nums; }
.rdp-today, .rdp-chooser-done {
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #39765a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.rdp-today:hover, .rdp-chooser-done:hover { background: #f0f5f1; }
.rdp-month-chooser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 12px;
  background: #f4f7f5;
}
.rdp-month-chooser[hidden] { display: none; }
.rdp-chooser-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rdp-chooser-field > span { color: #809087; font-size: 11px; line-height: 1.2; }
.rdp-chooser-field :is(select, input) {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 8px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
  color: #354d40;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.rdp-chooser-field input { appearance: textfield; -moz-appearance: textfield; }
.rdp-chooser-field input::-webkit-outer-spin-button,
.rdp-chooser-field input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.rdp-chooser-done { padding-inline: 4px; }
@keyframes rdp-appear { from { opacity: .6; transform: translateY(5px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 360px) {
  .record-date-picker { padding: 14px 12px 10px; border-radius: 21px; }
  .rdp-heading { font-size: 15px; }
  .rdp-icon-button { width: 32px; }
  .rdp-icon-button.rdp-close { width: 28px; }
  .rdp-top { margin-bottom: 10px; }
  .rdp-month-chooser { gap: 6px; padding: 8px; }
  .rdp-day { font-size: 13px; }
}
@media (max-height: 480px) {
  .record-date-picker { padding-top: 10px; padding-bottom: 8px; border-radius: 20px; }
  .rdp-top { margin-bottom: 3px; }
  .rdp-weekdays { margin-bottom: 1px; }
  .rdp-weekdays span { padding-block: 2px; }
  .rdp-day { max-width: 35px; }
  .rdp-grid { gap: 1px; }
  .rdp-footer { margin-top: 7px; padding-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .record-date-picker[open] { animation: none; }
  #recordDateButton, .rdp-heading svg, .rdp-day { transition: none; }
}
