/* ClaimDone Intake Wizard & Dashboard CSS */

/* ── Wizard container ── */
.cd-wizard {
  max-width: 760px;
  margin: 140px auto 80px;
  padding: 0 24px;
}
.cd-wizard__step { display: none; }
.cd-wizard__step.active { display: block; animation: fadeIn 0.3s ease; }

/* Service-specific field groups — hidden by default, shown by JS */
.cd-svc-fields, .cd-svc-field { display: none; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.cd-wizard__header { margin-bottom: 32px; }
.cd-wizard__progress {
  height: 4px;
  background: #eceaf6;
  border-radius: 9999px;
  margin-bottom: 12px;
  overflow: hidden;
}
.cd-wizard__bar {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 9999px;
  transition: width 0.5s ease;
}
.cd-wizard__step-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cd-wizard h2 {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}
.cd-wizard__sub {
  font-size: 16px;
  color: #475569;
  margin-bottom: 32px;
}

/* ── Service selection ── */
.cd-services-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.cd-service-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #0f172a;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.cd-service-option input[type=radio] { position: absolute; opacity: 0; }
.cd-service-option:hover { border-color: #7c3aed; background: #faf5ff; }
.cd-service-option.is-selected { border-color: #7c3aed; background: rgba(124,58,237,0.08); }
.cd-service-option__icon { font-size: 28px; margin-bottom: 8px; }
.cd-service-option__name { font-size: 16px; font-weight: 700; color: #0f172a; }
.cd-service-option__price { font-size: 13px; color: #7c3aed; font-weight: 600; }
.cd-service-option__desc { font-size: 13px; color: #475569; line-height: 1.5; margin-top: 4px; }

/* ── Form fields ── */
.cd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.cd-field { display: flex; flex-direction: column; gap: 8px; }
.cd-field--full { grid-column: 1 / -1; }
.cd-field label { font-size: 15px; font-weight: 600; color: #334155; }
.cd-field label small { font-weight: 400; color: #64748b; }
.cd-field input,
.cd-field select,
.cd-field textarea {
  background: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 13px 16px;
  color: #0f172a;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
  width: 100%;
}
.cd-field input:focus,
.cd-field select:focus,
.cd-field textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.cd-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23a1a1aa' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.cd-field textarea { resize: vertical; min-height: 100px; }

/* ── Nav buttons ── */
.cd-wizard__nav { display: flex; gap: 16px; margin-top: 8px; }

/* ── Upload zone ── */
.cd-upload-zone {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
  position: relative;
}
.cd-upload-zone:hover,
.cd-upload-zone.is-dragover { border-color: #7c3aed; background: rgba(124,58,237,0.05); }
.cd-upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cd-upload-zone__icon { font-size: 40px; margin-bottom: 12px; }
.cd-upload-zone p { color: #475569; margin: 4px 0; }
.cd-upload-zone p strong { color: #0f172a; }
.cd-upload-zone__types { font-size: 12px; color: #64748b; }

.cd-upload-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.cd-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1c1330;
}
.cd-upload-item__name { color: #1c1330; font-weight: 600; }
.cd-upload-item { position: relative; overflow: hidden; }
.cd-upload-item__name { flex: 1; word-break: break-all; }
.cd-upload-item__status { font-size: 12px; color: #475569; white-space: nowrap; font-weight: 600; }
.cd-upload-item__remove { color: #ef4444; cursor: pointer; font-size: 18px; line-height: 1; }

/* ── Uploading state: pulsing border + animated shimmer stripe ── */
.cd-upload-item--uploading {
  border-color: #f59e0b;
  animation: cd-upload-pulse 1.4s ease-in-out infinite;
}
.cd-upload-item--uploading .cd-upload-item__status { color: #f59e0b; }
.cd-upload-item--uploading::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #f59e0b, #d97706, #f59e0b, transparent);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: cd-upload-shimmer 1.2s linear infinite;
}
@keyframes cd-upload-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
@keyframes cd-upload-shimmer {
  0%   { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

/* ── Done state: light green with check ── */
.cd-upload-item--done { border-color: #22c55e; background: #f0fdf4; }
.cd-upload-item--done .cd-upload-item__status { color: #15803d; }

/* ── Uploading state: make "reading document…" unmistakably active ── */
.cd-upload-item--uploading { background: #fffbeb; padding: 14px 16px; }
.cd-upload-item--uploading .cd-upload-item__name { color: #92400e; }
.cd-upload-item--uploading .cd-upload-item__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
}
/* Spinning ring in front of the status text — a live, obvious "working" cue */
.cd-upload-item--uploading .cd-upload-item__status::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid rgba(180, 83, 9, 0.25);
  border-top-color: #b45309;
  animation: cd-spin 0.7s linear infinite;
  flex: 0 0 auto;
}

/* ── Failed state: light red ── */
.cd-upload-item--failed { border-color: #ef4444; background: #fef2f2; }
.cd-upload-item--failed .cd-upload-item__status { color: #dc2626; }

/* ── Amount-consistency warning (review step, before payment) ── */
.cd-amount-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 20px;
}
.cd-amount-warning__head {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 800; color: #92400e; margin-bottom: 8px;
}
.cd-amount-warning__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 50%; background: #f59e0b; color: #fff;
  font-size: 13px; font-weight: 900; line-height: 1;
}
.cd-amount-warning__body {
  font-size: 14px; line-height: 1.6; color: #78350f; margin: 0 0 14px;
}
.cd-amount-warning__body strong { color: #7c2d12; }
.cd-amount-warning__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
.cd-amount-warning__edit {
  background: #fff; border: 1px solid #f59e0b; color: #92400e;
  font-size: 13.5px; font-weight: 700; font-family: inherit;
  padding: 9px 16px; border-radius: 9px; cursor: pointer;
  transition: background 0.15s;
}
.cd-amount-warning__edit:hover { background: #fef3c7; }
.cd-amount-warning__confirm {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; color: #78350f; cursor: pointer; font-weight: 600;
}
.cd-amount-warning__confirm input { width: 17px; height: 17px; accent-color: #b45309; cursor: pointer; }
.cd-amount-warning--flash { animation: cd-amount-flash 0.6s ease-in-out 2; }
@keyframes cd-amount-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.35); }
}

/* ── Toast notification (for upload complete / errors) ── */
.cd-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #0f1f14;
  border: 1px solid #22c55e;
  color: #e8e8e8;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(34, 197, 94, 0.2);
  z-index: 99999;
  max-width: 360px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cd-toast--visible { opacity: 1; transform: translateX(0); }
.cd-toast--error { border-color: #ef4444; background: #2a1515; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(239, 68, 68, 0.3); }
.cd-toast__icon { font-size: 20px; flex-shrink: 0; }
.cd-toast__text { flex: 1; line-height: 1.35; }

.cd-upload-tips { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-top: 8px; }
.cd-upload-tips h4 { font-size: 14px; color: #0f172a; margin-bottom: 12px; }
.cd-upload-tips ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-upload-tips li { font-size: 13px; color: #475569; }
.cd-upload-tips li::before { content: '• '; color: #7c3aed; }
.cd-upload-optional { font-size: 12px; color: #64748b; margin-top: 12px; }

/* ── Review box ── */
.cd-review-box {
  background: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.cd-review-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e2e8f0; font-size: 14px; color: #475569; }
.cd-review-row:last-child { border-bottom: none; }
.cd-review-row strong { color: #0f172a; }

.cd-price-summary {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cd-price-summary__label { font-size: 16px; font-weight: 600; color: #0f172a; }
.cd-price-summary__amount { font-size: 32px; font-weight: 900; color: #0f172a; font-family: 'Sora', sans-serif; }
.cd-price-summary__sub { font-size: 12px; color: #64748b; }

.cd-terms-check { margin-bottom: 24px; }
.cd-terms-check label { font-size: 14px; color: #475569; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.cd-terms-check input { margin-top: 2px; accent-color: #7c3aed; }
.cd-terms-check a { color: #a855f7; text-decoration: underline; }

/* ── Processing ── */
.cd-processing { text-align: center; padding: 60px 0; }
.cd-processing__icon { font-size: 64px; margin-bottom: 24px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.cd-processing h2 { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 800; color: #0f172a; margin-bottom: 12px; }
.cd-processing p { font-size: 16px; color: #475569; margin-bottom: 40px; }
.cd-processing__steps { display: flex; flex-direction: column; gap: 12px; max-width: 400px; margin: 0 auto; text-align: left; }
.cd-proc-step {
  font-size: 14px;
  color: #64748b;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s;
}
.cd-proc-step.active { color: #0f172a; border-color: #7c3aed; background: rgba(124,58,237,0.1); }
.cd-proc-step.done { color: #22c55e; border-color: #22c55e; }

/* ── Dashboard ── */
.cd-dash { max-width: 900px; margin: 140px auto 80px; padding: 0 24px; }
.cd-dash__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; }
.cd-dash__header h1 { font-family: 'Sora', sans-serif; font-size: 36px; font-weight: 800; color: #0f172a; }

.cd-dash__empty { text-align: center; padding: 80px 24px; background: #0f172a; border: 1px solid #e2e8f0; border-radius: 16px; }
.cd-dash__empty-icon { font-size: 56px; margin-bottom: 20px; }
.cd-dash__empty h3 { font-size: 24px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.cd-dash__empty p { color: #475569; margin-bottom: 24px; }

.cd-dash__cases { display: flex; flex-direction: column; gap: 12px; }
.cd-case-card {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 20px;
  align-items: center;
  background: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.2s;
  cursor: pointer;
}
.cd-case-card:hover { border-color: #7c3aed; background: #faf5ff; }
.cd-case-card__icon { font-size: 32px; text-align: center; }
.cd-case-card__info h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.cd-case-card__ref { font-size: 12px; color: #64748b; }
.cd-case-card__vs { font-size: 13px; color: #475569; margin-top: 2px; }
.cd-case-card__status { display: flex; align-items: center; gap: 12px; }
.cd-case-card__arrow { color: #64748b; font-size: 18px; }

/* Status badges */
.cd-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 9999px; }
.cd-status--pending_payment, .cd-status--pending { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.cd-status--processing, .cd-status--generating { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.cd-status--ready, .cd-status--ready_to_send { background: rgba(168,85,247,0.15); color: #a855f7; border: 1px solid rgba(168,85,247,0.3); }
.cd-status--sent { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.cd-status--manual, .cd-status--manual_delivery { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }

/* Detail view */
.cd-dash__back { margin-bottom: 24px; }
.cd-dash__back a { font-size: 14px; color: #475569; }
.cd-dash__back a:hover { color: #0f172a; }
.cd-case-detail__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; gap: 20px; flex-wrap: wrap; }
.cd-case-detail__title { display: flex; align-items: center; gap: 20px; }
.cd-case-detail__icon { font-size: 48px; }
.cd-case-detail__title h1 { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.cd-case-detail__title p { font-size: 14px; color: #64748b; }

.cd-dash-section { margin-bottom: 40px; }
.cd-dash-section h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 20px; }

/* 14-day money-back notice on case detail page */
.cd-refund-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(34,197,94,0.06), rgba(16,185,129,0.03));
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 12px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.55;
}
.cd-refund-notice__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: rgba(34,197,94,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #16a34a;
}
.cd-refund-notice strong { color: #15803d; display: block; margin-bottom: 4px; font-size: 14.5px; }
.cd-refund-notice p { margin: 0; color: #475569; }
.cd-refund-notice a { color: #15803d; font-weight: 600; }
.cd-refund-notice code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; color: #334155; }

.cd-docs-list { display: flex; flex-direction: column; gap: 12px; }
.cd-doc-item { display: flex; justify-content: space-between; align-items: center; background: #0f172a; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; gap: 16px; }
.cd-doc-item__info { display: flex; flex-direction: column; gap: 4px; }
.cd-doc-item__type { font-size: 15px; font-weight: 600; color: #0f172a; }
.cd-doc-item__sent { font-size: 13px; color: #22c55e; }
.cd-doc-item__status { font-size: 13px; color: #475569; }
.cd-btn--sm { padding: 8px 16px; font-size: 13px; }

/* Timeline */
.cd-timeline { display: flex; flex-direction: column; gap: 0; }
.cd-timeline__item { display: grid; grid-template-columns: 24px 1fr; gap: 16px; padding: 0 0 32px; position: relative; }
.cd-timeline__item:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: #e2e8f0; }
.cd-timeline__item--done::after { background: #22c55e !important; }
.cd-timeline__dot { width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; border: 2px solid #e2e8f0; flex-shrink: 0; margin-top: 2px; position: relative; z-index: 1; }
.cd-timeline__item--done .cd-timeline__dot { background: #22c55e; border-color: #22c55e; }
.cd-timeline__item:first-child .cd-timeline__dot { background: #7c3aed; border-color: #7c3aed; }
.cd-timeline__label { font-size: 15px; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.cd-timeline__date { font-size: 12px; color: #7c3aed; margin-bottom: 6px; font-weight: 600; }
.cd-timeline__detail { font-size: 14px; color: #475569; line-height: 1.6; }

.cd-case-summary { background: #0f172a; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.cd-summary-row { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.cd-summary-row:last-child { border-bottom: none; }
.cd-summary-row span { color: #64748b; }
.cd-summary-row strong { color: #0f172a; }

/* Error */
.cd-error { color: #ef4444; padding: 20px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; }

/* ── Tablet (≤900px) ── */
@media (max-width: 900px) {
  .cd-wizard { max-width: 100%; padding: 0 20px; }
  .cd-dash { max-width: 100%; padding: 0 20px; }
  .cd-price-summary { flex-direction: column; gap: 8px; }
  .cd-price-summary__amount { font-size: 40px; }
}

/* ── Missing utility styles ── */

/* Required asterisk */
.cd-req { color: #ef4444; margin-left: 2px; }

/* Field validation error state */
.cd-field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important;
}

/* Section group title (separates service-specific fields) */
.cd-field-group-title {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7c3aed;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(124,58,237,0.2);
  margin-bottom: 4px;
}

/* Alert boxes (info / warn inside wizard) */
.cd-alert {
  grid-column: 1 / -1;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}
.cd-alert--info {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
}
.cd-alert--info strong { color: #bfdbfe; }
.cd-alert--warn {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fde68a;
}
.cd-alert--warn strong { color: #fef3c7; }

/* Inline auth panel at checkout */
.cd-auth-inline {
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.cd-auth-inline--ok {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.25);
}
.cd-auth-inline__header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}
.cd-auth-inline__header p {
  font-size: 13px;
  color: #475569;
  margin: 0 0 16px;
}
.cd-auth-inline .cd-form-grid {
  margin-bottom: 0;
}

/* Small helper text below fields */
.cd-field small { font-size: 13.5px; color: #64748b; line-height: 1.5; }

/* Mobile: show status badge in a stacked layout */
@media (max-width: 640px) {
  .cd-case-card { grid-template-columns: 48px 1fr; grid-template-rows: auto auto; }
  .cd-case-card__status { display: flex; grid-column: 2; justify-content: flex-start; margin-top: 4px; }
  .cd-case-card__arrow { display: none; }
}

/* ============================================================
   MOBILE UX POLISH — intake/wizard
   ============================================================ */

/* Eliminate 300ms tap delay on all interactive elements */
.cd-btn, .cd-service-option, .cd-wizard__next, .cd-wizard__prev,
.cd-upload-zone, button, a, input, select, textarea, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Review step: improve readability on small screens */
@media (max-width: 480px) {
  .cd-review-row {
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
  }
  .cd-review-row strong {
    font-size: 12px;
    color: var(--text-muted, #475569);
  }
  .cd-review-row span {
    font-size: 15px;
    color: #0f172a;
  }
  .cd-price-summary__amount {
    font-size: 36px;
  }
}

/* Terms checkbox: bigger tap area */
.cd-terms-check label {
  line-height: 1.6;
  cursor: pointer;
  padding: 8px 0;
}
.cd-terms-check input[type=checkbox] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 1px;
}

/* Navigation buttons: minimum height for tap targets */
.cd-wizard__nav .cd-btn {
  min-height: 52px;
}

/* Progress bar: thicker on mobile */
@media (max-width: 640px) {
  .cd-wizard__progress {
    height: 5px;
  }
}

/* Upload item remove button: bigger hit area */
.cd-upload-item__remove {
  padding: 8px;
  margin: -8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Processing screen: readable on small phones */
@media (max-width: 480px) {
  .cd-proc-step {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Upload zone: mobile-friendly tap affordance */
@media (max-width: 640px) {
  .cd-upload-zone__inner > p:first-of-type strong {
    display: block;
    margin-bottom: 4px;
  }
}


/* ═══════════════════════════════════════════════════════════
   INTAKE MOBILE — web-app feel
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Wizard sits below 60px header + bottom bar clearance */
  .cd-wizard {
    margin-top: 80px;
    margin-bottom: 100px;
    padding: 0 16px;
  }

  /* Step title smaller, tighter */
  .cd-wizard h2 { font-size: 24px; }
  .cd-wizard__sub { font-size: 14px; margin-bottom: 24px; }

  /* Progress bar thicker for visibility */
  .cd-wizard__progress { height: 5px; }

  /* Service grid: single column on mobile */
  .cd-services-select { grid-template-columns: 1fr; gap: 10px; }
  .cd-service-option { padding: 16px 18px; flex-direction: row; align-items: center; gap: 14px; }
  .cd-service-option__icon { font-size: 24px; margin-bottom: 0; flex-shrink: 0; }
  .cd-service-option__name { font-size: 15px; }
  .cd-service-option__desc { display: none; } /* hide desc on mobile to keep compact */

  /* Form fields: single column, taller inputs */
  .cd-form-grid { grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
  .cd-field input,
  .cd-field select,
  .cd-field textarea {
    font-size: 16px !important; /* prevent iOS zoom */
    padding: 14px 16px;
    border-radius: 10px;
  }
  .cd-field select { background-position: right 14px center; }
  .cd-field textarea { min-height: 120px; }

  /* Nav buttons: stacked, full width */
  .cd-wizard__nav { flex-direction: column-reverse; gap: 10px; margin-top: 20px; }
  .cd-wizard__nav .cd-btn { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }

  /* Upload zone: compact on mobile */
  .cd-upload-zone { padding: 28px 20px; }
  .cd-upload-zone__icon { font-size: 32px; }

  /* Review step — label=muted, value=white */
  .cd-review-row { flex-direction: column; gap: 3px; padding: 14px 0; }
  .cd-review-row strong { font-size: 12px; color: #475569; }
  .cd-review-row span { font-size: 15px; color: #0f172a; font-weight: 500; }

  /* Price summary */
  .cd-price-summary { flex-direction: column; gap: 8px; text-align: center; }
  .cd-price-summary__amount { font-size: 38px; }

  /* Processing screen */
  .cd-proc-step { padding: 12px 14px; font-size: 14px; }

  /* Dashboard */
  .cd-dash { padding: 0 16px; margin-top: 80px; }

  /* Terms checkbox: bigger */
  .cd-terms-check input[type=checkbox] { width: 22px; height: 22px; min-width: 22px; }
  .cd-terms-check label { font-size: 14px; line-height: 1.7; padding: 8px 0; }

  /* Upload item remove button */
  .cd-upload-item__remove { padding: 10px; margin: -10px; min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center; }

  /* Prevent horizontal scroll */
  .cd-wizard, .cd-dash { max-width: 100%; overflow-x: hidden; }

  /* Field groups look like cards on mobile */
  .cd-svc-fields { padding: 0; }
  .cd-field-group-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 16px 0 8px;
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .cd-wizard h2 { font-size: 21px; }
  .cd-wizard { padding: 0 14px; }
  .cd-price-summary__amount { font-size: 32px; }
}

/* ── 375px — Standard mobile phones ──────────────────────── */
@media (max-width: 375px) {
  .cd-wizard { margin-top: 72px; padding: 0 12px; }
  .cd-dash { margin-top: 72px; padding: 0 12px; }
  .cd-wizard h2 { font-size: 19px; }
  .cd-wizard__sub { font-size: 13px; }
  .cd-wizard__step-label { font-size: 11px; }
  .cd-service-option { padding: 14px; gap: 10px; }
  .cd-service-option__name { font-size: 14px; }
  .cd-service-option__price { font-size: 13px; }
  .cd-field label { font-size: 14.5px; }
  .cd-field small { font-size: 12.5px; }
  .cd-field input, .cd-field select { padding: 12px 14px; }
  .cd-field textarea { padding: 12px 14px; min-height: 100px; }
  .cd-alert { padding: 12px 14px; font-size: 13px; }
  .cd-wizard__nav .cd-btn { min-height: 48px; font-size: 15px; }
  .cd-terms-check label { font-size: 13px; }
  .cd-upload-zone { padding: 24px 14px; }
  .cd-review-row strong { font-size: 11px; }
  .cd-review-row span { font-size: 14px; }
  .cd-price-summary__amount { font-size: 28px; }
  .cd-case-card { padding: 14px; }
}

/* ── 320px — Very small phones ───────────────────────────── */
@media (max-width: 320px) {
  .cd-wizard { padding: 0 10px; }
  .cd-wizard h2 { font-size: 17px; }
  .cd-field input, .cd-field select, .cd-field textarea { font-size: 16px !important; padding: 11px 13px; }
  .cd-wizard__nav .cd-btn { min-height: 44px; font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════
   Contract Review — "Points to Consider" dashboard panel
   ══════════════════════════════════════════════════════════ */
.cd-review-intro {
  color: #475569;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.cd-review-intro strong { color: #0f172a; }

.cd-review-summary-card {
  background: linear-gradient(135deg, #1a0a2a, #0f0a1f);
  border: 1px solid #4a1a7a;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.cd-review-summary-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b084f0;
  font-weight: 700;
  margin-bottom: 8px;
}
.cd-review-summary-card p {
  color: #e8e8e8;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.cd-review-group { margin-bottom: 28px; }
.cd-review-group h3 {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.cd-review-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.cd-review-card {
  background: #141418;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 16px;
}
.cd-review-card__title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
}
.cd-review-card__detail {
  color: #c4c4cc;
  font-size: 13px;
  line-height: 1.5;
}

.cd-review-card--watch       { border-left-color: #f59e0b; background: #1a1510; }
.cd-review-card--fees        { border-left-color: #ef4444; background: #1f1313; }
.cd-review-card--obligations { border-left-color: #3b82f6; background: #101622; }

.cd-review-questions {
  margin: 0;
  padding-left: 22px;
  color: #d4d4dc;
}
.cd-review-questions li {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.55;
}
.cd-review-questions li::marker { color: #b084f0; font-weight: 700; }

.cd-review-nextsteps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cd-review-nextsteps li {
  position: relative;
  padding: 10px 14px 10px 36px;
  background: #0f1a14;
  border: 1px solid #1a3a24;
  border-radius: 8px;
  margin-bottom: 8px;
  color: #d4e8da;
  font-size: 14px;
  line-height: 1.5;
}
.cd-review-nextsteps li::before {
  content: '→';
  position: absolute;
  left: 14px;
  color: #22c55e;
  font-weight: 700;
}

.cd-review-disclaimer {
  margin-top: 20px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
  .cd-review-cards { grid-template-columns: 1fr; }
  .cd-review-group h3 { font-size: 15px; }
  .cd-review-card { padding: 12px 14px; }
}

/* ── Money-back guarantee badge — sits above the Pay button ───────── */
.cd-guarantee {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 18px 0 14px;
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(16,185,129,0.04));
  border: 1px solid rgba(34,197,94,0.30);
  border-radius: 12px;
  color: #166534;
}
.cd-guarantee__icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  background: rgba(34,197,94,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #16a34a;
}
.cd-guarantee__body {
  flex: 1; min-width: 0;
  font-size: 13.5px; line-height: 1.5;
  color: #1f2937;
}
.cd-guarantee__body strong {
  color: #15803d;
  font-weight: 700;
}

/* ── Processing screen: lock nav + ETA + waveform animation ──────── */
.cd-processing-locked {
  pointer-events: none;
  user-select: none;
}
.cd-processing-eta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(124,58,237,0.10);
  border: 1px solid rgba(124,58,237,0.25);
  color: #6d28d9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin: 6px auto 18px;
}
.cd-processing-eta__dot {
  width: 6px; height: 6px;
  background: #7c3aed;
  border-radius: 50%;
  animation: cd-eta-pulse 1.2s infinite ease-in-out;
}
@keyframes cd-eta-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.65); }
}

/* Live wave underneath the active step in the processing card */
.cd-proc-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #7c3aed, transparent);
  background-size: 200% 100%;
  animation: cd-wave 1.6s linear infinite;
  border-radius: 0 0 14px 14px;
  opacity: 0.75;
}
@keyframes cd-wave {
  0%   { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

/* When generation completes — flash the success state */
.cd-proc-step.is-just-finished {
  animation: cd-finished-flash 1.0s ease;
}
@keyframes cd-finished-flash {
  0%   { background: rgba(34,197,94,0.20); }
  100% { background: linear-gradient(135deg, rgba(34,197,94,0.08), #ffffff); }
}

/* ── Conditional service sub-blocks ──
   Hidden by default; revealed by intake.js initConditionalBlocks() when the
   referenced control's value matches. Hidden via display:none so we don't
   leak height during initial render. */
[data-show-when] { display: none; }
[data-show-when].is-visible { display: block; }
.cd-field__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ── Service confirmation card on step 2 ─────────────────────
   Polished card replacing the inline-styled v1.6.2 version. Matches the
   dark wizard aesthetic, scales cleanly on mobile, has a focus-friendly
   border, and uses design tokens. */
.cd-svc-confirm {
  display: none;                 /* JS flips to flex when populated */
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 55%, #8b5cf6 100%);
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 14px;
  box-shadow: 0 12px 30px -16px rgba(124, 58, 237, 0.30);
}
.cd-svc-confirm__left {
  flex: 1 1 220px;
  min-width: 0;
}
.cd-svc-confirm__eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  font-weight: 700;
  margin-bottom: 4px;
}
.cd-svc-confirm__name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.2px;
}
.cd-svc-confirm__blurb {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}
.cd-svc-confirm__right {
  text-align: right;
  flex-shrink: 0;
}
.cd-svc-confirm__fee-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2px;
}
.cd-svc-confirm__price {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.5px;
}
.cd-svc-confirm__sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.60);
}
@media (max-width: 540px) {
  .cd-svc-confirm { padding: 16px; gap: 12px; }
  .cd-svc-confirm__right { text-align: left; }
  .cd-svc-confirm__price { font-size: 22px; }
}

/* ── Bank-details accordion on Letter of Demand step 4 ─────
   Replaces the default browser <details> chevron with a clean rotation
   arrow, ensures the summary has a hover/focus state, and matches the
   wizard's dark surface treatment. */
.cd-accordion {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cd-accordion[open] {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.30);
}
.cd-accordion > summary {
  list-style: none;          /* hide default disc */
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #0f172a;
  user-select: none;
}
.cd-accordion > summary::-webkit-details-marker { display: none; }
.cd-accordion > summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
  border-radius: 4px;
}
.cd-accordion__title { flex: 1; }
.cd-accordion__title small {
  color: #64748b;
  font-weight: 400;
  text-transform: none;
  margin-left: 4px;
}
.cd-accordion__hint {
  font-size: 13px;
  font-weight: 600;
  color: #a855f7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
}
.cd-accordion[open] .cd-accordion__hint::after { content: " ↓"; }
.cd-accordion:not([open]) .cd-accordion__hint::after { content: " →"; }
.cd-accordion[open] .cd-accordion__hint span::after,
.cd-accordion:not([open]) .cd-accordion__hint span::after { content: ""; }
.cd-accordion__body {
  margin-top: 14px;
}
.cd-accordion__intro {
  font-size: 13px;
  color: #475569;
  margin: 0 0 14px;
  line-height: 1.5;
}

/* ── Conditional-required indicator + optional hint on Step 3 ─
   For recipient first/last name: the `*` and "(optional)" hint toggle
   based on entity type via initEntityToggle(). Defaults to a state that
   doesn't flash a wrong indicator on first paint. */
.cd-req--conditional { display: none; }       /* JS shows when entity needs name */
.cd-optional-hint    { display: none; }       /* JS shows when entity does not */

/* ── Button spinner ────────────────────────────────────────
   Shown inside Continue buttons while an AJAX save is in flight.
   Prevents double-clicks and tells the user something is happening. */
.cd-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: cd-spin 0.7s linear infinite;
}
@keyframes cd-spin {
  to { transform: rotate(360deg); }
}
.cd-btn[disabled],
.cd-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* ── Inline validation error banner ────────────────────────
   Non-blocking replacement for alert() when required fields are empty. */
.cd-validation-error {
  font-weight: 500;
}
.cd-field-error input,
.cd-field-error select,
.cd-field-error textarea {
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ── 2026-06-09 light-theme base polish: consistent card depth + hairlines ── */
.cd-service-option, .cd-upload-item, .cd-review-box, .cd-dash__empty,
.cd-case-card, .cd-doc-item, .cd-case-summary {
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 26px -16px rgba(15,23,42,.12);
}
.cd-service-option, .cd-case-card, .cd-doc-item, .cd-review-box { border-radius: 14px; }
.cd-upload-tips, .cd-accordion { box-shadow: none; }
