/* Membership registration modal. Markup is injected by membership-modal.js, so
   the styles are written out in full rather than relying on each page's
   Tailwind config. Colours come from brand-theme.css. */

html.mm-lock {
  overflow: hidden;
}

.mm {
  width: min(1040px, calc(100vw - 2rem));
  max-width: none;
  height: min(780px, calc(100dvh - 2rem));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: var(--earth);
  box-shadow: 0 40px 90px -30px rgba(20, 45, 26, 0.55);
}

.mm[open] {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}

.mm::backdrop {
  background: rgba(24, 38, 27, 0.62);
  backdrop-filter: blur(6px);
}

.mm [hidden] {
  display: none !important;
}

/* ---------- Brand panel ---------- */
.mm-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 36px 32px 32px;
  background: var(--shamrock);
  color: #fff;
}

.mm-aside::before,
.mm-aside::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.mm-aside::before {
  right: -140px;
  bottom: -140px;
  width: 360px;
  height: 360px;
}

.mm-aside::after {
  right: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.04);
}

.mm-logo {
  width: 176px;
  height: auto;
}

.mm-eyebrow {
  margin-top: 44px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.mm-title {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}

.mm-lede {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.mm-steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  margin-top: auto;
  padding-top: 32px;
  list-style: none;
}

.mm-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.mm-steps b {
  display: block;
  font-weight: 600;
  color: #fff;
}

.mm-step-num {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Form panel ---------- */
.mm-main {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.mm-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--linen);
  color: var(--earth);
  transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.mm-close:hover {
  background: var(--shamrock);
  color: #fff;
}

.mm-close svg {
  width: 18px;
  height: 18px;
}

.mm-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.mm-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 40px 28px;
}

/* Stays put so the fields never scroll under the close button */
.mm-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 32px 48px 14px 0;
  background: #fff;
}

.mm-head + .mm-section {
  margin-top: 14px;
}

.mm-head h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--shamrock);
}

.mm-head p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #746860;
}

.mm-section {
  min-width: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.mm-section legend {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shamrock);
}

.mm-section legend::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--stone);
}

.mm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mm-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.mm-field--wide {
  grid-column: 1 / -1;
}

.mm-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--earth);
}

.mm-label i {
  font-style: normal;
  color: #b3261e;
}

.mm-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--stone);
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  line-height: 1.4;
  color: var(--earth);
  transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}

textarea.mm-input {
  min-height: 84px;
  resize: vertical;
}

.mm-input::placeholder {
  color: #a39a90;
}

.mm-input:hover {
  border-color: #b9b2a5;
}

.mm-input:focus {
  border-color: var(--shamrock);
  box-shadow: 0 0 0 4px rgba(34, 97, 52, 0.12);
  outline: none !important;
}

.mm-input[aria-invalid="true"] {
  border-color: #b3261e;
  background: #fff8f7;
}

.mm-input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12);
}

.mm-hint,
.mm-error {
  font-size: 13px;
  line-height: 1.4;
}

.mm-hint {
  color: #8a7f75;
}

.mm-error {
  color: #b3261e;
}

/* ---------- Membership category ---------- */
.mm-tiers {
  display: grid;
  gap: 8px;
}

.mm-tier {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid var(--stone);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.mm-tier:hover {
  border-color: var(--shamrock);
}

.mm-tier input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mm-tier-dot {
  display: flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #b9b2a5;
  border-radius: 50%;
  background: #fff;
  transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease);
}

.mm-tier-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform var(--motion-fast) var(--motion-ease);
}

.mm-tier-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.mm-tier-note {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #746860;
}

.mm-tier-fee {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.mm-tier-fee small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #746860;
}

.mm-tier:has(input:checked) {
  border-color: var(--shamrock);
  background: rgba(34, 97, 52, 0.06);
  box-shadow: inset 0 0 0 1px var(--shamrock);
}

.mm-tier:has(input:checked) .mm-tier-dot {
  border-color: var(--shamrock);
  background: var(--shamrock);
}

.mm-tier:has(input:checked) .mm-tier-dot::after {
  transform: scale(1);
}

.mm-tier:has(input:focus-visible) {
  outline: 3px solid var(--spring);
  outline-offset: 3px;
}

.mm-tiers[aria-invalid="true"] .mm-tier {
  border-color: #b3261e;
}

.mm-tiers-link {
  margin-top: 10px;
  font-size: 13px;
  color: #746860;
}

.mm-tiers-link a {
  font-weight: 600;
  color: var(--shamrock);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */
.mm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 40px;
  border-top: 1px solid var(--stone);
  background: #fff;
}

.mm-foot-note {
  font-size: 13px;
  line-height: 1.4;
  color: #746860;
}

.mm-foot-note[data-mm-alert] {
  flex-basis: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdecea;
  color: #8c1d18;
}

.mm-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.mm-btn {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease);
}

.mm-btn--primary {
  background: var(--shamrock);
  color: #fff;
}

.mm-btn--primary:hover {
  background: var(--leaf);
}

.mm-btn--primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.mm-btn--quiet {
  border-color: var(--stone);
  background: #fff;
  color: var(--earth);
}

.mm-btn--quiet:hover {
  border-color: var(--shamrock);
  color: var(--shamrock);
}

.mm-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Sent state ---------- */
.mm-sent {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 40px;
  outline: none;
}

.mm-sent-icon {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--spring);
  color: #fff;
}

.mm-sent-icon svg {
  width: 26px;
  height: 26px;
}

.mm-sent h2 {
  margin-top: 24px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--shamrock);
}

.mm-sent p {
  max-width: 460px;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: #5f554e;
}

.mm-sent .mm-btn {
  margin-top: 32px;
}

/* ---------- Tablet and phone: one column, full-height sheet ---------- */
@media (max-width: 899px) {
  .mm {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .mm[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .mm-aside {
    padding: 18px 20px;
  }

  .mm-aside::before,
  .mm-aside::after,
  .mm-eyebrow,
  .mm-title,
  .mm-lede,
  .mm-steps {
    display: none;
  }

  .mm-logo {
    width: 176px;
  }

  .mm-close {
    position: fixed;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .mm-scroll {
    padding: 0 20px 24px;
  }

  .mm-head {
    padding: 22px 0 12px;
  }

  .mm-foot {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }

  .mm-sent {
    padding: 32px 20px;
  }
}

@media (max-width: 599px) {
  .mm-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mm-foot-note:not([data-mm-alert]) {
    display: none;
  }

  .mm-actions {
    width: 100%;
  }

  .mm-actions .mm-btn--primary {
    flex: 1;
  }

  .mm-btn {
    padding: 0 18px;
  }
}

/* Zoho manages the registration fields and submission state. */
.mm-embed-head {
  padding-left: 24px;
  flex-shrink: 0;
}

.mm-embed-head a {
  color: var(--shamrock);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mm-embed {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
}
