/* ─── Meeting Hub ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #f5f0eb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #1a2332;
  min-height: 100vh;
}

.mh-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}

/* ── Header ── */
.mh-header { text-align: center; margin-bottom: 32px; }
.mh-brand {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1a2332;
  line-height: 1.2;
}
.mh-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.mh-logo img {
  max-height: 72px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ── Progress ── */
.mh-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.mh-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mh-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid #c8c4bf;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600;
  color: #b0aaa3;
  background: transparent;
  transition: all 0.2s;
}
.mh-step-label {
  font-size: 0.65rem; letter-spacing: 0.08em;
  color: #b0aaa3; font-weight: 600;
  transition: color 0.2s;
}
.mh-step.active .mh-step-num { background: #1a2332; border-color: #1a2332; color: #fff; }
.mh-step.active .mh-step-label { color: #1a2332; }
.mh-step.done .mh-step-num { background: #1a2332; border-color: #1a2332; color: #fff; }
.mh-step.done .mh-step-label { color: #1a2332; }
.mh-step-line {
  flex: 1; max-width: 80px;
  height: 1px; background: #d8d3cd;
  margin: 0 8px; margin-bottom: 16px;
}

/* ── Card ── */
.mh-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* reset fieldset browser defaults */
#msform fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
/* hide non-first fieldsets by default */
#msform fieldset:not(:first-of-type) { display: none; }

/* ── Panel typography ── */
.mh-panel-title {
  font-size: 1.45rem; font-weight: 600;
  color: #1a2332; letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.mh-panel-sub {
  font-size: 0.88rem; color: #8a8f97;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 4px;
}

/* ── Time Layout ── */
.mh-time-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 8px 0 24px;
}

/* ── Calendar (calendar.min.js overrides) ── */
.mh-calendar-wrap {
  border: 1px solid #ede8e2;
  border-radius: 12px;
  padding: 16px;
}
.mh-calendar-wrap .buttons-container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0ebe5;
}
.mh-calendar-wrap .label-container {
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; color: #1a2332;
  text-transform: uppercase;
  flex: 1; text-align: center;
}
.mh-calendar-wrap .year-dropdown {
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; color: #1a2332;
  text-transform: uppercase;
  border: none; padding: 0;
  background: transparent;
}
.mh-calendar-wrap .prev-button,
.mh-calendar-wrap .next-button {
  background: none; border: none;
  font-size: 1.1rem; color: #1a2332;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  line-height: 1;
}
.mh-calendar-wrap .prev-button:hover,
.mh-calendar-wrap .next-button:hover { background: #f0ebe5; }
.mh-calendar-wrap .weeks-wrapper.header .week .day {
  font-size: 0.68rem; font-weight: 700;
  color: #8a8f97; text-transform: uppercase;
  cursor: default;
}
.mh-calendar-wrap .week { margin: 4px 0; }
.mh-calendar-wrap .day {
  display: inline-block; float: left;
  width: 14.28%; text-align: center; cursor: pointer;
}
.mh-calendar-wrap .day span {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  font-size: 0.82rem; color: #1a2332;
  transition: background 0.15s;
  line-height: 1;
}
.mh-calendar-wrap .day:hover:not([disabled="disabled"]) span { background: #f0ebe5; }
.mh-calendar-wrap .day[disabled="disabled"] { cursor: default; }
.mh-calendar-wrap .day[disabled="disabled"] span { color: #ccc9c4; }
.mh-calendar-wrap .day.today span { font-weight: 700; }
.mh-calendar-wrap .day.today span::after { display: none; }
.mh-calendar-wrap .week .day.selected span { background: #1a2332; color: #fff; }
.mh-calendar-wrap .week .day.highlight span { background: #f0ebe5; color: #1a2332; }
/* neutralise orange/red weekend colouring from calendar plugin */
.mh-calendar-wrap .week:not(.start-on-monday) .day:first-child,
.mh-calendar-wrap .week:not(.start-on-monday) .day:last-child { color: inherit; }
.mh-calendar-wrap .day.sunday span { color: #1a2332; }
.mh-calendar-wrap .special-buttons { display: none; }

/* ── Slots ── */
.mh-slots-wrap { padding-top: 0; }
.mh-slots-date {
  font-size: 0.78rem; font-weight: 700;
  color: #8a8f97; letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px; min-height: 20px;
}

.loader { text-align: center; padding: 20px 0; display: none; }
.mh-spinner {
  width: 28px; height: 28px;
  border: 2px solid #e0dbd4;
  border-top-color: #1a2332;
  border-radius: 50%;
  animation: mh-spin 0.7s linear infinite;
  margin: 0 auto; display: block;
}
@keyframes mh-spin { to { transform: rotate(360deg); } }

.mh-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.mh-slots-grid::-webkit-scrollbar { width: 5px; }
.mh-slots-grid::-webkit-scrollbar-track { background: transparent; }
.mh-slots-grid::-webkit-scrollbar-thumb { background: #d8d3cd; border-radius: 4px; }

.mh-slot-btn {
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 0.85rem; font-weight: 500;
  color: #1a2332; background: #fff;
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.mh-slot-btn:hover { border-color: #1a2332; background: #f9f6f2; }
.mh-slot-btn.selected { background: #1a2332; border-color: #1a2332; color: #fff; }

.mh-slots-empty { font-size: 0.85rem; color: #8a8f97; margin-top: 8px; }

/* ── Selected Time Bar ── */
.mh-selected-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9f6f2;
  border-radius: 10px;
  margin-bottom: 24px;
}
.mh-selected-time-val {
  font-size: 0.9rem; font-weight: 600; color: #1a2332;
}
.mh-edit-link {
  font-size: 0.8rem; font-weight: 600; color: #8a8f97;
  cursor: pointer; text-decoration: none;
  background: none; border: none; padding: 0;
  transition: color 0.15s; font-family: inherit;
}
.mh-edit-link:hover { color: #1a2332; }

/* ── Form Fields ── */
.mh-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.mh-field { margin-bottom: 18px; }
.mh-field.full-width { grid-column: 1 / -1; }
.mh-section-title {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; color: #8a8f97;
  text-transform: uppercase;
  margin: 8px 0 12px;
  padding-top: 16px;
  border-top: 1px solid #f0ebe5;
  grid-column: 1 / -1;
}
.mh-label {
  display: block;
  font-size: 0.65rem; letter-spacing: 0.08em;
  font-weight: 700; color: #8a8f97;
  margin-bottom: 6px;
}
.mh-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  font-size: 0.92rem; color: #1a2332;
  background: #faf8f6;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.mh-input:focus { border-color: #1a2332; background: #fff; }
.mh-input::placeholder { color: #b0aaa3; }
textarea.mh-input { min-height: 90px; resize: vertical; line-height: 1.5; }

/* ── Radio / Checkbox ── */
.mh-options-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mh-radio-label,
.mh-checkbox-label {
  display: inline-flex;
  align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem; color: #1a2332;
  transition: border-color 0.15s;
  background: #faf8f6;
  font-family: inherit;
}
.mh-radio-label:hover,
.mh-checkbox-label:hover { border-color: #1a2332; }
.mh-radio-label input,
.mh-checkbox-label input { accent-color: #1a2332; cursor: pointer; }

/* ── Actions ── */
.mh-actions {
  display: flex; align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f0ebe5;
}
.mh-actions-right { justify-content: flex-end; }
.mh-actions-between { justify-content: space-between; }

.mh-btn-primary {
  display: inline-flex;
  align-items: center; gap: 6px;
  background: #1a2332; color: #fff;
  border: none; border-radius: 10px;
  padding: 13px 28px;
  font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
  font-family: inherit;
  vertical-align: middle;
  text-decoration: none;
}
.mh-btn-primary:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.mh-btn-primary:disabled,
input.mh-btn-primary.disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.mh-btn-arrow { font-size: 1.1rem; line-height: 1; }

.mh-btn-back {
  background: none; border: none;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.05em; color: #8a8f97;
  cursor: pointer; padding: 4px 0;
  transition: color 0.15s; font-family: inherit;
}
.mh-btn-back:hover { color: #1a2332; }

/* ── Error Overlay ── */
.mh-error-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.mh-error-overlay.show { display: flex; }
.mh-error-box {
  background: #fff;
  border-radius: 14px; padding: 28px;
  max-width: 420px; width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
}
.mh-error-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mh-error-title { font-size: 1rem; font-weight: 700; color: #1a2332; }
.mh-error-close {
  background: none; border: none;
  font-size: 1.4rem; color: #8a8f97;
  cursor: pointer; padding: 0; line-height: 1;
}
.mh-error-body {
  font-size: 0.88rem; color: #c0392b;
  line-height: 1.5;
  background: #fef5f5;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 12px 14px;
}
.mh-error-body a { color: #1a2332; font-weight: 600; }

/* ── Confirmation ── */
.mh-confirmation { text-align: center; padding: 40px 20px; }
.mh-confirm-icon { width: 60px; height: 60px; margin: 0 auto 20px; }
.mh-confirm-icon svg { width: 60px; height: 60px; }
.mh-confirm-title {
  font-size: 1.7rem; font-weight: 600;
  color: #1a2332; margin-bottom: 8px;
}
.mh-confirm-sub { font-size: 0.9rem; color: #6b7a8d; margin-bottom: 20px; }
.mh-confirm-time {
  display: inline-block;
  background: #f9f6f2; border-radius: 12px;
  padding: 14px 28px;
  font-size: 0.95rem; font-weight: 600; color: #1a2332;
}

/* ── Step transition ── */
@keyframes mh-step-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mh-step-enter { animation: mh-step-enter 0.25s ease forwards; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .mh-card { padding: 24px 16px; }
  .mh-time-layout { grid-template-columns: 1fr; }
  .mh-fields-grid { grid-template-columns: 1fr; }
  .mh-field.full-width,
  .mh-section-title { grid-column: 1; }
  .mh-brand { font-size: 1.6rem; }
  .mh-slots-grid { grid-template-columns: repeat(3, 1fr); }
}
