.form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
/* The date buttons grow wider once a date is picked ("15 Aug 2026" vs "Pick a date"). Let the
   flexible note field shrink to absorb that (min-width:0 lets flex shrink below its content), and
   keep +Add from being bumped to its own line. */
.form #vNote {
  flex: 1 1 140px;
  min-width: 0;
}
.form > button {
  flex-shrink: 0;
}

/* Vacations list header: title on the left, sort toggle on the right */
.listhd {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 0;
}
.listhd .sec {
  margin: 0;
}
.listhd .sortsegs {
  margin-left: auto;
}
.listhd .sortsegs .seg {
  font-size: 12px;
  padding: 5px 12px;
}
/* "by raider" grouping: the first row of a person's group gets a top divider + a little "+N more"
   count; continuation rows blank the name and sit tight under it (no divider) so they read as one
   cluster. No dangling tie-line. */
tr.grp-cont td {
  border-top: 0;
  padding-top: 2px;
}
tr.grp-first td {
  border-top: 2px solid var(--border);
}
.nm.cont {
  padding-left: 16px;
}
/* "+N" count on a raider's group head — class-coloured text in a subtle bordered pill (currentColor
   is the row's class colour; we tint border/text with it, not the fill, so the number stays legible) */
.nm .grp-count {
  font-size: 10px;
  font-weight: 800;
  color: currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 8px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: 1px;
}





/* typeahead character picker */
.ac {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}
.ac .opt {
  padding: 7px 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.ac .opt:hover {
  background: #23262b;
}
.ac .none {
  padding: 8px 11px;
  color: var(--text-dim-2);
  font-style: italic;
  font-size: 13px;
}

/* table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
th {
  text-align: left;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-2);
}
td {
  padding: 8px 10px;
  border-bottom: 1px solid #232529;
}
tr:hover td {
  background: var(--surface);
}
.nm {
  font-weight: 800;
}

/* status pills (base .pill in ui.css) */
.pill.active {
  background: #23362a;
  color: #8fdf9f;
  border: 1px solid #3a5b42;
}
.pill.soon {
  background: #2a2f3a;
  color: #9ad0ff;
  border: 1px solid #3f5a6a;
}
.pill.past {
  background: #2a2c31;
  color: var(--text-dim-2);
  border: 1px solid #3a3d44;
}

.empty {
  color: var(--text-dim-2);
  font-style: italic;
  padding: 10px 2px;
}

/* the vacations list is the main content here — give it room instead of the shared 300px cap so
   the page doesn't feel empty (especially for guildies, who have no calendar below). */
#allWrap.seclist {
  max-height: 62vh;
}

/* Officer page order: put the CALENDAR above the list (the list already ends with closed vacations).
   Flex-column the wrap and reorder; header / away strip / add form keep their natural order, the
   calendar jumps up. */
body.officer .wrap {
  display: flex;
  flex-direction: column;
}
body.officer .wrap > .card { order: 2; } /* add-vacation form */
body.officer #calSection { order: 4; }   /* calendar first */
body.officer .listhd { order: 5; }        /* then the list (closed vacations sink to its bottom) */
body.officer #allWrap { order: 6; }

/* month calendar (officers only — revealed by JS) */
.calnav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 8px;
}
.calnav .del {
  padding: 5px 11px;
}
/* two-column calendar area: big month grid (75%) + "away today" sidebar (25%).
   align-items:stretch makes both columns the SAME height (the calendar's), so the sidebar matches
   it exactly; when the away list is longer than that height, the list inside scrolls. */
.calwrap {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.calwrap #calBox {
  min-width: 0;
}
.calgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* "Away today" sidebar — read-only day glance; header fixed, list scrolls, capped so it never
   grows taller than the calendar even with 10-12 people away. */
