/* ============================================================
   Giddy Up — Registration Page Styles
   Brand-themed to match the index.html landing page.
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --card: #FFFEFC;
  --border: #E8DFD4;
  --text: #2C1810;
  --muted: #6B6560;
  --accent: #8B4513;
  --accent-light: #A65D2E;
  --gold: #D4A853;
  --gold-light: #E8C97A;
  --sage: #7A8B6E;
  --sage-light: #8FA082;
  --espresso: #2C1810;
  --soft-white: #FFFEFC;
  --ok: #7A8B6E;
  --err: #B85042;
  --radius: 14px;
  --shadow: 0 18px 44px rgba(44,24,16,.12);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ---- Background ---- */
.bg-pattern {
  position: fixed; inset: 0;
  background:
    radial-gradient(1400px 700px at 30% 35%, rgba(250,247,242,.92), rgba(250,247,242,.88)),
    linear-gradient(to bottom, rgba(250,247,242,.92), rgba(250,247,242,.88));
  z-index: -2;
}
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(44,24,16,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44,24,16,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .28;
  z-index: -1;
}

/* ============================================================
   Header
   ============================================================ */
.reg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  max-width: 900px;
  margin: 0 auto;
}
.reg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.reg-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(212,168,83,.35);
}
.reg-logo-mark span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--espresso);
}
.reg-logo-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px; font-weight: 600;
  color: var(--espresso);
  letter-spacing: -0.3px;
}
.reg-header-actions {
  display: flex; align-items: center; gap: 16px;
}
.reg-header-actions button,
.reg-header-actions a {
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: none; border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all .2s ease;
}
.reg-header-actions button:hover,
.reg-header-actions a:hover {
  background: rgba(44,24,16,.05);
  color: var(--espresso);
}

/* ============================================================
   Main Card
   ============================================================ */
main {
  display: flex;
  justify-content: center;
  padding: 10px 16px 76px;
}
.card {
  width: min(860px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  background: linear-gradient(to bottom, #F5EDE4, var(--card));
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.card-head h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--espresso);
}

/* Stepper dots */
.stepper {
  display: flex; justify-content: center; gap: 8px; margin-top: 10px;
}
.dot {
  width: 30px; height: 6px;
  border-radius: 999px;
  background: var(--border);
  border: 1px solid var(--border);
  transition: background .2s ease;
}
.dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.card-body { padding: 18px; }

/* ============================================================
   Utility Classes (replaces inline styles)
   ============================================================ */
.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 12px; }
.mt-lg  { margin-top: 16px; }
.mb-md  { margin-bottom: 12px; }
.hidden { display: none; }

.hint {
  color: var(--muted); font-size: 12px; line-height: 1.35;
}
.divider {
  height: 1px; background: var(--border); margin: 14px 0;
}

/* ============================================================
   Form Controls
   ============================================================ */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.one { grid-template-columns: 1fr; }
.field { position: relative; }

label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 6px;
}
.req::after { content: " *"; color: var(--err); }

input, select, textarea {
  width: 100%; padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { min-height: 92px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,83,.18);
}

.label-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}

/* Info button */
.info-btn {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: #fff; cursor: pointer;
  user-select: none;
  transition: all .2s ease;
}
.info-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Tooltip */
.tooltip {
  margin: 8px 0;
  width: 100%;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(44,24,16,.1);
  font-size: 12px; color: var(--text); line-height: 1.35;
  display: none;
}
.tooltip.open { display: block; }

/* Validation messages */
.msg { margin-top: 6px; font-size: 12px; display: none; }
.msg.err { color: var(--err); }
.msg.ok  { color: var(--ok); }

/* Phone group */
.phone-group { display: grid; grid-template-columns: 220px 1fr; gap: 10px; }

/* Monospace */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}
.preview { margin-top: 6px; font-size: 12px; color: var(--text); display: none; }
.preview b { font-weight: 900; }

