/* rado2loc app component (not in the design system yet): R2l::DateRangeFieldComponent, a month calendar to pick a date
   range (the r2l-date-range Stimulus controller draws the days). Reserved days are greyed out and hatched, so that they
   never look like the picked range (a tint of the primary colour); other days that can't be picked are faded. The
   range ends are marine, like the primary buttons. */

.r2l-date-range-summary { min-height: 20px; font-size: 14px; line-height: 20px; color: var(--ink); }

.r2l-date-range-calendar { padding: var(--space-3) var(--space-3) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); }
.r2l-date-range-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.r2l-date-range-month { font-family: var(--font-display); font-size: 17px; line-height: 22px; font-weight: 500; color: var(--ink); }
.r2l-date-range-nav { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; }
.r2l-date-range-nav:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.r2l-date-range-nav:disabled { opacity: .35; cursor: default; }
.r2l-date-range-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.r2l-date-range-nav--previous svg { transform: rotate(180deg); }

.r2l-date-range-grid { width: 100%; border-collapse: separate; border-spacing: 0 3px; table-layout: fixed; }
.r2l-date-range-grid th { padding-bottom: 2px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.r2l-date-range-grid td { padding: 0; }

.r2l-date-range-day { display: block; width: 100%; height: 40px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 40px; font-variant-numeric: tabular-nums; cursor: pointer; }
.r2l-date-range-day:hover { background: var(--primary-soft); }
.r2l-date-range-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.r2l-date-range-day.is-today { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.r2l-date-range-day[aria-disabled="true"] { color: var(--ink-muted); opacity: .45; background: transparent; cursor: default; }
.r2l-date-range-day.is-reserved,
.r2l-date-range-swatch { background: repeating-linear-gradient(-45deg, var(--surface-sunken) 0 5px, var(--line) 5px 7px); }
.r2l-date-range-day.is-reserved { color: var(--ink-muted); opacity: 1; border-radius: 0; text-decoration: line-through; }
.r2l-date-range-day.is-in-range { border-radius: 0; background: color-mix(in srgb, var(--primary) 16%, var(--surface-raised)); color: var(--ink); }
.r2l-date-range-day.is-start,
.r2l-date-range-day.is-end { background: var(--marine-fill); color: var(--on-marine-fill); font-weight: 600; opacity: 1; }

.r2l-date-range-legend { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.r2l-date-range-key { display: inline-flex; align-items: center; gap: 6px; }
.r2l-date-range-swatch { width: 22px; height: 14px; border-radius: 2px; }
