/* ── Antvic Site Induction Form — form.css ─────────────────────────
   Mobile-first. Full-width on all viewports.
   Scoped to .anvic-induction-wrap to avoid WP theme conflicts.
──────────────────────────────────────────────────────────────────── */

/* ── Full-width reset: override any WP theme container constraints ── */
.anvic-induction-wrap,
.anvic-induction-wrap *,
.anvic-induction-wrap *::before,
.anvic-induction-wrap *::after {
  box-sizing: border-box;
}

/* Force the shortcode container to break out of WP's narrow content column */
.anvic-induction-wrap {
  --orange:       #E8632A;
  --orange-dim:   #c4501f;
  --orange-light: #fdf1eb;
  --orange-mid:   #f5ccb4;
  --navy:         #1B2A4A;
  --text:         #1a2236;
  --text-mid:     #4a5568;
  --text-muted:   #7a8699;
  --border:       #dde3ee;
  --bg:           #ffffff;
  --bg-section:   #f8f9fc;
  --success:      #1a9e5c;
  --success-bg:   #eafaf2;
  --error:        #d63b22;
  --error-bg:     #fdf0ee;

  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Barlow', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* ── Page title band removed — title/hero now provided by the theme
      template (page-site-induction.php). ─────────────────────────── */

/* ── Inner content wrapper ──────────────────────────────────────── */
.anvic-form-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  width: 100%;
}

/* ── Form header removed — title lives in theme header ── */

/* ── Progress bar ───────────────────────────────────────────────── */
.anvic-progress-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  margin-bottom: 20px;
  overflow: hidden;
  width: 100%;
}
.anvic-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, #f0893a 100%);
  border-radius: 99px;
  transition: width .4s ease;
  width: 0%;
}

/* ── Section cards ──────────────────────────────────────────────── */
.anvic-section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(27,42,74,.05);
  width: 100%;
}
.anvic-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.anvic-section-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: .1em;
  background: var(--orange-light);
  border: 1px solid var(--orange-mid);
  padding: 2px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.anvic-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
}
.anvic-section-body { padding: 18px 20px; }

/* ── Form grid — 2-col desktop, 1-col mobile ────────────────────── */
.anvic-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}
.anvic-form-grid .full { grid-column: 1 / -1; }
.anvic-field { display: flex; flex-direction: column; gap: 5px; }

/* ── Labels ─────────────────────────────────────────────────────── */
.anvic-induction-wrap label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-mid);
  display: block;
  margin-bottom: 0;
}
.anvic-induction-wrap label .req { color: var(--orange); margin-left: 2px; }

/* ── Inputs ─────────────────────────────────────────────────────── */
.anvic-induction-wrap input[type=text],
.anvic-induction-wrap input[type=email],
.anvic-induction-wrap input[type=tel],
.anvic-induction-wrap input[type=date],
.anvic-induction-wrap select,
.anvic-induction-wrap textarea {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 1rem;       /* ≥16px prevents iOS zoom */
  padding: 10px 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.anvic-induction-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8699' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.anvic-induction-wrap input:focus,
.anvic-induction-wrap select:focus,
.anvic-induction-wrap textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,99,42,.12);
}
.anvic-induction-wrap textarea { resize: vertical; min-height: 80px; }

/* ── Checkboxes ─────────────────────────────────────────────────── */
.anvic-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.anvic-induction-wrap .anvic-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg-section);
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.anvic-check-item:hover { background: var(--orange-light); border-color: var(--orange-mid); }
.anvic-check-item input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transform: translateY(-1px);
  border: none; padding: 0; margin: 0;
}
.anvic-check-item span { font-size: .78rem; color: var(--text-mid); line-height: 1.2; letter-spacing: .02em; }

/* ── Radio ──────────────────────────────────────────────────────── */
.anvic-radio-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.anvic-induction-wrap .anvic-radio-item { display: flex; align-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.anvic-radio-item input[type=radio] {
  width: 18px; height: 18px;
  accent-color: var(--orange);
  cursor: pointer; flex-shrink: 0; align-self: center;
  transform: translateY(-1px);
}
.anvic-radio-item span { font-size: .82rem; color: var(--text-mid); line-height: 1.2; letter-spacing: .02em; }

/* ── File upload ────────────────────────────────────────────────── */
.anvic-file-drop {
  border: 2px dashed var(--orange-mid);
  border-radius: 6px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--orange-light);
  position: relative;
  width: 100%;
}
.anvic-file-drop:hover, .anvic-file-drop.drag-over { border-color: var(--orange); background: #fce8de; }
.anvic-file-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; font-size: 0;
}
.anvic-file-drop-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.anvic-file-drop p { font-size: .85rem; color: var(--text-muted); }
.anvic-file-drop strong { color: var(--orange); }
.anvic-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.anvic-file-tag {
  display: flex; align-items: center; gap: 8px;
  background: var(--orange-light); border: 1px solid var(--orange-mid);
  border-radius: 4px; padding: 7px 12px; font-size: .82rem;
  color: var(--text-mid); flex-wrap: wrap; width: 100%;
}
.anvic-file-tag .anvic-remove {
  margin-left: auto; cursor: pointer; background: none; border: none;
  color: var(--error); font-size: 1.1rem; line-height: 1; padding: 0 4px; flex-shrink: 0;
}

