/* claude — Thurgood-wide form fields (.mk-form-*): grid, labels, inputs, the custom state
   dropdown, the consent checkbox, and the app.css overrides that keep typed inputs at the
   design's size. Shared asset: load it on any page with an mk- form (after marketing-core-claude.css,
   which provides the tokens + .mk-btn). Used by /referral and /login. Moved verbatim from
   marketing-referral-claude.css. */

.mk-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.mk-form-field { display: flex; flex-direction: column; gap: 6px; }
.mk-form-field.wide { grid-column: 1 / -1; }
.mk-form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mk-text);
  letter-spacing: 0.005em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mk-form-req { color: var(--mk-orange-d); margin-left: 2px; }
.mk-form-input,
.mk-form-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--mk-text);
  background: #ffffff;
  border: 1px solid var(--mk-line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.mk-form-input::placeholder { color: var(--mk-text-mute); }
.mk-form-input:focus, .mk-form-select:focus {
  border-color: var(--mk-teal-3);
  box-shadow: 0 0 0 3px rgba(14,84,84,0.10);
}
.mk-form-input.filled,
.mk-form-input[disabled],
.mk-form-input[readonly] {
  background: var(--mk-inset);
  color: var(--mk-text);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.mk-form-select-wrap { position: relative; }
.mk-form-select { padding-right: 38px; cursor: pointer; color: var(--mk-text-mute); }
.mk-form-select.has-value { color: var(--mk-text); }
.mk-form-select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mk-teal-3);
  pointer-events: none;
  display: inline-flex;
}
.mk-form-submit {
  margin-top: 26px;
  width: 100%;
  justify-content: center;
}
.mk-form-consent {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--mk-text-soft);
  cursor: pointer;
}
.mk-form-consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.mk-form-consent-box {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid var(--mk-line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}
.mk-form-consent-box svg { opacity: 0; transition: opacity 120ms ease; }
.mk-form-consent input:checked ~ .mk-form-consent-box {
  background: var(--mk-teal-3);
  border-color: var(--mk-teal-3);
}
.mk-form-consent input:checked ~ .mk-form-consent-box svg { opacity: 1; }
.mk-form-consent a {
  color: var(--mk-teal-3);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .mk-form-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   app.css overrides — claude
   The app shell styles inputs by attribute selector:
     input[type="email"], input[type="password"], input[type="text"], select { font-size: 1.25vw; ... }
   That (0,1,1) out-ranks .mk-form-input (0,1,0), so typed inputs render huge and
   scale with viewport width. Force the design's fixed sizing back.
   ============================================================ */
.mk-referral .mk-form-input,
.mk-referral .mk-form-select,
.mk-form-input,
.mk-form-select {
  font-size: 14.5px !important;
  line-height: 1.4 !important;
  padding: 12px 14px !important;
  height: auto !important;
  min-height: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
}
.mk-referral .mk-form-select,
.mk-form-select { padding-right: 38px !important; }

/* ============================================================
   app.css border/outline + select fixes — claude
   app.css zeroes the typed inputs' border (input[type=email/password/text] { border:0 })
   and applies a teal outline — that stray teal "stroke" is what shows. Restore the design's
   1px gray border, kill the outline, and harden the select text size.
   ============================================================ */
.mk-referral .mk-form-input,
.mk-referral .mk-form-select,
.mk-form-input,
.mk-form-select {
  border: 1px solid var(--mk-line-strong) !important;
  border-radius: 10px !important;
  outline: none !important;
  -moz-appearance: none !important;
}
.mk-referral .mk-form-input:focus,
.mk-referral .mk-form-select:focus,
.mk-form-input:focus,
.mk-form-select:focus {
  border: 1px solid var(--mk-teal-3) !important;
  box-shadow: 0 0 0 3px rgba(14,84,84,0.10) !important;
  outline: none !important;
}
/* select: some browsers size the closed control from the option, not the select */
.mk-referral .mk-form-select,
.mk-form-select { font-size: 14.5px !important; line-height: 1.4 !important; }
.mk-referral .mk-form-select option,
.mk-form-select option { font-size: 14.5px !important; }

/* ============================================================
   CUSTOM STATE DROPDOWN — claude
   Native <select> renders its own control text on some Chrome setups
   (flags/extensions that re-skin form controls), ignoring the CSS size.
   This is a pure <button>+list dropdown (no native <select>), so it sizes
   exactly like the text inputs everywhere. Submits via a hidden #state field.
   ============================================================ */
.mk-form-select-btn {
  text-align: left;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--mk-text-mute);
}
.mk-form-select-text { color: var(--mk-text); }
.mk-form-select-text.is-placeholder { color: var(--mk-text-mute); }
.mk-form-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--mk-line-strong);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15,74,74,0.16);
  display: none;
}
.mk-form-select-wrap[data-open="true"] .mk-form-select-list { display: block; }
.mk-form-select-opt {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--mk-text);
  cursor: pointer;
}
.mk-form-select-opt:hover,
.mk-form-select-opt.is-active { background: var(--mk-inset); color: var(--mk-text); }
.mk-form-select-wrap[data-open="true"] .mk-form-select-caret { transform: translateY(-50%) rotate(180deg); }

/* ============================================================
   SEARCH FIELD — claude. Thurgood's standard search input: a .mk-form-input with a
   clear (x) button that appears once something is typed and empties the field.
   Markup:
     <span class="mk-form-search">
       <input type="search" class="mk-form-input" …>
       <button type="button" class="mk-form-search-clear" aria-label="Clear search" hidden>…x svg…</button>
     </span>
   Optional leading magnifier: add .has-icon and a <span class="mk-form-search-icon">svg</span>
   first. Behavior: /js/forms-claude.js (clear → empties, focuses, fires input + change).
   Token fallbacks so it also works where marketing-core-claude.css isn't loaded.
   ============================================================ */
.mk-form-search { position: relative; display: block; width: 100%; }
.mk-form-search .mk-form-input {
  width: 100%; padding-right: 40px !important;
  color: var(--mk-text, #1a1a1a) !important;   /* base-claude.css colors search inputs teal (#0f7173) */
  -webkit-text-fill-color: var(--mk-text, #1a1a1a);
}
.mk-form-search .mk-form-input::placeholder { color: var(--mk-text-mute, #989898); -webkit-text-fill-color: var(--mk-text-mute, #989898); opacity: 1; }
.mk-form-search.has-icon .mk-form-input { padding-left: 38px !important; }
.mk-form-search .mk-form-input::-webkit-search-cancel-button,
.mk-form-search .mk-form-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.mk-form-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: inline-flex; color: var(--mk-text-mute, #989898); pointer-events: none;
}
.mk-form-search-clear {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--mk-text-mute, #989898); cursor: pointer;
}
.mk-form-search-clear:hover { background: var(--mk-inset, #f0f4f3); color: var(--mk-text, #1a1a1a); }
.mk-form-search-clear:focus-visible { outline: 2px solid var(--mk-teal-3, #0e5454); outline-offset: 1px; }
.mk-form-search-clear[hidden] { display: none; }
