/* ── MPA Restaurant Booking Widget ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

.mpar-booking-widget {
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #222;
}

/* ── Step indicator ─────────────────────────────────────────────────────────── */
.mpar-steps {
  display: flex;
  margin-bottom: 28px;
  border-bottom: 2px solid #eee;
}
.mpar-step-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #bbb;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.mpar-step-tab.active {
  color: #B32826;
  border-bottom-color: #B32826;
}
.mpar-step-tab.done {
  color: #27ae60;
  border-bottom-color: #27ae60;
}

/* ── Panels ─────────────────────────────────────────────────────────────────── */
.mpar-panel { display: block; }
.mpar-panel.mpar-hidden { display: none; }

/* ── Calendar ───────────────────────────────────────────────────────────────── */
.mpar-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  color: #fff;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.mpar-cal-title {
  font-weight: 700;
  font-size: 1.5rem;
  font-family: 'Jost', sans-serif;
  letter-spacing: .02em;
}
.mpar-cal-nav {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  opacity: .75;
  transition: opacity .15s;
}
.mpar-cal-nav:hover { opacity: 1; }

.mpar-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.mpar-cal-wd {
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #000;
  padding: 4px 0;
}

.mpar-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 24px;
}
.mpar-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  color: #444;
  transition: background .15s, color .15s;
}
.mpar-cal-day.empty       { cursor: default; }
.mpar-cal-day.past        { color: #ccc; cursor: default; pointer-events: none; }
.mpar-cal-day.unavailable { color: #ccc; cursor: default; pointer-events: none; }
.mpar-cal-day.available {
  background: #ebebeb;
  color: #000;
  font-weight: 700;
}
.mpar-cal-day.available:hover {
  background: #B32826;
  color: #fff;
}
.mpar-cal-day.today {
  outline: 2px solid #c3c3c3;
  outline-offset: -2px;
}
.mpar-cal-day.selected {
  background: #B32826 !important;
  color: #fff !important;
  font-weight: 700;
}
.mpar-cal-loading {
  text-align: center;
  padding: 24px;
  color: #999;
  font-size: .9rem;
}

/* ── Time slots ─────────────────────────────────────────────────────────────── */
.mpar-slots-label {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #000;
  margin-bottom: 10px;
}
.mpar-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  min-height: 44px;
}
.mpar-slot-btn {
  padding: 10px 40px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: #B32826;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.mpar-slot-btn:hover {
  background: #fff;
  border-color: #B32826;
  color: #B32826;
}
.mpar-slot-btn.selected {
  background: #fff;
  border-color: #B32826;
  color: #B32826;
}
.mpar-slot-btn.disabled,
.mpar-slot-btn:disabled {
  background: #e8e8e8;
  border-color: #e8e8e8;
  color: #bbb;
  cursor: not-allowed;
}
.mpar-slots-empty {
  color: #000;
  font-size: 1.2rem;
  padding: 8px 0;
}

/* ── Navigation buttons ─────────────────────────────────────────────────────── */
.mpar-nav-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.mpar-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 4px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.mpar-btn:active { transform: scale(.97); }
.mpar-btn-next  { background: #000; color: #fff; }
.mpar-btn-next:disabled  { background: #ccc; cursor: not-allowed; transform: none; }
.mpar-btn-back  { background: #eee; color: #444; flex: 0 0 auto; padding: 14px 20px; }
.mpar-btn-submit { background: #B32826; color: #fff; }
.mpar-btn-submit:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* ── Booking summary bar ────────────────────────────────────────────────────── */
.mpar-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 22px;
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Jost', sans-serif;
  color: #000;
  border-left: 4px solid #B32826;
}
.mpar-summary-icon { font-size: 1.1rem; }

/* ── Customer form ──────────────────────────────────────────────────────────── */
.mpar-form { display: flex; flex-direction: column; gap: 16px; }

.mpar-field { display: flex; flex-direction: column; gap: 6px; }
.mpar-field label {
  font-size: .85rem;
  font-weight: 700;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
}

/* All form inputs — matches the theme's input style */
.mpar-booking-widget input[type="text"],
.mpar-booking-widget input[type="email"],
.mpar-booking-widget input[type="tel"],
.mpar-booking-widget input[type="url"],
.mpar-booking-widget input[type="password"],
.mpar-booking-widget input[type="search"],
.mpar-booking-widget textarea,
.mpar-booking-widget select {
  width: 100%;
  padding: 12px 14px;
  background-color: #f7f7f7;
  color: #272f3c;
  border: 1.5px solid #dbdbdb;
  border-radius: 4px;
  font-size: .95rem;
  font-family: 'Jost', sans-serif;
  transition: border-color .15s;
}
.mpar-booking-widget input:focus,
.mpar-booking-widget textarea:focus,
.mpar-booking-widget select:focus {
  outline: none;
  border-color: #000;
}
.mpar-field textarea { min-height: 80px; resize: vertical; }
.mpar-field input.mpar-error,
.mpar-field textarea.mpar-error,
.mpar-field select.mpar-error { border-color: #B32826; }

/* ── Guest dropdown ─────────────────────────────────────────────────────────── */
.mpar-guests-select { cursor: pointer; appearance: auto; }

/* ── Global disable notice ──────────────────────────────────────────────────── */
.mpar-disabled-msg {
  padding: 28px 24px;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}
.mpar-disabled-msg p { margin: 0; font-size: 24px; font-weight: 500; }

/* ── Error / success messages ───────────────────────────────────────────────── */
.mpar-error-msg {
  background: #fce8e8;
  color: #B32826;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: .9rem;
  font-weight: 600;
  font-family: 'Jost', sans-serif;
  margin-bottom: 8px;
}
.mpar-success-panel { text-align: center; padding: 40px 20px; }
.mpar-success-check {
  width: 64px; height: 64px;
  background: #27ae60;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
  margin: 0 auto 20px;
}
.mpar-success-title {
  font-size: 1.3rem; font-weight: 700;
  font-family: 'Jost', sans-serif;
  color: #000; margin-bottom: 10px;
}
.mpar-success-subtitle {
  color: #666; font-size: .95rem;
  font-family: 'Jost', sans-serif;
  line-height: 1.5;
}
.mpar-btn-new {
  margin-top: 28px;
  max-width: 240px;
}

/* ── Spinner ────────────────────────────────────────────────────────────────── */
.mpar-spinner-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 16px;
  color: #999; font-size: .88rem;
  font-family: 'Jost', sans-serif;
}
.mpar-spinner {
  width: 22px; height: 22px;
  border: 2px solid #eee; border-top-color: #B32826;
  border-radius: 50%;
  animation: mpar-spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes mpar-spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .mpar-cal-day  { font-size: 1rem; }
  .mpar-cal-wd   { font-size: .75rem; }
  .mpar-cal-title { font-size: 1.1rem; }
  .mpar-slot-btn { padding: 9px 20px; font-size: 1rem; }
}
