/* Drawer, form inputs, date picker, summary box, dropdown list, toasts */

body.has-modal { overflow: hidden; }

.drawer-root { position: fixed; inset: 0; z-index: 16; /* above the tablet rail (15) and phone top bar (12) */ }

/* ---------- Overlay (Figma "Overlay": palette-background/overlay + background blur) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--ds-palette-background-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

/* ---------- Drawer ---------- */
/* Width: 500 as drawn on the New design screens (the layout/drawer-width/default variable
   still says 480); full width on Mobile. */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 500px;
  max-width: 100%;
  border-left: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  background: var(--ds-palette-background-primary);
  box-shadow: var(--ds-shadow-md);
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
}
.drawer-root.is-open .overlay { opacity: 1; }
.drawer-root.is-open .drawer { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .overlay, .drawer { transition: none; }
}

.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-spacing-m);
  padding: var(--ds-spacing-xl);
}
.drawer__top svg { fill: currentColor; }

.drawer__top { position: relative; z-index: 1; transition: box-shadow 0.15s; }
.drawer__top.is-scrolled { box-shadow: var(--ds-shadow-sm); }

.drawer__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.drawer__content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-2xl);
  padding: var(--ds-spacing-l) var(--ds-spacing-xl);
}

.drawer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--ds-spacing-s);
  padding: var(--ds-spacing-xl);
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  background: var(--ds-palette-background-primary);
}

.icon-btn--l { width: 32px; height: 32px; }

/* ---------- Inputs (Input Dropdown / Single Select, Input / Search) ---------- */
.field { position: relative; display: flex; flex-direction: column; gap: var(--ds-spacing-xs); }

.floating-label {
  position: absolute;
  top: calc(-1 * var(--ds-spacing-s));
  left: var(--ds-spacing-s);
  z-index: 1;
  padding: 0 var(--ds-spacing-xs);
  border-radius: var(--ds-border-radius-xs);
  background: var(--ds-palette-background-primary);
  color: var(--ds-palette-content-secondary);
}

.input {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px; /* Size M; the toolbar search is Size S (32) */
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-medium);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-primary);
}
.input:hover { border-color: var(--ds-palette-border-high); }
.input:focus-within { border-color: var(--ds-palette-border-brand); }
.input.is-error { border-color: var(--ds-palette-border-error); }

.input input,
.input textarea {
  flex: 1;
  min-width: 0;
  padding: 0 var(--ds-spacing-s);
  border: 0;
  background: none;
  color: var(--ds-palette-content-primary);
  font-family: var(--ds-ref-font-family-body);
}
.input input { height: 38px; }
.input--search { min-height: 32px; }
.input--search input { height: 30px; }
.input input:focus,
.input textarea:focus { outline: none; }
.input input::placeholder,
.input textarea::placeholder { color: var(--ds-palette-content-tertiary); }

.input--textarea { align-items: stretch; }
/* Notes grow with the text (JS sets the height); minimum = Figma's 96px field */
.input--textarea textarea {
  min-height: 94px;
  padding: var(--ds-spacing-m) var(--ds-spacing-s);
  resize: none;
  overflow: hidden;
}

.input__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  padding: 0 0 0 var(--ds-spacing-s);
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.input__trigger:focus-visible { outline-offset: 0; }
.input__value { flex: 1; }
.input__selector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  align-self: stretch;
  color: var(--ds-palette-content-secondary);
}
.input__selector svg { fill: currentColor; }
.input__trigger:focus-visible { outline: none; }
.input--select.is-open .input__selector .icon { transform: rotate(180deg); }

.field-msg { color: var(--ds-palette-content-tertiary); }
.field-msg:empty { display: none; }
.field-msg.is-error { color: var(--ds-palette-content-error); }
.field-msg--split { display: flex; justify-content: space-between; gap: var(--ds-spacing-s); }
.field-msg__count { margin-left: auto; }

