/* ==========================================================================
   MOTRIX — Reservation plugin bridge
   --------------------------------------------------------------------------
   The existing custom reservations plugin renders its own markup. Everything
   here is scoped inside #motrix-reservations so the plugin's elements inherit
   the site's design tokens without the plugin itself being modified.

   NOTE: these are generic, best-guess selectors written before the plugin's
   real markup was available. Once the plugin is dropped in, inspect its
   output and tighten/rename these rules — that is the intended follow-up
   pass, not a sign something is broken.
   ========================================================================== */

#motrix-reservations {
  /* Local aliases so plugin CSS that reads common variable names still
     lands on the MOTRIX palette. */
  --primary: var(--c-lime);
  --primary-hover: var(--c-lime-bright);
  --text: var(--c-text);
  --muted: var(--c-text-soft);
  --surface: var(--c-surface);
  --border: var(--c-border-strong);

  color: var(--c-text-soft);
  font-family: var(--font-body);
}

#motrix-reservations h1,
#motrix-reservations h2,
#motrix-reservations h3,
#motrix-reservations h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: var(--ls-display);
}

/* ------------------------------------------------------------ FORM FIELDS */
#motrix-reservations input[type='text'],
#motrix-reservations input[type='email'],
#motrix-reservations input[type='tel'],
#motrix-reservations input[type='number'],
#motrix-reservations input[type='date'],
#motrix-reservations input[type='time'],
#motrix-reservations select,
#motrix-reservations textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-input);
  color: var(--c-text);
  font-size: var(--fs-body);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

#motrix-reservations input:focus,
#motrix-reservations select:focus,
#motrix-reservations textarea:focus {
  outline: none;
  border-color: var(--c-lime);
  box-shadow: var(--ring);
}

#motrix-reservations label {
  display: inline-block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--c-text);
}

/* ---------------------------------------------------------------- BUTTONS */
#motrix-reservations button,
#motrix-reservations input[type='submit'],
#motrix-reservations .button,
#motrix-reservations a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: var(--sp-3) var(--sp-7);
  background: var(--c-lime);
  color: var(--c-ink);
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
  transition: background-color var(--t-base), box-shadow var(--t-base);
}

@media (hover: hover) {
  #motrix-reservations button:hover,
  #motrix-reservations input[type='submit']:hover,
  #motrix-reservations .button:hover {
    background: var(--c-lime-bright);
    box-shadow: var(--shadow-lime);
  }
}

/* Secondary / disabled states commonly emitted by booking widgets. */
#motrix-reservations button[disabled],
#motrix-reservations .is-disabled,
#motrix-reservations .disabled {
  background: var(--c-surface-2);
  color: var(--c-text-mute);
  border-color: var(--c-border);
  box-shadow: none;
  cursor: not-allowed;
}

/* ----------------------------------------------- SLOTS / CALENDAR / TABLE */
#motrix-reservations table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--r-card);
  overflow: hidden;
}

#motrix-reservations th,
#motrix-reservations td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
}

#motrix-reservations th {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-text-mute);
}

/* Time-slot chips — matches the common `.slot` / `.time-slot` conventions. */
#motrix-reservations .slot,
#motrix-reservations .time-slot,
#motrix-reservations .slot-button {
  min-height: 48px;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-chip);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: 600;
}

#motrix-reservations .slot.is-selected,
#motrix-reservations .time-slot.selected,
#motrix-reservations .slot-button.active {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: var(--c-ink);
}

#motrix-reservations .slot.is-taken,
#motrix-reservations .time-slot.unavailable {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Calendar day cells. */
#motrix-reservations .calendar,
#motrix-reservations .datepicker {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: var(--sp-4);
}

#motrix-reservations .day.is-today { box-shadow: inset 0 0 0 1px var(--c-lime); }
#motrix-reservations .day.is-selected {
  background: var(--c-lime);
  color: var(--c-ink);
  border-radius: var(--r-chip);
}

/* ---------------------------------------------------------- NOTIFICATIONS */
#motrix-reservations .error,
#motrix-reservations .is-error {
  color: var(--c-danger);
  font-size: var(--fs-fine);
}

#motrix-reservations .success,
#motrix-reservations .is-success {
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-lime-dim);
  border: 1px solid rgba(187, 243, 81, 0.45);
  border-radius: var(--r-input);
  color: var(--c-text);
}
