/* MoveMe Health - Form Styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #4ECDC4;
  --teal-dark: #3db8b0;
  --teal-light: rgba(78, 205, 196, 0.08);
  --teal-glow: rgba(78, 205, 196, 0.15);
  --grey-dark: #555;
  --grey-text: #333;
  --grey-sub: #888;
  --red: #e74c3c;
  --border: #ddd;
  --border-light: #e8e8e8;
  --bg: #f5f7fa;
  --white: #fff;
  --radius: 8px;
  --radius-lg: 12px;
}

.moveme-referral {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--grey-text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

/* ── Container ── */
.form-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  max-width: 640px;
  width: 100%;
  overflow: hidden;
}

/* ── Header ── */
.form-header {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.form-header .close-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.form-header .close-btn:hover { opacity: 1; }

/* ── Progress ── */
.progress-bar {
  height: 4px;
  background: #e8e8e8;
}
.progress-bar .fill {
  height: 100%;
  background: var(--teal);
  transition: width 0.4s ease;
}

.step-indicator {
  text-align: center;
  padding: 12px;
  font-size: 13px;
  color: var(--grey-sub);
}

/* ── Body ── */
.form-body { padding: 24px 32px 32px; }

/* ── Slides ── */
.slide { display: none; }
.slide.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Fields ── */
.field-group { margin-bottom: 24px; }

.field-group label,
.field-group .field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--grey-text);
}

.field-label .required { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

textarea { resize: vertical; min-height: 80px; }

/* ── Radio / Checkbox ── */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-group.inline, .checkbox-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.radio-option:hover, .checkbox-option:hover {
  border-color: var(--teal);
  background: rgba(78, 205, 196, 0.04);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.radio-option.selected, .checkbox-option.selected {
  border-color: var(--teal);
  background: var(--teal-light);
}

.inline .radio-option,
.inline .checkbox-option {
  flex: 0 0 auto;
}

/* ── Section heading ── */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--grey-text);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
}
.section-heading:first-child { margin-top: 0; }

.section-subtext {
  color: var(--teal);
  font-size: 13px;
  margin-bottom: 20px;
}

/* ── Layout ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
  .form-body { padding: 20px 20px 28px; }
  .form-header { padding: 20px; }
}

/* ── Buttons ── */
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.btn {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-next, .btn-submit {
  background: var(--teal);
  color: var(--white);
  margin-left: auto;
}
.btn-next:hover, .btn-submit:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.btn-prev {
  background: var(--grey-dark);
  color: var(--white);
}
.btn-prev:hover { background: #444; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Validation ── */
.error-msg {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.field-group.error .error-msg { display: block; }
.field-group.error input,
.field-group.error textarea,
.field-group.error select { border-color: var(--red); }

/* ── File upload ── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.file-upload-area:hover {
  border-color: var(--teal);
  background: rgba(78, 205, 196, 0.04);
}
.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload-area .upload-text { color: var(--grey-sub); font-size: 14px; }
.file-upload-area .file-name { color: var(--teal); font-weight: 600; margin-top: 8px; }

/* ── Thank you ── */
.thank-you {
  text-align: center;
  padding: 60px 32px;
}
.thank-you .logo {
  font-size: 36px;
  font-weight: 300;
  color: var(--teal);
  margin-bottom: 24px;
}
.thank-you .logo strong { font-weight: 700; }
.thank-you p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }


/* Inlined from the standalone form's <style> block. */
    /* Info block styling for funding information */
    .info-block { background: var(--teal-light); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; }
    .info-block h3 { font-size: 16px; font-weight: 700; color: var(--grey-text); margin-bottom: 12px; }
    .info-block h4 { font-size: 14px; font-weight: 700; color: var(--teal-dark); margin: 16px 0 8px; }
    .info-block p { font-size: 14px; line-height: 1.6; color: var(--grey-dark); margin-bottom: 8px; }
    .info-block ul { margin: 8px 0 12px 20px; font-size: 14px; line-height: 1.6; color: var(--grey-dark); }
    .info-block li { margin-bottom: 4px; }
    .info-block strong { color: var(--red); }