/* Loading spinner inside a button: Material "autorenew" icon, rotating */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* Dates group: bordered block with the input, message and calendar */
.field-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-s);
  margin: 0;
  padding: var(--ds-spacing-m);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-medium);
  border-radius: var(--ds-border-radius-m);
  min-width: 0;
}
.field-group > legend.floating-label { position: absolute; }

/* Native select, size S (month / year) */
.select {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 0;
}
.select select {
  width: 100%;
  height: 32px;
  padding: 0 var(--ds-spacing-4xl) 0 var(--ds-spacing-s);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-medium);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-primary);
  color: var(--ds-palette-content-primary);
  font-family: var(--ds-ref-font-family-body);
  appearance: none;
  cursor: pointer;
}
.select__arrow {
  position: absolute;
  top: var(--ds-border-width-xxs);
  right: var(--ds-border-width-xxs);
  bottom: var(--ds-border-width-xxs);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  pointer-events: none;
}
.select__arrow svg { fill: var(--ds-palette-content-secondary); }
.select select:hover { border-color: var(--ds-palette-border-high); }
.select select:focus-visible { outline: none; border-color: var(--ds-palette-border-brand); }

/* ---------- Dropdown list (Figma "Dropdown list") ---------- */
.dropdown-list {
  list-style: none;
  margin: 0;
  padding: var(--ds-spacing-xs) 0;
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-primary);
  box-shadow: var(--ds-shadow-md);
}
.field .dropdown-list {
  position: absolute;
  top: calc(100% + var(--ds-spacing-xs));
  left: 0;
  right: 0;
  z-index: 2;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--ds-spacing-s);
}
.dropdown-list--menu {
  position: absolute;
  z-index: 20;
  min-width: 160px;
  padding: var(--ds-spacing-xs);
}
.list-item {
  display: flex;
  align-items: center;
  gap: var(--ds-spacing-s);
  width: 100%;
  min-height: 32px;
  padding: var(--ds-spacing-xs) var(--ds-spacing-s);
  border: 0;
  border-radius: 6px;
  font: var(--ds-font-body-s-weight) var(--ds-font-body-s-size)/var(--ds-font-body-s-line-height) var(--ds-ref-font-family-body);
  background: var(--ds-palette-background-primary);
  color: var(--ds-palette-content-primary);
  text-align: left;
  cursor: pointer;
}
.list-item:hover,
.list-item[aria-selected="true"] { background: var(--ds-palette-interactive-hover); }
.list-item:focus-visible { outline: none; background: var(--ds-palette-interactive-focus); }
.list-item svg { flex: none; fill: currentColor; }
.list-item--danger { color: var(--ds-palette-content-error); }
.list-item[aria-disabled="true"] { cursor: not-allowed; }

/* ---------- Date picker (Calendar / Day) ---------- */
.picker {
  display: flex;
  flex-direction: column;
  padding: 0 var(--ds-spacing-l) var(--ds-spacing-xs);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-secondary);
}

.picker__head {
  display: flex;
  align-items: center;
  gap: var(--ds-spacing-s);
  padding: var(--ds-spacing-l) 0;
}

.picker__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-medium);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-primary);
  color: var(--ds-palette-content-primary);
  cursor: pointer;
}
.picker__nav svg { fill: currentColor; }
.picker__nav:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover), var(--ds-palette-interactive-hover)); }
.picker__nav:focus-visible { outline: none; background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }

.days { display: flex; flex-direction: column; gap: var(--ds-spacing-s); }
.days__week { display: grid; grid-template-columns: repeat(7, 1fr); }
.days__weekdays { padding-bottom: var(--ds-spacing-xs); text-align: center; color: var(--ds-palette-content-tertiary); }