/* Date field */
.date-ui { display: grid; grid-template-columns: 1fr 42px; gap: 10px; align-items: center; }
.cal-btn {
  width: 42px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff; cursor: pointer;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cal-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,168,83,.18);
  border-color: var(--gold);
}
.date-hidden {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ============================================================
   Role Selection
   ============================================================ */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.role {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  transition: all .15s ease;
  min-height: 96px;
}
.role:hover {
  border-color: #c9b9a8;
  box-shadow: 0 10px 20px rgba(44,24,16,.06);
}
.role.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,69,19,.1);
}
.role h3 {
  margin: 0 0 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--espresso);
}
.role p {
  margin: 0;
  color: var(--muted); font-size: 12px;
}

/* Badges */
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px; font-weight: 700;
  margin-left: 6px;
}
.badge-paying {
  background: rgba(212,168,83,.15);
  border: 1px solid rgba(212,168,83,.3);
  color: var(--accent);
}
.badge-pioneer {
  background: rgba(122,139,110,.12);
  border: 1px solid rgba(122,139,110,.25);
  color: var(--sage);
}

/* ============================================================
   Two-Column Layout (Horse step, Billing step)
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }

.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(44,24,16,.05);
}
.panel h2 {
  margin: 0 0 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--espresso);
}
.panel .sub { margin: 0 0 10px; color: var(--muted); font-size: 12px; }

/* "Other" field wrapper */
.other-wrap { display: none; margin-top: 8px; }
.other-wrap.open { display: block; }

/* Horse list items */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
}
.item strong { font-size: 12px; color: var(--espresso); }
.item .meta  { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.item button {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700; font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.item button:hover {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   Billing — Toggle, Plans, Add-ons
   ============================================================ */
.toggle {
  display: flex; gap: 8px;
  background: rgba(44,24,16,.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  align-items: center;
  width: fit-content;
}
.toggle button {
  border: none; background: transparent;
  cursor: pointer; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  color: var(--muted);
  font-family: inherit; font-size: 13px;
  transition: all .2s ease;
}
.toggle button.active {
  background: var(--espresso);
  color: #fff;
}

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.plan-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  transition: all .15s ease;
  min-height: 140px;
}
.plan-card:hover {
  border-color: #c9b9a8;
  box-shadow: 0 12px 26px rgba(44,24,16,.08);
}
.plan-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,69,19,.1);
}
.plan-title {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px;
}
.plan-title h3 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--espresso);
}
.pill {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff; color: var(--muted);
  white-space: nowrap;
}
.price {
  margin-top: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--espresso);
}
.price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.features {
  margin: 10px 0 0 0; padding-left: 16px;
  color: var(--text); font-size: 12px; line-height: 1.5;
}
.features li { margin: 6px 0; }

.addons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.addon {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.addon .top {
  display: flex; justify-content: space-between; align-items: center;
}
.addon .top strong { font-size: 12px; color: var(--espresso); }

.stepper-mini { display: flex; align-items: center; gap: 8px; }
.stepper-mini button {
  width: 28px; height: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff; cursor: pointer;
  font-weight: 900; font-family: inherit;
  color: var(--text);
  transition: all .15s ease;
}
.stepper-mini button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.stepper-mini span {
  min-width: 18px; text-align: center; font-weight: 900;
}

/* Order summary */
.summary-row {
  display: flex; justify-content: space-between;
  gap: 12px; margin: 8px 0; font-size: 12px;
}
.summary-row strong { font-weight: 800; color: var(--espresso); }

.total {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: baseline;
}
.total .amt {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--espresso);
}

.secure {
  margin-top: 10px;
  border: 1px solid rgba(212,168,83,.25);
  background: rgba(212,168,83,.08);
  border-radius: 12px;
  padding: 10px;
  font-size: 12px; color: var(--text); line-height: 1.35;
}
.secure b { font-weight: 800; }

/* ============================================================
   Buttons & Actions
   ============================================================ */
