/* ============================================================
   Rising Star Pediatrics — Authorization Form Styles
   Brand: Navy #003087  |  Orange #f47920  |  Gold star #FFB300
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ── Reset & wrapper ─────────────────────────────────────── */
.rsp-form-wrap *,
.rsp-form-wrap *::before,
.rsp-form-wrap *::after {
  box-sizing: border-box;
}

.rsp-form-wrap {
  max-width: 780px;
  margin: 32px auto;
  font-family: 'Nunito', sans-serif;
  color: #1a1a2e;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,48,135,.13), 0 2px 8px rgba(0,0,0,.07);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────── */
.rsp-form-header {
  background: linear-gradient(135deg, #002470 0%, #003087 60%, #004dcc 100%);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
}
.rsp-form-header::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(244,121,32,.25) 0%, transparent 70%);
  border-radius: 50%;
}
.rsp-logo {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.rsp-header-text {
  position: relative;
  z-index: 1;
}
.rsp-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 5px;
}
.rsp-header-text p {
  font-size: .82rem;
  color: rgba(255,255,255,.72);
  margin: 0;
  letter-spacing: .3px;
}

/* ── Progress bar ────────────────────────────────────────── */
.rsp-progress-wrap {
  height: 5px;
  background: #e8edf5;
}
.rsp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f47920, #FFB300);
  transition: width .45s cubic-bezier(.4,0,.2,1);
}
.rsp-steps-labels {
  display: flex;
  justify-content: space-between;
  padding: 8px 36px 0;
  background: #f8fafd;
  border-bottom: 1px solid #e4eaf4;
}
.rsp-step-label {
  font-size: .7rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 8px;
  cursor: default;
  transition: color .3s;
}
.rsp-step-label.active {
  color: #003087;
  border-bottom: 2px solid #f47920;
}

/* ── Step panels ─────────────────────────────────────────── */
.rsp-step {
  padding: 30px 36px 24px;
  animation: rspFadeIn .35s ease;
}
@keyframes rspFadeIn {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

.rsp-section-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #f47920;
  background: #fff5ed;
  border: 1px solid #f9cba0;
  border-radius: 20px;
  padding: 3px 11px;
  margin-bottom: 10px;
}
.rsp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #003087;
  margin: 0 0 6px;
}
.rsp-sub-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #555;
  margin: 0 0 6px;
}
.rsp-hint {
  font-size: .875rem;
  color: #718096;
  margin: 0 0 18px;
}

/* ── Grid layouts ────────────────────────────────────────── */
.rsp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.rsp-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .rsp-grid-2, .rsp-grid-3 { grid-template-columns: 1fr; }
  .rsp-form-header { flex-direction: column; text-align: center; padding: 20px; }
  .rsp-steps-labels { display: none; }
  .rsp-step { padding: 24px 20px; }
}

/* ── Fields ──────────────────────────────────────────────── */
.rsp-field { display: flex; flex-direction: column; }
.rsp-field-full { margin-bottom: 16px; }

