/* Reverie — date range picker (pairs with assets/js/daterange.js).
   An inline calendar page: month names in the display italic, numerals in the text serif,
   ink caps on arrival and departure, a seafoam band for the nights between. */

/* With script, the native date fields stay in the form but leave the screen. */
.daterange.is-enhanced > .field {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.dr { --dr-cap: 40px; }
.dr__summary {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink, #191917);
}
.dr__end { display: flex; flex-direction: column; gap: 4px; min-width: 9em; }
.dr__label {
  font-family: var(--label, 'Helvetica Neue', Arial, sans-serif); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
}
.dr__value { font-family: var(--display, Georgia, serif); font-size: 22px; line-height: 1.2; }
.dr__value.is-empty { font-style: italic; color: var(--ink-3, #6B655C); }
.dr__arrow { padding-bottom: 3px; font-family: var(--label, sans-serif); color: var(--accent, #1E5C58); }
.dr__nights { margin-left: auto; padding-bottom: 2px; font-family: var(--display, Georgia, serif); font-style: italic; font-size: 20px; color: var(--accent, #1E5C58); }
.dr__clear {
  min-height: 32px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink-2, #4F4B44);
  font-family: var(--label, sans-serif); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 3px;
}
.dr__clear:hover { color: var(--accent, #1E5C58); }

.dr__cal { position: relative; margin-top: 18px; }
.dr__bar { position: absolute; inset: 0 0 auto 0; z-index: 1; display: flex; justify-content: space-between; pointer-events: none; }
.dr__nav {
  pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--rule, #CBC3B4); border-radius: 50%; background: transparent; color: var(--ink, #191917); cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.dr__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.dr__nav:hover:not(:disabled) { background: var(--ink, #191917); border-color: var(--ink, #191917); color: var(--paper, #F2EEE6); }
.dr__nav:disabled { opacity: .3; cursor: default; }

.dr__months { display: grid; grid-template-columns: repeat(var(--dr-months, 2), minmax(0, 1fr)); gap: 36px; }
.dr__title {
  margin: 0; height: 40px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display, Georgia, serif); font-style: italic; font-weight: 400; font-size: 22px; line-height: 1;
}
.dr__grid { width: 100%; margin-top: 10px; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; }
.dr__grid th {
  padding: 4px 0 6px; text-align: center; font-family: var(--label, sans-serif); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3, #6B655C);
}
.dr__sr, .dr__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dr__cell { padding: 0; text-align: center; }

.dr__day {
  position: relative; display: grid; place-items: center; width: 100%; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink, #191917); font-family: var(--text, var(--display, Georgia, serif)); font-size: 18px; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums; -webkit-tap-highlight-color: transparent;
}
.dr__num {
  position: relative; display: grid; place-items: center; width: var(--dr-cap); height: var(--dr-cap); border-radius: 50%;
  transition: background .25s, color .25s;
}
.dr__day:hover .dr__num { background: var(--paper-2, #E9E3D7); }
.dr__day:focus-visible { outline: none; }
.dr__day:focus-visible .dr__num { outline: 2px solid var(--accent, #1E5C58); outline-offset: 2px; }
.dr__day[aria-disabled="true"] { color: var(--ink-3, #6B655C); opacity: .42; cursor: default; }
.dr__day[aria-disabled="true"]:hover .dr__num { background: none; }
.dr__cell.is-unavailable .dr__num { text-decoration: line-through; }
.dr__cell.is-today .dr__num::after {
  content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent, #1E5C58);
}

/* The range: a band through the nights, capped by the arrival and departure days. */
.dr__cell.is-inrange { background: var(--paper-foam, #DCE7E2); }
.dr__cell.is-start.has-end { background: linear-gradient(to right, transparent 50%, var(--paper-foam, #DCE7E2) 50%); }
.dr__cell.is-end { background: linear-gradient(to left, transparent 50%, var(--paper-foam, #DCE7E2) 50%); }
.dr__cell.is-preview.is-inrange { background: color-mix(in srgb, var(--paper-foam, #DCE7E2) 55%, transparent); }
.dr__cell.is-preview.is-end { background: linear-gradient(to left, transparent 50%, color-mix(in srgb, var(--paper-foam, #DCE7E2) 55%, transparent) 50%); }
.dr__cell.is-start .dr__num, .dr__cell.is-end:not(.is-preview) .dr__num { background: var(--ink, #191917); color: var(--paper, #F2EEE6); }
.dr__cell.is-end.is-preview .dr__num { box-shadow: inset 0 0 0 1px var(--ink, #191917); }
.dr__cell.is-today.is-start .dr__num::after, .dr__cell.is-today.is-end .dr__num::after { background: var(--paper, #F2EEE6); }

@media (max-width: 520px) {
  .dr__summary { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 10px 16px; }
  .dr__arrow { display: none; }
  .dr__end { min-width: 0; }
  .dr__value { font-size: 19px; }
  .dr__nights { margin-left: 0; padding-bottom: 0; }
  .dr__clear { justify-self: start; }
}
@media (max-width: 420px) {
  .dr { --dr-cap: 36px; }
  .dr__day { height: 40px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .dr__num, .dr__nav { transition: none; }
}