.actions {
  display: flex; gap: 10px;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(250,247,242,.8);
  border-top: 1px solid var(--border);
}
.two { display: flex; gap: 10px; width: 100%; }

.btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  font-weight: 700; font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  color: var(--accent);
  transition: all .2s ease;
}
.btn:hover { background: rgba(139,69,19,.05); }

.btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: 1px solid var(--gold);
  color: var(--espresso);
  box-shadow: 0 4px 12px rgba(212,168,83,.3);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212,168,83,.4);
}
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.ghost-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700; font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Info / empty box */
.box {
  border: 1px dashed #c9b9a8;
  border-radius: 14px;
  padding: 14px;
  background: rgba(250,247,242,.5);
}
.box h4 {
  margin: 0 0 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--espresso);
}
.box p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ============================================================
   Auth Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(44,24,16,.18);
  z-index: 80;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  width: min(560px, 96vw);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,254,252,.97);
  box-shadow: 0 22px 60px rgba(44,24,16,.18);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #F5EDE4, var(--card));
}
.modal-head strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--espresso);
}
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff; cursor: pointer;
  font-size: 18px; line-height: 34px;
  text-align: center; user-select: none;
  color: var(--muted);
  transition: all .2s ease;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-body { padding: 16px; }
.modal-actions {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(250,247,242,.8);
}

/* Auth tabs */
.tabs {
  display: flex; gap: 8px;
  background: rgba(44,24,16,.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
  margin-bottom: 12px;
}
.tabs button {
  border: none; background: transparent;
  cursor: pointer; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  color: var(--muted);
  font-family: inherit; font-size: 13px;
  transition: all .2s ease;
}
.tabs button.active {
  background: var(--espresso);
  color: #fff;
}

.toast { margin-top: 10px; font-size: 12px; display: none; }
.toast.ok  { color: var(--ok); }
.toast.err { color: var(--err); }

/* ============================================================
   Menu Overlay
   ============================================================ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(250,247,242,.15);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 24px;
  z-index: 50;
}
.overlay.open { display: flex; }

.menu-panel {
  width: min(420px, 92vw);
  height: min(720px, 88vh);
  border: 2px solid var(--espresso);
  border-radius: 26px;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(44,24,16,.15);
  position: relative;
  padding: 20px 20px 30px;
}
.menu-top {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 10px;
}
.menu-top .title {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700; color: var(--espresso);
}
.menu-top .close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff; cursor: pointer;
  font-size: 18px; line-height: 34px;
  text-align: center; user-select: none;
  color: var(--muted);
}
.menu-links { margin-top: 8px; text-align: right; padding-right: 6px; }
.menu-links a {
  display: block; text-decoration: none;
  color: var(--espresso);
  font-weight: 700; font-size: 20px;
  padding: 6px 0;
  transition: color .2s ease;
}
.menu-links a:hover { color: var(--accent); }
.menu-links a.active { color: var(--gold); }

/* Menu button (mobile) */
.menu-btn {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-weight: 600; font-size: 13px;
  color: var(--muted);
  background: none; border: none; font-family: inherit;
}
.burger { width: 16px; height: 12px; position: relative; }
.burger span {
  position: absolute; left: 0; right: 0;
  height: 2px; background: var(--muted); border-radius: 2px;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 5px; }
.burger span:nth-child(3) { top: 10px; }

/* ============================================================
   Footer
   ============================================================ */
.reg-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(250,247,242,.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.reg-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.reg-footer a:hover { text-decoration: underline; }

/* ============================================================
   Responsive (< 760px)
   ============================================================ */
@media (max-width: 760px) {
  .role-grid       { grid-template-columns: 1fr; }
  .row             { grid-template-columns: 1fr; }
  .phone-group     { grid-template-columns: 1fr; }
  .two-col         { grid-template-columns: 1fr; }
  .plan-grid       { grid-template-columns: 1fr; }
  .addons          { grid-template-columns: 1fr; }
  .date-ui         { grid-template-columns: 1fr 42px; }
}