.rsp-field label {
  font-size: .8rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 5px;
  letter-spacing: .2px;
}
.rsp-req { color: #e53e3e; margin-left: 2px; }
.rsp-opt { font-weight: 400; color: #a0aec0; font-size: .75rem; }

.rsp-field input[type="text"],
.rsp-field input[type="email"],
.rsp-field input[type="tel"],
.rsp-field input[type="date"],
.rsp-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1dae8;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  color: #1a1a2e;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.rsp-field input:focus,
.rsp-field textarea:focus {
  border-color: #003087;
  box-shadow: 0 0 0 3px rgba(0,48,135,.1);
}
.rsp-field input.rsp-error-field,
.rsp-field textarea.rsp-error-field {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,.1);
}
.rsp-sig-input {
  font-size: 1.15rem !important;
  font-style: italic;
  color: #003087 !important;
  letter-spacing: .5px;
}

/* ── Checkboxes ──────────────────────────────────────────── */
.rsp-check-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.rsp-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  border: 1.5px solid #d1dae8;
  border-radius: 9px;
  background: #fafbfd;
  transition: border-color .2s, background .2s;
}
.rsp-check-label:hover { border-color: #003087; background: #f0f4ff; }
.rsp-check-label input[type="checkbox"] { display: none; }
.rsp-checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #c8d4e8;
  border-radius: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
  margin-top: 2px;
}
.rsp-check-label input:checked ~ .rsp-checkmark {
  background: #003087;
  border-color: #003087;
}
.rsp-check-label input:checked ~ .rsp-checkmark::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}
.rsp-check-label input:checked ~ div strong { color: #003087; }
.rsp-check-label > div { flex: 1; line-height: 1.4; }
.rsp-check-label > div strong { font-size: .95rem; }
.rsp-check-label > div small { font-size: .8rem; color: #718096; }

/* ── Radio buttons ───────────────────────────────────────── */
.rsp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.rsp-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  border: 1.5px solid #d1dae8;
  border-radius: 9px;
  background: #fafbfd;
  transition: border-color .2s, background .2s;
}
.rsp-radio-label:hover { border-color: #003087; background: #f0f4ff; }
.rsp-radio-label input[type="radio"] { display: none; }
.rsp-radiomark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #c8d4e8;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
  margin-top: 2px;
}
.rsp-radio-label input:checked ~ .rsp-radiomark {
  border-color: #003087;
}
.rsp-radio-label input:checked ~ .rsp-radiomark::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #003087;
  border-radius: 50%;
  display: block;
}
.rsp-radio-label input:checked ~ div strong { color: #003087; }
.rsp-radio-label > div { flex: 1; }
.rsp-radio-label > div strong { font-size: .95rem; }
.rsp-radio-label > div small { font-size: .8rem; color: #718096; }

/* ── Divider ─────────────────────────────────────────────── */
.rsp-divider {
  height: 1px;
  background: #e4eaf4;
  margin: 16px 0;
}

/* ── Info / Recipient boxes ──────────────────────────────── */
.rsp-recipient-box {
  background: #eef3ff;
  border: 1.5px solid #b0c0f0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #003087;
  font-weight: 700;
  font-size: .95rem;
  margin-top: 16px;
}
.rsp-recipient-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #7090c8;
  margin-bottom: 4px;
}
.rsp-info-box {
  background: #fffaf5;
  border: 1.5px solid #f9d6b0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: .9rem;
  color: #5a3a00;
  line-height: 1.65;
}
.rsp-ack-box {
  background: #f7faff;
  border: 1.5px solid #c5d5f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.rsp-ack-box p {
  font-size: .875rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 8px;
}
.rsp-ack-box p:last-child { margin-bottom: 0; }

/* ── Review summary ──────────────────────────────────────── */
.rsp-review-summary {
  background: #f8fafd;
  border: 1.5px solid #dde6f5;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
  font-size: .88rem;
  line-height: 1.7;
}
.rsp-review-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #edf1f9;
}
.rsp-review-row:last-child { border-bottom: none; }
.rsp-review-label {
  font-weight: 700;
  color: #003087;
  min-width: 160px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.rsp-review-value { color: #2d3748; }

/* ── Submit notice ───────────────────────────────────────── */
.rsp-submit-notice {
  font-size: .82rem;
  color: #718096;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Navigation buttons ──────────────────────────────────── */
.rsp-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}
.rsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s;
  letter-spacing: .2px;
}
.rsp-btn-next,
.rsp-btn-submit {
  background: linear-gradient(135deg, #003087, #0050cc);
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,48,135,.3);
}
.rsp-btn-next:hover,
.rsp-btn-submit:hover {
  background: linear-gradient(135deg, #002470, #003db5);
  box-shadow: 0 5px 16px rgba(0,48,135,.4);
  transform: translateY(-1px);
}
.rsp-btn-back {
  background: #f0f4ff;
  color: #003087;
  border: 1.5px solid #c5d5f0;
}
.rsp-btn-back:hover {
  background: #e0eaff;
}
.rsp-btn-submit {
  background: linear-gradient(135deg, #f47920, #e06000);
  box-shadow: 0 3px 12px rgba(244,121,32,.35);
  min-width: 180px;
  justify-content: center;
}
.rsp-btn-submit:hover {
  background: linear-gradient(135deg, #e06000, #c85400);
  box-shadow: 0 5px 16px rgba(244,121,32,.45);
}
.rsp-btn-download {
  background: linear-gradient(135deg, #003087, #0050cc);
  color: #fff;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0,48,135,.3);
  text-decoration: none;
  display: inline-block;
  margin-top: 12px;
}
.rsp-btn-download:hover {
  background: linear-gradient(135deg, #002470, #003db5);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Success message ─────────────────────────────────────── */
.rsp-success {
  padding: 48px 36px;
  text-align: center;
}
.rsp-success-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #38a169, #2f855a);
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(56,161,105,.3);
  animation: rspPop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rspPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.rsp-success h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #003087;
  margin-bottom: 10px;
}
.rsp-success p {
  font-size: .95rem;
  color: #4a5568;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Error message ───────────────────────────────────────── */
.rsp-error {
  background: #fff5f5;
  border: 1.5px solid #fc8181;
  color: #c53030;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: .875rem;
  margin-top: 12px;
}

/* ── Footer strip ────────────────────────────────────────── */
.rsp-form-wrap::after {
  content: 'HIPAA-Compliant Form · Rising Star Pediatrics · rspeds.com';
  display: block;
  text-align: center;
  font-size: .72rem;
  color: #a0aec0;
  padding: 12px;
  border-top: 1px solid #edf1f9;
  background: #f8fafd;
  letter-spacing: .3px;
}

/* ── Success screen ──────────────────────────────────────── */
.rsp-success-sub {
  font-size: .95rem;
  color: #4a5568;
  margin: 4px 0 18px;
}

/* ── Print-to-PDF instructions panel ────────────────────── */
.rsp-print-panel {
  margin-top: 24px;
  border: 1.5px solid #cdd5e8;
  border-radius: 10px;
  background: #f7f9fd;
  overflow: hidden;
  text-align: left;
}

.rsp-print-panel-title {
  background: linear-gradient(135deg, #003087 0%, #004bb5 100%);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 11px 18px;
}

.rsp-print-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.rsp-print-col {
  padding: 18px 20px;
}

.rsp-print-col:first-child {
  border-right: 1px solid #dde5f3;
}

.rsp-print-col-head {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #003087;
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 2px solid #f47920;
}

.rsp-print-intro {
  font-size: .82rem;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.55;
}

.rsp-print-steps {
  padding-left: 18px;
  margin-bottom: 12px;
}

.rsp-print-steps li {
  font-size: .83rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 5px;
}

.rsp-print-steps li strong {
  color: #003087;
}

.rsp-print-tip {
  font-size: .78rem;
  color: #777;
  background: #eef2fb;
  border-left: 3px solid #f47920;
  padding: 8px 10px;
  border-radius: 0 4px 4px 0;
  line-height: 1.55;
}

.rsp-print-tip strong {
  color: #003087;
}

/* Collapse to single column on small screens */
@media (max-width: 600px) {
  .rsp-print-columns {
    grid-template-columns: 1fr;
  }
  .rsp-print-col:first-child {
    border-right: none;
    border-bottom: 1px solid #dde5f3;
  }
}
