/* screens_member.css — Direction A (Focus)
   Member-flow screen styles (home, book, lunch, keys). Owned by Slice U1.
   Add screen-specific selectors here; shared components live in components.css. */

/* ===================================================================
   Shared member-screen bits (page heads, list cards, forms, empties)
   =================================================================== */
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.cta-inline {
  width: auto;
  flex: none;
  padding: 12px 20px;
}

.board-empty {
  color: var(--muted);
  font-size: 15px;
  padding: 18px 2px;
}

.mt-section {
  margin-top: 34px;
}

/* list cards (bookings, lunches, keys lists) */
.listcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.lrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.lrow:last-child {
  border-bottom: none;
}

a.lrow:hover {
  background: var(--paper);
}

.lrow .info {
  min-width: 0;
}

.lrow .info strong {
  display: block;
  font-size: 15px;
}

.lrow .info span {
  font-size: 12.5px;
  color: var(--muted);
}

.lrow .pill,
.lrow .btn,
.lrow .keyactions,
.lrow form.button_to {
  margin-left: auto;
}

/* A button_to renders a wrapping <form>; it (not the inner button) is the flex item,
   so the right-alignment and trailing-action layout must sit on the form. This keeps
   "Request" actions aligned with the status pills in the same key list. */
.lrow form.button_to .btn {
  margin-left: 0;
}

.keyactions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-assign {
  display: flex;
  gap: 6px;
  align-items: center;
}

.inline-assign select {
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

/* simple forms (keys new/edit) */
.formcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  max-width: 520px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select {
  font: inherit;
  font-size: 14.5px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-soft);
}

.formfoot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

/* Destructive secondary action (e.g. Cancel booking): a quiet red outline rather
   than a loud fill, so it reads as available without alarming. */
.btn-danger {
  color: var(--red);
  border-color: #e3c4be;
}

.btn-danger:hover {
  border-color: var(--red);
  background: #fbeeec;
}

/* booking detail card (show) */
.detailcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 560px;
}

.drow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.drow:last-child {
  border-bottom: none;
}

.drow .dlabel {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.drow .dval {
  font-size: 14.5px;
  font-weight: 600;
}

/* ===================================================================
   member-home
   =================================================================== */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 42px;
}

.act {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, border-color .18s ease;
}

.act:hover {
  transform: translateY(-3px);
  border-color: #c9c7ba;
}

.act .ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--clay-soft);
  display: grid;
  place-items: center;
  flex: none;
}

.act .ico svg {
  width: 26px;
  height: 26px;
  stroke: var(--clay);
  fill: none;
  stroke-width: 1.7;
}

.act .txt strong {
  display: block;
  font-size: 19px;
  letter-spacing: -.01em;
}

.act .txt span {
  font-size: 13.5px;
  color: var(--muted);
}

.act .arr {
  margin-left: auto;
  font-size: 22px;
  color: var(--muted);
}

.today {
  display: grid;
  gap: 10px;
  max-width: 620px;
}

.today .row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}

a.row:hover {
  border-color: #c9c7ba;
}

.today .row .time {
  font-size: 14px;
  font-weight: 600;
  width: 52px;
  flex: none;
}

.today .row .what {
  font-size: 15px;
}

.today .row .what small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.today .row .pill {
  margin-left: auto;
}

/* ===================================================================
   member-book (availability board)
   =================================================================== */
.book {
  display: grid;
  grid-template-columns: 368px 1fr;
  column-gap: 28px;
  align-items: start;
}

/* Form + action bar stack in their own column so the tall availability board
   can't stretch the rows and open a big gap between them. */
.pane-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pane-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.actionbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.pane-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pane-form .step:not(:first-child) {
  margin-top: 22px;
}

/* The two catering add-on toggles stack (meeting catering, fruit just beneath). */
.pane-form .catering-toggle + .catering-toggle {
  margin-top: 10px;
}

.pane-form .room {
  text-decoration: none;
  color: var(--ink);
}

.pane-form .participants {
  font: inherit;
  font-size: 15px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
}

.pane-form .participants:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-soft);
}

.room .price .free-count {
  color: var(--ok);
  font-weight: 700;
}

