/* Meetly booking widget styles. Reuses the site's design tokens (index.html's
   :root custom properties) where the widget is embedded on-site; falls back
   to the same literal values here so this file also works standalone on
   book/index.html without depending on load order. */

.mtly {
  --mtly-off-white: var(--off-white, #F7F6F2);
  --mtly-dark-slate: var(--dark-slate, #1C2B3A);
  --mtly-teal: var(--teal, #2A7F7F);
  --mtly-teal-light: var(--teal-light, #3A9F9F);
  --mtly-text-dark: var(--text-dark, #1A1A1A);
  --mtly-text-mid: var(--text-mid, #070936);
  --mtly-text-muted: #6b7280;
  --mtly-border: var(--border-light, rgba(0, 0, 0, 0.08));
  --mtly-danger: #b3261e;
  --mtly-font-head: var(--font-head, 'EB Garamond', Garamond, serif);
  --mtly-font-body: var(--font-body, 'Montserrat', sans-serif);

  font-family: var(--mtly-font-body);
  color: var(--mtly-text-dark);
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  box-sizing: border-box;
}

.mtly *,
.mtly *::before,
.mtly *::after {
  box-sizing: border-box;
}

.mtly .mtly-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.mtly-eyebrow {
  font-family: var(--mtly-font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mtly-teal);
  margin-bottom: 12px;
}

.mtly-title {
  font-family: var(--mtly-font-head);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 12px;
}

.mtly-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mtly-text-mid);
  margin-bottom: 28px;
}

/* ── Timezone banner ── */
.mtly-tz-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(42, 127, 127, 0.06);
  border: 1px solid rgba(42, 127, 127, 0.2);
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.mtly-tz-banner select {
  font-family: var(--mtly-font-body);
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--mtly-border);
  border-radius: 3px;
  background: #fff;
}

.mtly-tz-note {
  font-size: 12px;
  color: var(--mtly-text-muted);
  flex-basis: 100%;
}

/* ── Slot picker ── */
.mtly-picker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mtly-picker-nav button {
  font-family: var(--mtly-font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1.5px solid var(--mtly-border);
  background: transparent;
  color: var(--mtly-text-dark);
  border-radius: 3px;
  cursor: pointer;
}

.mtly-picker-nav button:hover:not(:disabled) {
  border-color: var(--mtly-teal);
  color: var(--mtly-teal);
}

.mtly-picker-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mtly-picker-nav button:focus-visible,
.mtly button:focus-visible,
.mtly a:focus-visible,
.mtly input:focus-visible,
.mtly [tabindex]:focus-visible {
  outline: 3px solid var(--mtly-teal-light);
  outline-offset: 2px;
}

.mtly-days {
  display: grid;
  grid-template-columns: repeat(var(--mtly-day-cols, 7), 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .mtly-days {
    grid-template-columns: repeat(var(--mtly-day-cols-mobile, 3), 1fr);
  }
}

.mtly-day {
  border: 1px solid var(--mtly-border);
  border-radius: 4px;
  padding: 10px 8px;
  min-height: 100%;
}

/* Week/month boundary markers ("just for ease", Alon's request, 2026-08-06)
   — shown columns skip empty days, so these compare each column's actual
   date to the previous one shown, not the grid position. Logical property
   (not border-left) so the marker lands on the correct side in RTL too,
   since the grid's column order visually reverses there. */
.mtly-day.mtly-week-start {
  border-inline-start: 2px solid var(--mtly-teal);
}

.mtly-day.mtly-month-start {
  border-inline-start: 3px solid var(--mtly-text-dark);
}

.mtly-day-label {
  font-family: var(--mtly-font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mtly-text-mid);
  margin-bottom: 8px;
  text-align: center;
}

.mtly-slot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mtly-slot-btn {
  width: 100%;
  font-family: var(--mtly-font-body);
  font-size: 13px;
  padding: 8px 6px;
  border: 1.5px solid var(--mtly-border);
  background: #fff;
  color: var(--mtly-text-dark);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.mtly-slot-btn:hover,
.mtly-slot-btn:focus-visible {
  border-color: var(--mtly-teal);
  background: rgba(42, 127, 127, 0.06);
}

.mtly-slot-btn[data-rank="1"] {
  border-color: rgba(42, 127, 127, 0.4);
  background: rgba(42, 127, 127, 0.04);
}

.mtly-slot-btn[aria-pressed="true"] {
  background: var(--mtly-teal);
  border-color: var(--mtly-teal);
  color: #fff;
}

.mtly-status,
.mtly-empty,
.mtly-error {
  font-size: 14px;
  padding: 16px;
  text-align: center;
  color: var(--mtly-text-muted);
}

.mtly-error {
  color: var(--mtly-danger);
}

/* Fallback callout (PRD A22) — the single far-future opening the backend
   found when nothing was available in the normal horizon. */
.mtly-fallback {
  text-align: center;
  padding: 24px 12px;
}

.mtly-fallback-heading {
  font-family: var(--mtly-font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.mtly-fallback-intro {
  font-size: 14px;
  color: var(--mtly-text-muted);
  margin-bottom: 12px;
}

.mtly-fallback .mtly-day-label {
  margin-bottom: 10px;
}

.mtly-fallback .mtly-slot-list {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto 24px;
}

.mtly-fallback .mtly-slot-btn {
  width: auto;
  padding: 8px 16px;
}

.mtly-fallback-contact {
  font-size: 13px;
  color: var(--mtly-text-muted);
  max-width: 420px;
  margin: 0 auto;
}

.mtly-fallback-contact a {
  color: var(--mtly-teal);
}

/* Visually hidden but screen-reader accessible aria-live region. */
.mtly-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Form ── */
.mtly-form {
  margin-top: 8px;
}

.mtly-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mtly-font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mtly-teal);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
}

.mtly-selected-time {
  background: rgba(42, 127, 127, 0.06);
  border: 1px solid rgba(42, 127, 127, 0.2);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.mtly-field {
  margin-bottom: 18px;
}

.mtly-field label {
  display: block;
  font-family: var(--mtly-font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.mtly-field input,
.mtly-field textarea {
  width: 100%;
  font-family: var(--mtly-font-body);
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--mtly-border);
  border-radius: 3px;
  background: #fff;
  color: var(--mtly-text-dark);
}

.mtly-field input:focus,
.mtly-field textarea:focus {
  outline: none;
  border-color: var(--mtly-teal);
}

.mtly-field textarea {
  min-height: 90px;
  resize: vertical;
}

.mtly-field-hint {
  font-size: 12px;
  color: var(--mtly-text-muted);
  margin-top: 4px;
}

.mtly-field-error {
  font-size: 12px;
  color: var(--mtly-danger);
  margin-top: 4px;
}

/* Option groups (e.g. "I am primarily" / stage) — pill-styled native radio
   buttons, so keyboard nav/focus/selection work without custom JS (PRD §13).
   Overrides .mtly-field input's generic text-input styling above. */
.mtly-option-group fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.mtly-option-group legend {
  font-family: var(--mtly-font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  padding: 0;
}

.mtly-option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mtly-option-pill {
  position: relative;
  cursor: pointer;
}

.mtly-option-pill input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
}

.mtly-option-pill span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--mtly-border);
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  color: var(--mtly-text-dark);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.mtly-option-pill input[type="radio"]:checked + span {
  background: var(--mtly-teal);
  border-color: var(--mtly-teal);
  color: #fff;
}

.mtly-option-pill input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--mtly-teal);
  outline-offset: 2px;
}

.mtly-option-group fieldset[aria-invalid="true"] .mtly-option-pill span {
  border-color: var(--mtly-danger);
}

/* Honeypot: off-screen, not display:none — visible to screen readers'
   linear reading is avoided via aria-hidden, but present in the DOM/tab
   order is deliberately NOT excluded so naive bots that fill every field
   still trip it; real users never see or reach it. */
.mtly-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mtly-btn {
  display: inline-block;
  font-family: var(--mtly-font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  background: var(--mtly-teal);
  color: #fff;
  transition: background 0.15s;
}

.mtly-btn:hover:not(:disabled) {
  background: var(--mtly-teal-light);
}

.mtly-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Confirmation ── */
.mtly-confirmation {
  text-align: center;
  padding: 32px 16px;
}

.mtly-confirmation-title {
  font-family: var(--mtly-font-head);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--mtly-teal);
}

.mtly-confirmation-detail {
  background: rgba(42, 127, 127, 0.06);
  border: 1px solid rgba(42, 127, 127, 0.2);
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  text-align: start;
}

.mtly-confirmation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.mtly-manage-note {
  font-size: 13px;
  color: var(--mtly-text-muted);
  margin-top: 24px;
}