.caltoday {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow the inner list to shrink + scroll within the calendar-matched height */
}
.caltoday .ct-list {
  flex: 1 1 auto;
  min-height: 0;      /* required so overflow-y actually scrolls inside the flex column */
  overflow-y: auto;
  margin: 0 -6px;     /* let the scrollbar sit at the edge */
  padding: 0 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface-3);
}
.caltoday .ct-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
}
.caltoday .ct-cnt {
  margin-left: auto;
  background: var(--accent);
  color: var(--surface-2);
  font-size: 11px;
  border-radius: 9px;
  padding: 0 7px;
}
.caltoday .ct-sub {
  color: var(--text-dim-2);
  font-size: 11px;
  margin: 2px 0 12px;
}
.caltoday .ct-row {
  padding: 7px 0;
  border-top: 1px solid #232529;
}
.caltoday .ct-row:first-of-type {
  border-top: 0;
}
.caltoday .ct-name {
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.caltoday .ct-note {
  cursor: help;
  font-size: 11px;
}
.caltoday .ct-meta {
  color: var(--text-dim-2);
  font-size: 10px;
  margin: 1px 0 4px;
}
.caltoday .ct-bar {
  height: 5px;
  background: #232529;
  border-radius: 4px;
  overflow: hidden;
}
.caltoday .ct-bar i {
  display: block;
  height: 100%;
}
.caltoday .ct-back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.caltoday .ct-back:hover {
  text-decoration: underline;
}

/* stack the two columns on narrow screens */
@media (max-width: 820px) {
  .calwrap {
    grid-template-columns: 1fr;
  }
  .caltoday {
    order: -1; /* show "away today" above the grid when stacked */
  }
}
.caldow {
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0;
  font-weight: 700;
}
.calcell {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 80px;
  padding: 4px 5px;
  overflow: hidden;
}
.calcell[data-day] {
  cursor: pointer;
}
.calcell[data-day]:hover {
  border-color: var(--accent-hi);
}
.calcell[data-day]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.calcell.out {
  background: #131416;
  border-color: #232529;
}
.calcell.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
/* the selected day (drives the sidebar) — filled accent tint so it's distinct from "today" */
.calcell.sel {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-3));
  box-shadow: inset 0 0 0 1px var(--accent);
}
.calcell.wknd {
  background: #181a1f;
}
.caldate {
  font-size: 11px;
  color: var(--text-dim-2);
  font-weight: 700;
  margin-bottom: 3px;
}
.calcell.today .caldate {
  color: var(--accent);
}
.calchip {
  display: block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- site makeover (assets/css/site.css) ---------- */
.vsec {
  margin: 26px 0 12px; font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--heading);
  text-transform: none; letter-spacing: 0; display: flex; align-items: center; gap: 10px;
}
.vsec::after { content: ""; flex: 1; height: 1px; background: var(--line-warm) }
.awaynow { margin-top: 4px }
.awaynow[hidden] { display: none }
.aw-grp:first-child .vsec { margin-top: 6px }
.aw-n {
  font-style: normal; font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--text-faint);
  background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 1px 8px;
}
/* one card per raider, their banner fading in on the right */
.aw-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px }
.aw-card {
  position: relative; overflow: hidden; min-height: 112px; display: flex; align-items: flex-end;
  border-radius: var(--radius-lg); background: var(--surface-2);
  border: 1px solid var(--border); border-left: 3px solid var(--cc);
}
.aw-card.now { border-color: var(--line-warm); border-left-color: var(--cc) }
.aw-art {
  position: absolute; top: 0; right: 0; width: 64%; height: 100%; object-fit: cover; object-position: 70% 20%;
  opacity: .55; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 75%);
  mask-image: linear-gradient(90deg, transparent 0, #000 75%);
}
.aw-card:not(.now) .aw-art { opacity: .35; filter: saturate(.7) }
.aw-body { position: relative; z-index: 1; width: 100%; padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 3px }
.aw-name { font-size: 17px; font-weight: 800; text-shadow: 0 1px 8px rgba(0, 0, 0, .85) }
.aw-dates { font-size: 12px; color: var(--text-dim); text-shadow: 0 1px 4px rgba(0, 0, 0, .9) }
.aw-line { font-size: 13px; color: var(--text); text-shadow: 0 1px 4px rgba(0, 0, 0, .9) }
.aw-line b { color: var(--accent-hi); font-variant-numeric: tabular-nums }
.aw-bar { margin-top: 6px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; max-width: 70% }
.aw-bar i { display: block; height: 100% }
/* the list heading follows the page's display face */
.listhd h2.sec { font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--heading) }
#calSection .calnav h2 { font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--heading); margin-right: 8px !important }
