/* ============================================================
   Remote Programming Request — Form Styles
   Mobile-first, fully responsive
   ============================================================ */

:root {
  --bg:      #ffffff;
  --bg2:     #f5f5f5;
  --bg3:     #fafafa;
  --border:  #e0e0e0;
  --border2: #d0d0d0;
  --text:    #333333;
  --dim:     #666666;
  --lo:      #999999;
  --orange:  #ff9800;
  --red:     #f44336;
  --yellow:  #ffc107;
  --green:   #4caf50;
  --blue:    #2196f3;
}

#rpr-wrap {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.65;
  color: var(--text);
  max-width: 100%;
  box-sizing: border-box;
}
#rpr-wrap *, #rpr-wrap *::before, #rpr-wrap *::after { box-sizing: border-box; }

/* HEADER */
.rpr-form-header {
  background: var(--bg2);
  border-bottom: 2px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rpr-form-header .header-logo { height: 40px; width: auto; flex-shrink: 0; }
.rpr-form-header h1 { font-size: clamp(20px, 2.8vw, 28px); font-weight: 700; color: #222; margin: 0; }
@media (min-width: 600px) {
  .rpr-form-header { padding: 18px 24px; }
  .rpr-form-header .header-logo { height: 50px; }
  .rpr-form-header h1 { font-size: clamp(22px, 3vw, 30px); }
}

/* PROGRESS TABS */
.progress-wrap { background: var(--bg2); border-bottom: 2px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.progress-steps { display: flex; min-width: max-content; }
.step-tab { flex-shrink: 0; padding: 10px 8px; font-size: clamp(11px, 1.4vw, 14px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lo); border-bottom: 3px solid transparent; white-space: nowrap; cursor: default; transition: all .2s; }
.step-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.step-tab.done   { color: var(--green); border-bottom-color: var(--green); }
.step-num { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--border); color: var(--lo); font-size: 10px; line-height: 18px; text-align: center; margin-right: 4px; transition: all .2s; }
.step-tab.active .step-num { background: var(--blue); color: #fff; }
.step-tab.done .step-num { background: var(--green); color: #fff; }
@media (min-width: 600px) {
  .step-tab { font-size: clamp(13px, 1.6vw, 16px); padding: 12px 14px; }
  .step-num { width: 20px; height: 20px; font-size: 11px; line-height: 20px; }
}

/* FORM BODY */
.form-body { padding: 16px 14px 60px; }
@media (min-width: 600px) { .form-body { padding: 24px 24px 80px; } }
@media (min-width: 900px) { .form-body { max-width: 860px; margin: 0 auto; padding: 28px 0 80px; } }

/* SECTIONS */
.form-section { display: none; }
.form-section.active { display: block; animation: rprFadeIn .25s ease; }
@keyframes rprFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.sec-head { margin-bottom: 6px; }
.sec-label { font-size: clamp(18px, 2.5vw, 26px); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.sec-hint { font-size: clamp(16px, 2vw, 20px); color: var(--dim); font-style: italic; margin-bottom: 16px; }
@media (min-width: 600px) {
  .sec-label { font-size: clamp(20px, 2.8vw, 26px); }
  .sec-hint { font-size: clamp(17px, 2.2vw, 21px); }
}

/* PANELS */
.panel { background: var(--bg3); border: 2px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
@media (min-width: 600px) { .panel { padding: 20px 22px; } }
.panel-label { font-size: clamp(14px, 1.8vw, 18px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }


/* FIELD ROWS */
.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.field-row:last-child { margin-bottom: 0; }
@media (min-width: 600px) { .field-row:not(.single) { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: clamp(14px, 1.8vw, 18px); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.field label .req { color: var(--orange); margin-left: 2px; }


/* INPUTS */
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  background: var(--bg3);
  border: 2px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  padding: 14px 15px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
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 fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); background: #fff; outline: none; }
textarea { resize: vertical; min-height: 100px; }

/* CHIPS */
.chip-grid { display: flex; flex-direction: column; gap: 10px; }
.chip-grid.two-col { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 500px) { .chip-grid.two-col { grid-template-columns: 1fr 1fr; } }
.choice-chip { position: relative; cursor: pointer; display: block; }
.choice-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg3);
  border: 2px solid var(--border2);
  border-radius: 6px;
  padding: 14px 16px;
  transition: border-color .15s, background .15s;
  cursor: pointer;
  user-select: none;
  min-height: 58px;
}
.choice-chip:active .chip-inner { background: #f0f8ff; }
.choice-chip input:checked ~ .chip-inner { border-color: var(--blue); background: #e3f2fd; }
.chip-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border2);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  transition: all .15s;
}
.choice-chip input[type="radio"] ~ .chip-inner .chip-check { border-radius: 50%; }
.choice-chip input:checked ~ .chip-inner .chip-check { background: var(--blue); border-color: var(--blue); }
.choice-chip input:checked ~ .chip-inner .chip-check::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 800; }
.chip-text strong { display: block; font-size: clamp(18px, 2.2vw, 22px); font-weight: 600; color: #222; line-height: 1.3; }
.chip-text span { font-size: clamp(16px, 2vw, 20px); color: var(--dim); line-height: 1.4; margin-top: 3px; display: block; }

/* ALERTS */
.alert { border-radius: 6px; padding: 13px 15px; margin-bottom: 14px; display: flex; gap: 11px; align-items: flex-start; }
.alert-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.alert-body strong { display: block; font-size: clamp(17px, 2.1vw, 22px); font-weight: 700; margin-bottom: 4px; }
.alert-body p { font-size: clamp(16px, 2vw, 20px); line-height: 1.5; color: var(--dim); margin: 0; }
.alert-info    { background: #e3f2fd; border: 1px solid #90caf9; }
.alert-info strong { color: #1565c0; }
.alert-orange  { background: #fff3e0; border: 1px solid #ffb74d; }
.alert-orange strong { color: #e65100; }
.alert-warn    { background: #fff8e1; border: 2px solid var(--yellow); }
.alert-warn strong { color: #f57f17; font-size: clamp(18px, 2.2vw, 22px); }
.alert-danger  { background: #ffebee; border: 1px solid #ef9a9a; }
.alert-danger strong { color: #c62828; }
.alert-success { background: #e8f5e9; border: 1px solid #a5d6a7; }
.alert-success strong { color: #2e7d32; }

/* ETHERNET IMAGE */
.ethernet-diagram { background: var(--bg2); border: 2px solid var(--border2); border-radius: 8px; padding: 14px; margin-bottom: 14px; text-align: center; }
.ethernet-img { width: 100%; max-width: 700px; height: auto; border-radius: 6px; display: block; margin: 0 auto; }
.ethernet-caption { font-size: clamp(16px, 2vw, 20px); color: var(--dim); margin: 12px 0 0; line-height: 1.5; }
@media (min-width: 600px) { .ethernet-caption { font-size: clamp(17px, 2.1vw, 21px); } }

/* VIN */
.vin-result { display: none; background: var(--bg2); border: 2px solid var(--border); border-radius: 6px; padding: 14px; margin-top: 12px; }
.vin-result.visible { display: block; }
.vin-confirmed-label { font-size: clamp(15px, 1.9vw, 19px); font-weight: 700; color: var(--green); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.vin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 500px) { .vin-grid { grid-template-columns: repeat(4, 1fr); } }
.vin-item label { font-size: clamp(13px, 1.6vw, 16px); text-transform: uppercase; letter-spacing: .07em; color: var(--lo); display: block; }
.vin-item .val { display: block; font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; color: #222; margin-top: 2px; }
.vin-input-row { display: flex; gap: 10px; align-items: stretch; }
.vin-input-row input { flex: 1; min-width: 0; }

/* MANUAL VIN */
.manual-vin-wrap { display: none; margin-top: 16px; padding: 16px; background: #fff8e1; border: 2px solid var(--yellow); border-radius: 6px; }
.manual-vin-wrap.visible { display: block; }
.manual-vin-title { font-size: clamp(14px, 1.8vw, 18px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f57f17; margin-bottom: 12px; }

/* EXPAND PANELS */
.expand-panel { display: none; margin-top: 10px; padding: 14px; background: #e3f2fd; border: 1px solid #90caf9; border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0; }
.expand-panel.visible { display: block; animation: rprFadeIn .2s ease; }
.expand-panel .expand-title { font-size: clamp(14px, 1.8vw, 18px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1565c0; margin-bottom: 12px; }

/* SERVICE PANELS */
.service-panel { display: none; margin-top: 12px; padding: 16px; background: var(--bg2); border: 2px solid var(--border); border-left: 3px solid var(--orange); border-radius: 0 6px 6px 0; }
.service-panel.visible { display: block; animation: rprFadeIn .2s ease; }
.service-panel .sp-title { font-size: clamp(14px, 1.8vw, 18px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #e65100; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* TERMS */
.terms-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--bg3); border: 2px solid var(--border2); border-radius: 6px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s; user-select: none; }
.terms-item:active { transform: scale(0.99); }
.terms-item.agreed { border-color: var(--green); background: #e8f5e9; }
.terms-check { width: 24px; height: 24px; border: 2px solid var(--border2); border-radius: 4px; flex-shrink: 0; margin-top: 3px; display: flex; align-items: center; justify-content: center; background: #fff; transition: all .15s; }
.terms-item.agreed .terms-check { background: var(--green); border-color: var(--green); }
.terms-item.agreed .terms-check::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 800; }
.terms-body strong { display: block; font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; color: #222; margin-bottom: 5px; }
.terms-body p { font-size: clamp(16px, 2vw, 20px); color: var(--dim); line-height: 1.5; margin: 0; }

/* BUTTONS */
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.btn {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: #1976d2; }
.btn-primary:active { background: #1565c0; transform: scale(0.98); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--bg3); color: var(--dim); border-color: var(--border2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-secondary:active { transform: scale(0.98); }

/* LOOKUP BUTTON */
.lookup-btn {
  background: var(--bg3);
  border: 2px solid var(--border2);
  border-radius: 6px;
  color: var(--blue);
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.lookup-btn:hover { border-color: var(--blue); background: #e3f2fd; }
.lookup-btn:active { transform: scale(0.98); }

/* STOP SCREEN */
.stop-screen { text-align: center; padding: 40px 14px; }
.stop-screen .stop-icon { font-size: 52px; margin-bottom: 14px; }
.stop-screen h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: var(--red); margin-bottom: 10px; }
.stop-screen p { font-size: clamp(17px, 2.1vw, 21px); color: var(--dim); max-width: 440px; margin: 0 auto; line-height: 1.6; }

/* SUCCESS */
.submit-success { display: none; text-align: center; padding: 50px 14px; }
.submit-success.visible { display: block; animation: rprFadeIn .3s ease; }
.submit-success .si { font-size: 60px; margin-bottom: 16px; }
.submit-success h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; color: var(--green); margin-bottom: 10px; }
.submit-success p { font-size: clamp(17px, 2.1vw, 21px); color: var(--dim); max-width: 460px; margin: 0 auto; line-height: 1.6; }
.submit-success .ref-box { display: inline-block; margin-top: 16px; background: var(--bg2); border: 2px solid var(--border); border-radius: 6px; padding: 12px 18px; font-size: clamp(16px, 2vw, 20px); color: var(--dim); }
.submit-success .ref-box strong { color: #222; }

hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
