/* daterange.css — the range control + calendar (ui-control-vocabulary/increment-daterange-widget.md;
 * split out of components.css by increment-daterange-assetfree-lift.md DL-U4, so a consumer that
 * copies floor files, ree-x, takes this file alone; components.css imports it on its first line).
 * One visible field for one range value (or one date). With scripting on (.js-on) the named
 * inputs and a joined relative chooser are hidden behind the field; with it off they stand as plain
 * controls and the field is hidden. The popover is viewport-fixed; daterange.js places it (DL-S2). */

.fui-range { position: relative; display: inline-flex; gap: 6px; align-items: center; }
.fui-range.js-on .fui-range-input { display: none; }
.fui-range:not(.js-on) .fui-range-field { display: none; }
.fui-range-input {
  font: inherit;
  font-family: var(--font-mono);
  min-width: 11ch;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
}
.fui-range-field {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 11ch;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.fui-range-field:hover { border-color: var(--border-strong); }
.fui-range-field:focus-visible,
.fui-range-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fui-range-field[aria-required="true"].is-invalid { border-color: var(--danger); }
.fui-range-text { font-family: var(--font-mono); white-space: nowrap; }
.fui-range-rel {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
}
.fui-range.js-on .fui-range-rel { display: none; }
.fui-range-pop {
  position: fixed; top: 0; left: 0; z-index: 1000;
  padding: 10px;
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.fui-cal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fui-cal-arrows { display: inline-flex; gap: 2px; }
.fui-cal-title { flex: 1 1 auto; text-align: center; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--fg-muted); }
.fui-cal-jump {
  font: inherit; font-family: var(--font-mono);
  width: 7ch; box-sizing: content-box;
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}
.fui-cal-jump:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fui-cal-months { display: flex; gap: 14px; align-items: flex-start; }
.fui-cal-month { border-collapse: collapse; font-size: var(--fs-sm); }
.fui-cal-month caption { caption-side: top; padding-bottom: 4px; color: var(--fg-muted); font-size: var(--fs-xs); }
.fui-cal-month th { padding: 2px 0; color: var(--fg-muted); font-weight: 600; font-size: var(--fs-xs); }
.fui-cal-month td { padding: 1px; }
.fui-cal-day {
  width: 2.2em; height: 2.2em;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.fui-cal-day:hover:not(:disabled) { border-color: var(--border-strong); }
.fui-cal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.fui-cal-day[aria-current="date"] { border-color: var(--accent); }
.fui-cal-day.in-range { background: rgba(var(--accent-rgb), 0.18); }
.fui-cal-day.is-start,
.fui-cal-day.is-end { background: var(--accent); color: var(--accent-fg); }
.fui-cal-day:disabled { color: var(--fg-muted); opacity: 0.45; cursor: not-allowed; }
.fui-cal-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.fui-cal-preset {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-subtle);
  font: inherit; font-size: var(--fs-sm);
  cursor: pointer;
}
.fui-cal-preset.is-on { border-color: var(--accent); color: var(--accent); }
.fui-cal-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