.timepick {
  padding: 13px 15px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.timepick.set {
  border-style: solid;
  border-color: var(--clay);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.actionbar .summary {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.actionbar .summary b {
  color: var(--ink);
  font-weight: 700;
}

/* Add-ons total shown just above Confirm (client feedback §8e). */
.actionbar .summary-total {
  padding-top: 10px;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
}

.actionbar .summary-total b {
  color: var(--clay);
}

/* The 3-hour limit note by the Confirm button (client feedback §8b). */
.maxnote {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 2px 0;
  text-align: center;
}

.maxnote b {
  color: var(--ink);
  font-weight: 700;
}

.av-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.av-head .title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.av-head .title small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.daynav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daynav .lbl {
  font-weight: 700;
  font-size: 14px;
  min-width: 9ch;
  text-align: center;
}

/* Month-aware week paging (client feedback §8a). */
.daynav .wknav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
}

.daynav .wknav:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.daynav .wknav.is-disabled {
  opacity: .35;
  pointer-events: none;
}

.daystrip .ds.is-disabled {
  opacity: .35;
  pointer-events: none;
}

.daystrip {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.daystrip .ds {
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 11px;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  min-width: 58px;
  text-decoration: none;
  color: var(--ink);
  transition: .15s;
}

.daystrip .ds:hover {
  border-color: #c9c7ba;
}

.daystrip .ds .dw {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.daystrip .ds .dn {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.daystrip .ds.on {
  background: var(--ink);
  border-color: var(--ink);
}

.daystrip .ds.on .dw {
  color: #bdbcae;
}

.daystrip .ds.on .dn {
  color: var(--paper);
}

.timeline {
  padding: 14px 22px 22px;
  display: grid;
  grid-template-columns: 54px 1fr;
}

.tl-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  border-top: 1px solid #ece9dd;
}

.tl-time:first-of-type {
  border-top: none;
}

.tl-slot {
  height: 52px;
  border-top: 1px solid #ece9dd;
  display: flex;
  align-items: center;
  padding: 6px 0;
}

.tl-slot:first-of-type {
  border-top: none;
}

.tl-slot .blk {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}

.blk.free {
  border: 1.5px dashed #d0cdbe;
  color: var(--muted);
  cursor: pointer;
  background: var(--paper);
  transition: .14s;
}

.blk.free:hover {
  border-color: var(--clay);
  color: var(--clay);
  background: #fff;
}

.blk.free .plus,
.blk.free .minus {
  margin-left: auto;
  font-size: 15px;
}

/* Affordance (client feedback §8c): a free block offers (+) to add it; once selected it
   offers (−) so it's clear another click removes/adjusts the selection. */
.blk.free .minus {
  display: none;
}

.blk.free.sel .plus {
  display: none;
}

.blk.free.sel .minus {
  display: inline;
}

.blk.free.sel {
  border-style: solid;
  border-color: var(--clay);
  background: var(--clay);
  color: #fff;
}

.blk.busy {
  background: repeating-linear-gradient(45deg, #eceadd, #eceadd 7px, #e4e1d2 7px, #e4e1d2 14px);
  color: var(--muted);
}

.blk.you {
  background: #e9eef0;
  border: 1px solid #b9cdd2;
  color: #2c5d63;
}

.blk small {
  font-weight: 500;
  opacity: .85;
  margin-left: 7px;
}

/* ---- 15-minute grid (compact rows + range selection) ---- */
/* Every 15-minute row carries its own start time so it's always clear which block
   you're clicking; the :15/:30/:45 rows are lighter, the on-hour rows bolder. */
.timeline-15 .tl-time {
  height: 30px;
  font-size: 11px;
  color: var(--muted);
  opacity: .6;
}

.timeline-15 .tl-time.on-hour {
  color: var(--muted);
  opacity: 1;
  font-weight: 700;
}

.timeline-15 .tl-slot {
  height: 30px;
  padding: 2px 0;
}

.timeline-15 .tl-slot .blk {
  height: 26px;
  font-size: 12px;
  padding: 0 12px;
}

/* The "Available" label is de-emphasised at this density; the time column carries
   the time. A selected run reads as a contiguous clay fill, so hide per-block text. */
.timeline-15 .blk.free .blk-text {
  color: var(--muted);
  opacity: .65;
}

.timeline-15 .blk.free.sel .blk-text {
  visibility: hidden;
}

.privacy {
  font-size: 12px;
  color: var(--muted);
  padding: 0 22px 18px;
  display: flex;
  gap: 7px;
}

.privacy b {
  color: var(--ink);
  font-weight: 600;
}

/* ===================================================================
   member-lunch (guest lunch builder)
   =================================================================== */
.lede {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 30px;
  max-width: 56ch;
}

.block {
  margin-bottom: 34px;
  max-width: 760px;
}

.dates {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.day {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: center;
  min-width: 84px;
  transition: .15s;
  position: relative;
  font: inherit;
  color: var(--ink);
}

.day:hover {
  border-color: #c9c7ba;
}

.day .dow {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.day .d {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-top: 4px;
  line-height: 1;
}

.day.sel {
  border-color: var(--clay);
  background: #fff;
  box-shadow: 0 0 0 3px var(--clay-soft);
}

.day.late {
  border-style: dashed;
  border-color: #e3c9a8;
}

.day.late .flag {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  background: #fbf0e2;
  color: var(--warn);
  border: 1px solid #ecd9c2;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.guests {
  display: grid;
  gap: 10px;
}

.guest {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.guest .av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6e3d6;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: #5a5b48;
  flex: none;
}

.guest .nm {
  font-size: 15px;
  font-weight: 700;
}

.guest .nm small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.guest .rm {
  margin-left: auto;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
}

.guest .rm:hover {
  background: #eceadd;
  color: var(--clay);
}

.addguest {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.addguest .field {
  flex: 1 1 0;
  min-width: 150px;
}

.addguest input,
.addguest select {
  font: inherit;
  font-size: 14.5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}

.addguest input:focus,
.addguest select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-soft);
}

.addguest .add {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 11px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.addguest .add:hover {
  border-color: #c9c7ba;
}

.err {
  color: var(--clay);
  font-size: 12.5px;
  font-weight: 600;
  margin: 7px 2px 0;
  display: none;
}

.barfoot {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--paper) 36%);
  padding-top: 18px;
  max-width: 760px;
}

.barfoot .summary {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 13px;
}

.barfoot .summary b {
  color: var(--ink);
  font-weight: 700;
}

/* ===================================================================
   member-keys
   =================================================================== */
.kgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

.kcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.kcard .lab {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kcard .lab .i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--clay-soft);
  display: grid;
  place-items: center;
}

.kcard .lab .i svg {
  width: 16px;
  height: 16px;
  stroke: var(--clay);
  fill: none;
  stroke-width: 1.8;
}

.kcard .big {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 12px 0 2px;
}

.kcard .sub {
  font-size: 13px;
  color: var(--muted);
}

/* Empty personal-key card: no big value, just a calm explanation under the label. */
.kcard-empty .sub {
  margin-top: 10px;
}

/* ===================================================================
   responsive — 760px breakpoint (sticky bars, single columns)
   =================================================================== */
@media (max-width: 760px) {
  .actions {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .act {
    padding: 18px;
    gap: 14px;
  }

  .act .ico {
    width: 46px;
    height: 46px;
  }

  .act .txt strong {
    font-size: 17px;
  }

  /* Flex column so the board (day strip + availability header) can be ordered first;
       the fixed action sheet leaves the flow. Bottom padding clears the fixed sheet +
       nav tab bar so nothing is ever trapped behind them. */
  .book {
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--tabbar-h) + 96px);
  }

  /* Day picking is the first thing you see, not something hidden below the sheet. */
  .pane-board {
    order: 0;
    margin-bottom: 16px;
  }

  .pane-left {
    order: 1;
  }

  .av-head {
    padding: 15px 16px;
  }

  .daystrip {
    padding: 12px 16px;
  }

  .timeline {
    padding: 12px 16px 18px;
    grid-template-columns: 48px 1fr;
  }

  /* One compact fixed sheet: summary and submit share a row, so it occupies less of
     the screen and stacks more cleanly above the nav tab bar. */
  .actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--tabbar-h);
    z-index: 25;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .4);
  }

  .actionbar .timepick {
    display: none;
  }

  .actionbar .summary {
    margin: 0;
    flex: 1;
    min-width: 0;
  }

  .actionbar .cta {
    width: auto;
    flex: 0 0 auto;
    padding: 11px 18px;
  }

  .barfoot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--tabbar-h);
    z-index: 25;
    padding: 12px 16px;
    background: rgba(244, 243, 238, .96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }

  .addguest input {
    min-width: 0;
    width: 100%;
  }

  .addguest {
    flex-direction: column;
  }

  .kgrid {
    grid-template-columns: 1fr;
  }

  .pagehead {
    flex-direction: column;
    align-items: flex-start;
  }
}