.day {
  position: relative;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--ds-border-radius-m);
  background: none;
  color: var(--ds-palette-content-primary);
  cursor: pointer;
}
.day.is-outside { color: var(--ds-palette-content-disabled); }
.day:hover { background: var(--ds-palette-interactive-hover); }
/* Today and keyboard focus share one look (decision: calendar day focus = today style) */
.day.is-today,
.day:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--ds-border-width-xxs) var(--ds-palette-border-brand); background: var(--ds-palette-background-primary); }
.day.is-sel,
.day.is-unavail { border-radius: 0; color: var(--ds-palette-content-on-high); }
.day.is-sel { background: var(--ds-palette-background-brand); }
/* Selected-hover (Figma Calendar / Day 101:7704): overlay painted on the brand fill */
.day.is-sel:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover-on-high), var(--ds-palette-interactive-hover-on-high)); }
/* Keyboard focus on a selected day: focus overlay on the brand fill (no white ring) */
.day.is-sel:focus-visible { box-shadow: none; background-color: var(--ds-palette-background-brand); background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }
.day.is-unavail { background: var(--ds-palette-background-error-medium); color: var(--ds-palette-content-on-medium); } /* same colour as the legend; dark text in both themes */
.day.is-unavail:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover), var(--ds-palette-interactive-hover)); }
.day.is-unavail:focus-visible { box-shadow: none; background-color: var(--ds-palette-background-error-medium); background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }
.day.round-l { border-top-left-radius: var(--ds-border-radius-m); border-bottom-left-radius: var(--ds-border-radius-m); }
.day.round-r { border-top-right-radius: var(--ds-border-radius-m); border-bottom-right-radius: var(--ds-border-radius-m); }

.picker__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--ds-spacing-s);
  padding-top: var(--ds-spacing-s);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-spacing-l);
  margin: 0;
  padding: 0 var(--ds-spacing-s);
  list-style: none;
  color: var(--ds-palette-content-secondary);
}
.legend li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend__mark { width: 12px; height: 12px; border-radius: var(--ds-border-radius-2xs); }
.legend__mark--today { border: var(--ds-border-width-xxs) solid var(--ds-palette-border-brand); }
.legend__mark--sel { background: var(--ds-palette-background-brand); }
.legend__mark--unavail { background: var(--ds-palette-background-error-medium); }
.picker__today { margin-left: auto; }

/* ---------- Request summary (Figma "Request summary" + "Selected summary", type=new) ---------- */
.summary {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-l);
  padding: var(--ds-spacing-l);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-l);
  background: var(--ds-palette-background-secondary);
}
.summary p { margin: 0; }

.summary__selected {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-xs);
  padding: 14px var(--ds-spacing-l);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-tertiary);
}
.summary__days {
  font: var(--ds-font-h3-weight) var(--ds-font-h3-size)/var(--ds-font-h3-line-height) var(--ds-font-h3-family);
  color: var(--ds-palette-content-brand);
}
.summary__days svg { fill: currentColor; }
.summary__muted { color: var(--ds-palette-content-brand-high); }

.summary__impact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-spacing-s);
  padding: 0 var(--ds-spacing-l);
}

.summary__note {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-spacing-xs);
  padding: 0 var(--ds-spacing-l);
}
.summary__note .icon { margin-top: var(--ds-spacing-xxs); fill: currentColor; }

/* Error summary box — Figma border is colour/error/300 (no semantic token: gap) */
.error-box {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-xxs);
  padding: var(--ds-spacing-m) var(--ds-spacing-l);
  border: var(--ds-border-width-xxs) solid var(--ds-ref-colour-error-300);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-error-low);
}
.error-box__title { margin-bottom: var(--ds-spacing-xs); color: var(--ds-palette-content-error); }

