/* components.css — Direction A (Focus)
   Shared, reusable component classes used across screens.
   Ported from the component blocks of the prototype's app.css.
   Screen-specific selectors live in the per-area screens_*.css files, not here. */

/* ---------- page headings & labels ---------- */
.hello {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

h1.page {
  font-size: 38px;
  line-height: 1.03;
  letter-spacing: -.03em;
  margin: 0 0 26px;
  font-weight: 800;
}

/* Page titles read in one consistent ink colour; the .accent span is kept for
   markup compatibility but no longer recolours part of the heading. */
h1.page .accent {
  color: inherit;
}

.step {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 2px 13px;
}

.sectlabel {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 2px 12px;
  font-weight: 600;
}

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  transition: .15s;
}

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

.btn.primary {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

.btn.primary:hover {
  background: var(--clay-deep);
}

.cta {
  width: 100%;
  border: none;
  background: var(--clay);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: .16s;
}

.cta:hover {
  background: var(--clay-deep);
}

.cta:disabled {
  background: #d9c3ba;
  cursor: not-allowed;
}

/* ---------- pills (status) ---------- */
.pill {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 600;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.you {
  background: #eceadd;
  color: #5a5b48;
}

.pill.pending {
  background: #fbf0e2;
  color: var(--warn);
}

/* ---------- toggle switch ---------- */
.switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d8d6c9;
  position: relative;
  transition: .2s;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.on > .switch, .switch.on {
  background: var(--clay);
}

.on > .switch::after, .switch.on::after {
  left: 23px;
}

/* ---------- room list (booking) ---------- */
.rooms {
  display: grid;
  gap: 10px;
}

.room {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  cursor: pointer;
  transition: .16s;
}

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

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

.room .glyph {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex: none;
}

.room .meta strong {
  display: block;
  font-size: 14.5px;
}

.room .meta span {
  font-size: 12px;
  color: var(--muted);
}

.room .price {
  margin-left: auto;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
}

.room .price small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 10.5px;
}

/* ---------- catering toggle + deadline note ---------- */
.catering-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  cursor: pointer;
}

.catering-toggle .ico {
  font-size: 22px;
}

.catering-toggle .meta strong {
  display: block;
  font-size: 14.5px;
}

.catering-toggle .meta span {
  font-size: 12px;
  color: var(--muted);
}

.catering-toggle .switch {
  margin-left: auto;
}

/* A prepared order can't be toggled off — the kitchen has already made it. */
.catering-toggle.is-locked {
  cursor: default;
  opacity: .75;
}

.deadline {
  font-size: 12.5px;
  color: var(--muted);
  margin: 11px 4px 0;
  display: flex;
  gap: 7px;
}

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

.deadline.warn {
  color: var(--warn);
}

.deadline.warn b {
  color: var(--warn);
}

/* ---------- modal / confirmation overlay ---------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 15, .42);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: .26s;
  z-index: 60;
}

.scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.doneCard {
  background: var(--paper);
  border-radius: 24px;
  width: 420px;
  max-width: 100%;
  text-align: center;
  padding: 38px 30px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5);
  transform: translateY(14px) scale(.99);
  transition: .26s;
}

.scrim.open .doneCard {
  transform: none;
}

.check {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--ok);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}

@keyframes pop {
  from {
    transform: scale(.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.check svg {
  width: 36px;
  height: 36px;
  stroke: #fff;
  stroke-width: 2.4;
  fill: none;
}

.doneCard h2 {
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}

.doneCard p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 14px;
}

/* ---------- flash messages ---------- */
.flash {
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.flash-notice {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #c9ddc5;
}

.flash-alert {
  background: var(--clay-soft);
  color: var(--clay-deep);
  border-color: #f1c4ab;
}

/* ---------- table row states (folded from old application.css) ----------
   Status cues for the workflow-task and member tables on the dashboards. */
tr.terminated {
  opacity: .5;
}

tr.task-overdue {
  background-color: #fde7e7;
}

tr.task-amber {
  background-color: #fff4d6;
}

tr.task-completed {
  opacity: .5;
}

/* ---------- native form controls ----------
   Pull the browser's default checkboxes/radios/file inputs onto the warm palette so
   they stop rendering in iOS blue (notification preferences) or as the raw "Choose
   File" widget (printer drivers). */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--clay);
}

input[type="file"] {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  padding: 9px 16px;
  margin-right: 12px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  transition: .15s;
}

input[type="file"]::file-selector-button:hover {
  border-color: #c9c7ba;
}

/* ---------- utility ---------- */
.hidden {
  display: none !important;
}
