/* ============================================================
   UNIFIED RESERVE MODAL — subscriptions page
   All rules scoped to .rm-* to avoid conflicts.
   ============================================================ */

/* ── Screen-reader only (visually hidden, accessible) ──── */
.rm-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;
}

/* ── State visibility ───────────────────────────────────── */
.rm-hidden {
  display: none !important;
}

/* ── Backdrop ───────────────────────────────────────────── */
.rm-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rm-backdrop.is-open {
  display: flex;
}

/* ── Dialog shell ───────────────────────────────────────── */
.rm-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Close button — 44×44px tap target ─────────────────── */
.rm-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888780;
  border-radius: 8px;
  padding: 0;
  transition: background 0.15s;
}

.rm-close:hover { background: var(--bg-grey); }

.rm-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ============================================================
   A) MENTOR AREA
   ============================================================ */

/* ── Confirmed row (pre-selected from a card) ───────────── */
.rm-confirmed {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F9F5FB;
  border: 1.5px solid #6C3483;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.rm-conf-photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
  flex-shrink: 0;
  display: block;
}

.rm-conf-info {
  flex: 1;
  min-width: 0;
}

.rm-conf-name {
  display: block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

.rm-conf-meta {
  display: block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

.rm-change-btn {
  background: none;
  border: none;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6C3483;
  cursor: pointer;
  padding: 6px 0;
  flex-shrink: 0;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.rm-change-btn:hover { opacity: 0.8; }

/* ── Selector (no mentor pre-selected, or after Change) ─── */
.rm-selector-label {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 8px;
  display: block;
  -webkit-font-smoothing: antialiased;
}

/* Fieldset reset */
.rm-mentor-options {
  border: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Each mentor row — a <label> wrapping the radio */
.rm-mentor-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #ffffff;
  min-height: 44px;
}

.rm-mentor-opt:hover {
  border-color: rgba(108, 52, 131, 0.4);
  background: #faf7fc;
}

/* Selected state — purple ring + light fill */
.rm-mentor-opt.is-selected {
  border: 1.5px solid #6C3483;
  background: #F9F5FB;
}

/* Focus ring when the radio inside this label is focused */
.rm-mentor-opt:focus-within {
  outline: 2px solid #6C3483;
  outline-offset: 1px;
}

.rm-opt-photo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
  flex-shrink: 0;
  display: block;
}

.rm-opt-info {
  flex: 1;
  min-width: 0;
}

.rm-opt-name {
  display: block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

.rm-opt-meta {
  display: block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

/* Check circle — hidden until selected */
.rm-opt-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: none;
}

.rm-mentor-opt.is-selected .rm-opt-check {
  display: block;
}

/* "I'll decide at launch" */
.rm-undecided-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6C3483;
  cursor: pointer;
  padding: 8px 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
  -webkit-font-smoothing: antialiased;
}

.rm-undecided-btn:hover {
  text-decoration-color: #6C3483;
}

.rm-undecided-btn.is-selected {
  text-decoration-color: #6C3483;
  font-weight: 600;
}

/* ============================================================
   B) HEADING + BODY
   ============================================================ */
.rm-heading {
  font-family: 'Inter Display', Inter, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue);
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.rm-body {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 14px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   C) FORM
   ============================================================ */
.rm-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Shared input style — name and email */
.rm-input {
  width: 100%;
  height: 44px;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--blue);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  margin-bottom: 6px;
  -webkit-font-smoothing: antialiased;
}

.rm-input::placeholder { color: #aaa; }
.rm-input:focus        { border-color: #6C3483; }

/* Inline error */
.rm-error {
  display: block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11.5px;
  color: #c0392b;
  margin-bottom: 8px;
  -webkit-font-smoothing: antialiased;
}

/* Submit button */
.rm-submit {
  display: block;
  width: 100%;
  height: 46px;
  background: #6C3483;
  color: #ffffff;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s;
  margin-top: 10px;
  margin-bottom: 10px;
  -webkit-font-smoothing: antialiased;
}

.rm-submit:hover:not(:disabled) { background: #5A2C6E; }
.rm-submit:disabled              { opacity: 0.65; cursor: not-allowed; }

/* Microcopy */
.rm-micro {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  color: #888780;
  text-align: center;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.rm-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rm-success-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  flex-shrink: 0;
}

.rm-success-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rm-success-heading {
  font-family: 'Inter Display', Inter, -apple-system, sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--blue);
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}

.rm-success-body {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 16px;
  -webkit-font-smoothing: antialiased;
}

/* Reassurance box */
.rm-reassurance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg-grey);
  border-radius: 10px;
  padding: 13px;
  text-align: left;
  width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.rm-reassurance-icon {
  color: #6C3483;
  flex-shrink: 0;
  margin-top: 1px;
}

.rm-reassurance-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.rm-reassurance-text {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Done button */
.rm-done {
  display: block;
  width: 100%;
  height: 44px;
  background: transparent;
  color: #6C3483;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-font-smoothing: antialiased;
}

.rm-done:hover { background: var(--bg-grey); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .rm-dialog {
    padding: 20px 18px 18px;
    border-radius: 14px;
  }
}

/* ============================================================
   ACCESSIBILITY — focus visible
   ============================================================ */
.rm-close:focus-visible,
.rm-submit:focus-visible,
.rm-done:focus-visible,
.rm-change-btn:focus-visible,
.rm-undecided-btn:focus-visible,
.rm-input:focus-visible {
  outline: 2px solid #6C3483;
  outline-offset: 2px;
}