/* ---------- Toasts (top-middle) ---------- */
.toasts {
  position: fixed;
  top: var(--ds-spacing-3xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-s);
  width: min(480px, calc(100vw - 2 * var(--ds-spacing-l)));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-spacing-m);
  padding: var(--ds-spacing-m);
  border: var(--ds-border-width-xxs) solid;
  border-radius: var(--ds-border-radius-l);
  box-shadow: var(--ds-shadow-md);
  color: var(--ds-palette-content-primary);
  /* Floating surface: transparent status tint over a solid base, so content below never shows through */
  background: linear-gradient(var(--toast-tint), var(--toast-tint)), var(--ds-palette-background-primary);
}
.toast--success { border-color: var(--ds-palette-border-success); --toast-tint: var(--ds-palette-background-success-low); }
.toast--success .toast__icon,
.toast--success .toast__title { color: var(--ds-palette-content-success); }
.toast--info { border-color: var(--ds-palette-border-info); --toast-tint: var(--ds-palette-background-info-low); }
.toast--info .toast__icon,
.toast--info .toast__title { color: var(--ds-palette-content-info); }
.toast--error { border-color: var(--ds-palette-border-error); --toast-tint: var(--ds-palette-background-error-low); }
.toast--error .toast__icon,
.toast--error .toast__title { color: var(--ds-palette-content-error); }
.toast__text { flex: 1; display: flex; flex-direction: column; gap: var(--ds-spacing-xs); }
.toast__text p { margin: 0; }
.toast__close { flex: none; }

/* ---------- Edit drawer extras ---------- */
.drawer__delete { margin-right: auto; }

/* Selected summary, type=changes: "5 → 4 working days" (old value struck through) */
.summary__days { display: flex; align-items: center; gap: var(--ds-spacing-s); }
.summary__was { color: var(--ds-palette-content-disabled); }

/* ---------- Delete dialog (Figma "Cancel request confirmation", 560 wide) ---------- */
.dialog-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ds-spacing-l);
}
.dialog-root .overlay { position: fixed; }
.dialog-root.is-open .overlay { opacity: 1; }

.dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-2xl);
  width: 520px;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: var(--ds-spacing-2xl);
  border-radius: var(--ds-border-radius-l);
  background: var(--ds-palette-background-primary);
  box-shadow: var(--ds-shadow-md);
  opacity: 0;
  transform: translateY(var(--ds-spacing-s));
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.dialog-root.is-open .dialog { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dialog { transition: none; } }

.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-spacing-m); }

.dialog__request {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-m);
  padding: 14px var(--ds-spacing-l);
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-tertiary);
}
.dialog__request p,
.dialog__body p { margin: 0; }
.dialog__request-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-spacing-s); }
.dialog__note { color: var(--ds-palette-content-secondary); }

.dialog__body { display: flex; flex-direction: column; gap: var(--ds-spacing-m); }

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--ds-spacing-s);
  padding-top: var(--ds-spacing-l);
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
}

/* ---------- Scroll cues ---------- */
/* Always-visible thin scrollbar (6px): light grey, darker on hover */
.drawer__content::-webkit-scrollbar { width: 6px; }
.drawer__content::-webkit-scrollbar-track { background: transparent; }
.drawer__content::-webkit-scrollbar-thumb { border-radius: var(--ds-border-radius-full); background: var(--ds-palette-border-medium); }
.drawer__content::-webkit-scrollbar-thumb:hover { background: var(--ds-palette-border-high); }
@supports not selector(::-webkit-scrollbar) {
  .drawer__content { scrollbar-width: thin; scrollbar-color: var(--ds-palette-border-medium) transparent; }
}

