/* The reference's date picker (Duet's, restyled), measured on its Snooze
   "Pick a date…": a white card with the month and year as menus and arrows,
   a month of round days, then the chosen day in words on a white field. */
.calendar { display: grid; gap: 9.6px; color: var(--color-ink); }

.calendar__card {
  margin-top: 5.5px;
  padding: 5.5px;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 5.5px;
  background: #fff;
}

.calendar__header { display: flex; align-items: center; justify-content: space-between; height: 30.625px; margin-bottom: 11px; }
.calendar__selects { display: flex; }

/* The native menus sit invisibly over their labels, as Duet's do */
.calendar__select { position: relative; display: inline-flex; margin-top: 4px; }
.calendar__select select { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; font-size: 16px; opacity: 0; cursor: pointer; }
.calendar__select-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 4px 8px;
  border-radius: 8.25px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 20.625px;
  pointer-events: none;
}
.calendar__select select:focus-visible + .calendar__select-label { box-shadow: 0 0 0 2px #3072dd; }
.calendar__chevron { width: 16px; height: 16px; }

.calendar__arrows { display: flex; }
.calendar__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17.6px;
  height: 17.6px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
}
.calendar__arrow svg { width: 17.6px; height: 21px; }
.calendar__arrow:disabled { opacity: 0.5; cursor: default; }
.calendar__arrow:focus { outline: none; }
.calendar__arrow:focus-visible { box-shadow: 0 0 0 2px #3072dd; }

.calendar__table { width: 100%; table-layout: fixed; border-collapse: collapse; border-spacing: 0; text-align: center; }
.calendar__weekday { padding: 1px 1px 8px; font-size: 11px; font-weight: 700; line-height: 13.75px; letter-spacing: 1px; text-transform: uppercase; }
.calendar__weekday abbr { text-decoration: none; }
.calendar__cell { height: 29.5px; padding: 1px; }

.calendar__day {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 27.5px;
  height: 27.5px;
  padding: 0 0 1px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-ink);
  font: 400 13.75px/17.1875px var(--font);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  cursor: pointer;
}
.calendar__day:hover::before, .calendar__day.is-today::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #3072dd; opacity: 0.06; }
.calendar__day.is-today { box-shadow: 0 0 0 1px #3072dd; }
.calendar__day:focus { outline: none; }
.calendar__day:focus-visible { box-shadow: 0 0 5px #3072dd; }
.calendar__day[aria-pressed="true"] { background: #3072dd; color: #fff; }
.calendar__day[aria-pressed="true"]::before { display: none; }
.calendar__day.is-outside { box-shadow: none; opacity: 0.6; cursor: default; pointer-events: none; }
.calendar__day.is-outside::before { display: none; }

.calendar__input-wrapper { padding: 5.5px 8.25px; border-radius: 5.5px; background: #fff; }
.calendar__input {
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: 400 15.4px/normal var(--font);
  text-align: center;
  cursor: default;
}
.calendar__input:focus { outline: none; }