/* ── Signature ──────────────────────────────────────────────────── */
.anvic-sig-wrap { position: relative; width: 100%; }
#anvicSigCanvas {
  display: block; width: 100%; height: 150px;
  background: var(--bg-section);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: crosshair;
  touch-action: none;
}
.anvic-sig-placeholder {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: .82rem; color: var(--text-muted);
  pointer-events: none; transition: opacity .3s;
  text-align: center; width: 100%;
}
.anvic-sig-actions { display: flex; gap: 10px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.anvic-btn-clear {
  background: none; border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: 'Barlow', Arial, sans-serif; font-size: .8rem;
  padding: 6px 14px; border-radius: 3px;
  cursor: pointer; transition: all .2s;
}
.anvic-btn-clear:hover { border-color: var(--orange); color: var(--orange); }
.anvic-sig-hint { font-size: .75rem; color: var(--text-muted); margin-left: auto; }

/* ── Declaration box ────────────────────────────────────────────── */
.anvic-declaration-box {
  background: var(--orange-light);
  border: 1px solid var(--orange-mid);
  border-left: 4px solid var(--orange);
  border-radius: 4px;
  padding: 14px 18px;
  font-size: .86rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 16px;
  width: 100%;
}
.anvic-declaration-box strong { color: var(--navy); }

/* ── Submit row ─────────────────────────────────────────────────── */
.anvic-submit-row {
  display: flex; align-items: center;
  gap: 20px; margin-top: 24px; flex-wrap: wrap;
  width: 100%;
}
.anvic-btn-submit {
  background: var(--orange); color: #fff; border: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 36px; border-radius: 4px;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  min-width: 200px; text-align: center;
}
.anvic-btn-submit:hover {
  background: var(--orange-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,99,42,.25);
}
.anvic-btn-submit:active { transform: none; box-shadow: none; }
.anvic-btn-submit:disabled { background: #b0bac9; cursor: not-allowed; transform: none; box-shadow: none; }
.anvic-submit-note { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }

/* ── Status messages ────────────────────────────────────────────── */
.anvic-status {
  display: none; margin-top: 16px;
  padding: 14px 18px; border-radius: 4px;
  font-size: .9rem; font-weight: 500; line-height: 1.6;
  width: 100%;
}
.anvic-status.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid #a3dfc0;
  border-left: 4px solid var(--success);
  color: var(--success);
}
.anvic-status.error {
  display: block;
  background: var(--error-bg);
  border: 1px solid #f0b8ae;
  border-left: 4px solid var(--error);
  color: var(--error);
}

/* ── Validation states ──────────────────────────────────────────── */
.anvic-induction-wrap input.anvic-invalid,
.anvic-induction-wrap select.anvic-invalid,
.anvic-induction-wrap textarea.anvic-invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(214,59,34,.1) !important;
}
.anvic-err-msg { font-size: .73rem; color: var(--error); margin-top: 3px; }

/* Footer removed — the site footer is provided by the theme. */

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

/* ═══════════════════════════════════════════════════════════════════
   MOBILE — full-width, single-column
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .anvic-form-inner { padding: 16px 12px 48px; }

  .anvic-form-grid  { grid-template-columns: 1fr; }
  .anvic-check-grid { grid-template-columns: 1fr; }

  .anvic-section-body   { padding: 14px 12px; }
  .anvic-section-header { padding: 10px 12px; }

  .anvic-submit-row { flex-direction: column; align-items: stretch; }
  .anvic-btn-submit { width: 100%; min-width: unset; padding: 15px; }
  .anvic-submit-note { text-align: center; }

  .anvic-sig-actions { flex-direction: column; align-items: flex-start; }
  .anvic-sig-hint { margin-left: 0; }
  #anvicSigCanvas { height: 130px; }

  /* Prevent iOS input zoom (font-size must be ≥ 16px) */
  .anvic-induction-wrap input[type=text],
  .anvic-induction-wrap input[type=email],
  .anvic-induction-wrap input[type=tel],
  .anvic-induction-wrap input[type=date],
  .anvic-induction-wrap select,
  .anvic-induction-wrap textarea { font-size: 16px; }
}

/* ── Unified input height — ALL fields same size ─────────────────── */
.anvic-induction-wrap input[type=text],
.anvic-induction-wrap input[type=email],
.anvic-induction-wrap input[type=tel],
.anvic-induction-wrap input[type=date] {
  height: 46px;
  padding: 0 14px;
  line-height: 46px;
  font-size: 15px;
}
.anvic-induction-wrap textarea {
  height: auto;
  min-height: 80px;
  padding: 12px 14px;
  line-height: 1.5;
  font-size: 15px;
}
/* Date fields styled same as text */
.anvic-induction-wrap .anvic-date-field {
  font-size: 15px;
  letter-spacing: .04em;
}
/* Select — explicit height + vertical padding so text is never clipped */
.anvic-induction-wrap select {
  height: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.4;
  font-size: 15px;
  display: block;
}

@media (max-width: 768px) {
  .anvic-induction-wrap input[type=text],
  .anvic-induction-wrap input[type=email],
  .anvic-induction-wrap input[type=tel],
  .anvic-induction-wrap input[type=date],
  .anvic-induction-wrap select { font-size: 16px; height: 48px; }
}