/* Fade above the footer while more content is below */
.drawer__fade {
  position: absolute;
  left: 0;
  right: var(--ds-spacing-s);
  bottom: 0;
  height: var(--ds-spacing-3xl);
  background: linear-gradient(var(--ds-palette-background-transparent), var(--ds-palette-background-primary));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.drawer__body.has-more .drawer__fade { opacity: 1; }

/* ---------- Compact height: < 800 (breakpoint/height/compact) ---------- */
@media (max-height: 799px) {
  .drawer__top { padding: var(--ds-spacing-l) var(--ds-spacing-xl); }
  .drawer__content { gap: var(--ds-spacing-l); padding: var(--ds-spacing-m) var(--ds-spacing-xl); }
  .drawer__bottom { padding: var(--ds-spacing-l) var(--ds-spacing-xl); }
}

/* ---------- Mobile: < 768 (breakpoint/width/tablet) — full-width drawer ---------- */
@media (max-width: 767px) {
  .drawer { width: 100%; border-left: 0; }
}

/* ---------- All balances drawer (Figma 2094:13267) ---------- */
.drawer--balances { display: flex; flex-direction: column; }
.bal-head { flex: none; border-bottom: var(--ds-border-width-xxs) solid var(--ds-palette-border-low); }
.bal-head .drawer__top { padding-bottom: var(--ds-spacing-m); align-items: flex-start; }
.bal-head h2,
.bal-head__sub { margin: 0; }
.bal-head__sub { margin-top: var(--ds-spacing-xs); color: var(--ds-palette-content-secondary); }
.bal-head__search { padding: 0 var(--ds-spacing-xl) var(--ds-spacing-l); }
.bal-head__search .input--search { width: 100%; }
.bal-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-l);
  padding: var(--ds-spacing-l) var(--ds-spacing-xl) var(--ds-spacing-2xl);
}
.bal-group { display: flex; flex-direction: column; gap: var(--ds-spacing-s); }
.bal-group__title { margin: 0; color: var(--ds-palette-content-secondary); }
.bal-list { display: flex; flex-direction: column; gap: var(--ds-spacing-s); margin: 0; padding: 0; list-style: none; }
.bal-item {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-s);
  padding: var(--ds-spacing-m);
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  border-radius: var(--ds-border-radius-l);
}
.bal-item__line { display: flex; justify-content: space-between; gap: var(--ds-spacing-s); }
.bal-item .balance-bar { background: var(--ds-palette-background-tertiary); }
.bal-item__meta { margin: 0; color: var(--ds-palette-content-secondary); }
.bal-empty { margin: 0; color: var(--ds-palette-content-secondary); }

/* ---------- Leave type dropdown (search + 12 types + days left) ---------- */
.dropdown-list--type { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dropdown-list__search {
  padding: var(--ds-spacing-s) var(--ds-spacing-s) var(--ds-spacing-xs);
  border-bottom: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
}
.dropdown-list__search .input--search { width: 100%; }
.dropdown-list__options {
  margin: 0;
  padding: var(--ds-spacing-xs) var(--ds-spacing-xs) var(--ds-spacing-s);
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.list-item--type { justify-content: space-between; cursor: pointer; }
.list-item--type[aria-selected="true"] { font-weight: var(--ds-ref-font-weight-semibold); }
.list-item__meta { flex: none; color: var(--ds-palette-content-tertiary); font-weight: var(--ds-ref-font-weight-regular); }
.dropdown-empty { padding: var(--ds-spacing-s); color: var(--ds-palette-content-secondary); }

/* ---------- Column filter dropdown (checkbox list) ---------- */
.dropdown-list--filter { min-width: 200px; margin: 0; }
.filter-option { cursor: pointer; }
.filter-option__box { color: var(--ds-palette-border-high); }
.filter-option__box.is-on { color: var(--ds-palette-content-brand); }
.filter-option:has(input:focus-visible) { background: var(--ds-palette-interactive-focus); }

/* ---------- Dates filter popover (Figma "Filter · Dates": presets · calendar · footer) ---------- */
.dates-filter { position: absolute; z-index: 20; width: 605px; max-width: calc(100vw - 16px); margin: 0; padding: 0; }
.dates-filter__body { display: flex; }
.dates-filter__presets {
  flex: 0 0 168px;
  display: flex;
  flex-direction: column;
  gap: var(--ds-spacing-xxs);
  margin: 0;
  padding: var(--ds-spacing-s);
  border-right: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  list-style: none;
}
.dates-filter__presets .list-item { min-height: 26px; cursor: pointer; }
.dates-filter__presets .list-item.is-selected { background: var(--ds-palette-interactive-pressed); color: var(--ds-palette-content-brand-high); font-weight: var(--ds-ref-font-weight-semibold); }
.dates-filter__presets .list-item:focus-visible { outline: none; background: var(--ds-palette-interactive-focus); }
.dates-filter__cal { flex: 1; min-width: 0; }
.dates-filter__cal .picker { background: none; padding-bottom: var(--ds-spacing-s); }
.dates-filter__foot {
  display: flex;
  align-items: center;
  gap: var(--ds-spacing-s);
  padding: var(--ds-spacing-m) var(--ds-spacing-l);
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
}
.dates-filter__foot p { flex: 1; margin: 0; color: var(--ds-palette-content-secondary); }
@media (max-width: 767px) {
  .dates-filter__body { flex-direction: column; }
  .dates-filter__presets { flex-direction: row; flex-wrap: wrap; flex-basis: auto; border-right: 0; border-bottom: var(--ds-border-width-xxs) solid var(--ds-palette-border-low); }
}

/* ---------- Edge cases: error summary + free-date suggestions (Figma 2082:15468 / 2082:16164) ---------- */
.summary__selected--error {
  border: var(--ds-border-width-xxs) solid var(--ds-palette-border-error);
  background: var(--ds-palette-background-error-low);
}
.summary__days-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--ds-spacing-m); }
.summary__days--plain { color: var(--ds-palette-content-primary); }
.summary__days--muted { color: var(--ds-palette-content-secondary); }
.summary__over { color: var(--ds-palette-content-error); }
.free-dates { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-spacing-s); padding: 0 var(--ds-spacing-l); }
.free-dates > span { color: var(--ds-palette-content-secondary); }
.free-dates__chip {
  height: 24px;
  padding: 0 var(--ds-spacing-m);
  border: 0;
  border-radius: var(--ds-border-radius-m);
  background: var(--ds-palette-background-tertiary);
  color: var(--ds-palette-content-primary);
  cursor: pointer;
}
.free-dates__chip:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover), var(--ds-palette-interactive-hover)); }
.free-dates__chip:focus-visible { outline: none; background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }

/* ---------- Pick new dates: declined context + declined day mark ---------- */
.decline-note--context { margin: 0; }
.day.is-declined:not(.is-sel)::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: var(--ds-border-radius-full);
  background: var(--ds-palette-content-error);
}
.day.is-declined:not(.is-sel) { color: var(--ds-palette-content-error); text-decoration: line-through; }
.legend__mark--declined { border-radius: var(--ds-border-radius-full); width: 6px; height: 6px; background: var(--ds-palette-content-error); }
/* The type list sizes itself to the viewport (fitTypeList); the wrapper must not cap it */
.field .dropdown-list--type { max-height: none; overflow: hidden; }

/* "Go to today": plain text link (feedback 23 Nov); disabled = text colour only, no background */
.picker__today { padding: var(--ds-spacing-xs) 0; }
.link-btn:disabled { color: var(--ds-palette-content-disabled); cursor: default; text-decoration: none; }

/* Phones: month / year selects fit without clipping "October" / "September" */
@media (max-width: 767px) {
  .picker { padding-inline: var(--ds-spacing-s); }
  .picker__head { gap: var(--ds-spacing-xs); }
  .picker__head .select select { padding-left: var(--ds-spacing-s); padding-right: 26px; }
  .picker__head .select:first-of-type { flex: 1.4; }
}

/* ---------- Status line above the footer (summary out of view) ---------- */
.drawer__status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--ds-spacing-xs);
  margin: 0;
  padding: var(--ds-spacing-s) var(--ds-spacing-xl);
  border: 0;
  border-top: var(--ds-border-width-xxs) solid var(--ds-palette-border-low);
  background: var(--ds-palette-background-secondary);
  color: var(--ds-palette-content-primary);
  cursor: pointer;
}
.drawer__status[hidden] { display: none; }
.drawer__status svg { flex: none; fill: currentColor; }
.drawer__status.is-error { background: var(--ds-palette-background-error-low); color: var(--ds-palette-content-error); }
.drawer__status:hover { background-image: linear-gradient(var(--ds-palette-interactive-hover), var(--ds-palette-interactive-hover)); }
.drawer__status:focus-visible { outline: none; background-image: linear-gradient(var(--ds-palette-interactive-focus), var(--ds-palette-interactive-focus)); }

