/* Member forms. Colours come from the theme where it defines them, with
   fallbacks so the shortcodes still look right on any theme. */

.jkcm {
  --m-ink: var(--ink, #1a1d17);
  --m-ink2: var(--ink-2, #4e554a);
  --m-ink3: var(--ink-3, #7c8377);
  --m-rule: var(--rule, #d3d7cb);
  --m-rule2: var(--rule-2, #e2e5dc);
  --m-surface: var(--surface, #ffffff);
  --m-sunk: #f2f4ee;
  --m-green: var(--green, #2e6b33);
  --m-deep: var(--green-deep, #16391d);
  --m-signal: var(--signal, #4e9c43);
  --m-tint: var(--green-tint, #dfe8da);
  --m-gold: var(--gold, #9a7420);
  --m-gold-tint: #f2e9d6;
  --m-crit: #97281f;
  --m-crit-tint: #f8e5e2;
  --m-on-green: #eef3e9;
  --m-mono: var(--mono, ui-monospace, Menlo, monospace);
  color: var(--m-ink);
  max-width: 760px;
}

/* ---------- messages ---------- */

.jkcm-msg {
  border-left: 3px solid var(--m-green);
  background: var(--m-sunk);
  padding: 16px 18px;
  margin: 0 0 24px;
}
.jkcm-msg p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; }
.jkcm-msg p:last-child { margin-bottom: 0; }
.jkcm-msg ul { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.6; }
.jkcm-msg li { margin-bottom: 5px; }
.jkcm-msg li:last-child { margin-bottom: 0; }
.jkcm-msg--good { border-left-color: var(--m-signal); background: var(--m-tint); }
.jkcm-msg--bad { border-left-color: var(--m-crit); background: var(--m-crit-tint); }

.jkcm-lede { margin: 0 0 26px; }
.jkcm-lede p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--m-ink2); max-width: 62ch; }

/* ---------- fields ---------- */

.jkcm-form { margin: 0 0 34px; }

.jkcm-set {
  border: 0;
  border-top: 1px solid var(--m-rule);
  margin: 0 0 24px;
  padding: 20px 0 0;
}
.jkcm-set legend {
  font-family: var(--m-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--m-ink3);
  padding: 0 10px 0 0;
}

.jkcm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 620px) { .jkcm-pair { grid-template-columns: 1fr; } }

.jkcm-field { margin: 0 0 18px; }
.jkcm-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
.jkcm-req { color: var(--m-crit); }

.jkcm-field input,
.jkcm-field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--m-rule);
  background: var(--m-sunk);
  color: var(--m-ink);
  border-radius: 0;
}
.jkcm-field input:focus,
.jkcm-field select:focus { outline: 2px solid var(--m-signal); outline-offset: 2px; }
.jkcm-field input:disabled { opacity: .65; cursor: not-allowed; }

.jkcm-help {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--m-ink3);
}
.jkcm-help.is-bad { color: var(--m-crit); }
.jkcm-help.is-good { color: var(--m-green); }

.jkcm-check label { font-weight: 400; font-size: 14px; line-height: 1.5; }
.jkcm-check input { width: auto; margin-right: 8px; }

/* The honeypot. Off-screen rather than display:none, which some bots skip. */
.jkcm-trap {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- buttons ---------- */

.jkcm-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--m-green);
  background: var(--m-green);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.jkcm-submit:hover { background: var(--m-deep); border-color: var(--m-deep); color: #fff; }
.jkcm-submit--quiet { background: transparent; color: var(--m-green); }
.jkcm-submit--quiet:hover { background: var(--m-tint); color: var(--m-deep); }

.jkcm-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--m-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.jkcm-foot { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.jkcm-foot .jkcm-help { margin: 0; }
.jkcm-inline { display: inline; }

/* ---------- account status ---------- */

.jkcm-status {
  border-left: 3px solid var(--m-ink3);
  background: var(--m-sunk);
  padding: 20px 22px;
  margin: 0 0 26px;
}
.jkcm-status__label {
  font-family: var(--m-mono);
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--m-ink3);
  margin: 0 0 6px;
}
.jkcm-status__value {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.jkcm-status__note { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--m-ink2); }
.jkcm-status--member { border-left-color: var(--m-signal); background: var(--m-tint); }
.jkcm-status--pending,
.jkcm-status--verified { border-left-color: var(--m-gold); background: var(--m-gold-tint); }
.jkcm-status--declined,
.jkcm-status--lapsed { border-left-color: var(--m-crit); background: var(--m-crit-tint); }

.jkcm-cta { margin: 0 0 26px; }

/* ---------- signed-out gate ---------- */

.jkcm-gate { background: var(--m-deep); color: var(--m-on-green); padding: clamp(22px, 4vw, 40px); }
.jkcm-gate p { margin: 0 0 16px; font-size: 16px; line-height: 1.55; }
.jkcm-gate p:last-child { margin-bottom: 0; }
.jkcm-gate .jkcm-submit { background: var(--m-signal); border-color: var(--m-signal); color: #10240f; }

@media (prefers-reduced-motion: reduce) {
  .jkcm * { transition: none !important; animation: none !important; }
}
