/* Apostille order form — ported/adapted from first-choice-live-zip
   src/components/Apostille/{Apostille,PaymentStep}.css for the vanilla-JS
   Laravel wizard (no React/antd). Shared structure/colors reused by
   fbi-order.css and embassy-order.css. */

.order-page { background: #f8fafc; min-height: 100vh; }

.order-hero {
  background: linear-gradient(135deg, #f28a4b 0%, #f28a4b 100%);
  color: #fff;
  text-align: center;
  padding: 50px 0 90px;
}

.order-hero h1 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.order-hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto;
}

.order-wizard-wrap {
  max-width: 900px;
  margin: -60px auto 0;
  padding: 0 16px 60px;
  position: relative;
  z-index: 5;
}

.order-wizard {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* --- Get Started intro --------------------------------------------- */

.ow-intro {
  padding: 48px 32px;
  text-align: center;
}

.ow-intro h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 10px;
}

.ow-intro > p {
  font-size: 1.05rem;
  color: #6b7280;
  margin-bottom: 28px;
  line-height: 1.6;
}

.ow-intro-btn {
  background: #f28a4b;
  border-color: #f28a4b;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 13px 36px;
  border-radius: 8px;
  border: none;
  margin-bottom: 36px;
}

.ow-intro-btn:hover { background: #e67e22; border-color: #e67e22; }

.ow-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
}

.ow-intro-card {
  background: #f8fafc;
  padding: 28px;
  border-radius: 10px;
}

.ow-intro-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 12px;
}

.ow-intro-card ul { list-style: none; padding: 0; margin: 0; }

.ow-intro-card li {
  padding: 6px 0 6px 24px;
  color: #6b7280;
  position: relative;
}

.ow-intro-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34a7e5;
  font-weight: 700;
}

/* --- Progress bar ---------------------------------------------------- */

.ow-progress {
  display: flex;
  padding: 40px 40px 20px;
  background: #fafbfc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0;
}

.ow-progress-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.ow-progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.ow-progress-step.is-done:not(:last-child)::after,
.ow-progress-step.is-active:not(:last-child)::after {
  background: #93d5f5;
}

.ow-progress-step .ow-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  font-weight: 600;
  font-size: 16px;
  margin: 0 auto 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ow-progress-step .ow-dot i { font-size: 1.05rem; line-height: 1; }

.ow-progress-step .ow-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.25;
  padding: 0 4px;
}

.ow-progress-step.is-active .ow-dot {
  background: #34a7e5;
  border-color: #34a7e5;
  color: #fff;
}
.ow-progress-step.is-active .ow-label { color: #34a7e5; }
.ow-progress-step.is-done .ow-dot {
  background: #2b8fc7;
  border-color: #2b8fc7;
  color: #fff;
}
.ow-progress-step.is-done .ow-label { color: #374151; }

@media (max-width: 640px) {
  .ow-progress { padding: 18px 10px 14px; }
  .ow-progress-step .ow-label { font-size: 11px; }
  .ow-progress-step .ow-dot { width: 34px; height: 34px; }
  .ow-progress-step:not(:last-child)::after { top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); }
}

/* --- Form body -------------------------------------------------------- */

.ow-form { padding: 36px; }

.ow-step { max-width: 640px; margin: 0 auto; }

.ow-step-head { margin-bottom: 24px; }
.ow-step-head h3 { font-size: 1.5rem; font-weight: 700; color: #1f2937; margin-bottom: 6px; }
.ow-step-head p { color: #6b7280; margin: 0; }

/* Signer Information panel (matches live notary order) */
.signer-information-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.signer-section-head { margin-bottom: 1rem; }
.signer-section-head h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem;
}
.signer-note {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem;
  font-style: italic;
}
.signer-information-section .ow-group-half {
  max-width: 50%;
}
@media (max-width: 640px) {
  .signer-information-section .ow-group-half { max-width: 100%; }
}

.ow-note {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0ea5e9;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 22px;
  color: #0369a1;
  font-size: 14px;
  line-height: 1.5;
}

.ow-group { margin-bottom: 22px; }
.ow-group > label,
.ow-group .ow-group-label {
  font-weight: 600;
  color: #374151;
  font-size: 15px;
  margin-bottom: 8px;
  display: block;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.ow-radio-cards { display: flex; flex-direction: column; gap: 10px; }

.ow-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.ow-radio-card:hover { border-color: #34a7e5; background: #eef7fc; }
.ow-radio-card input:checked ~ .ow-radio-card-body,
.ow-radio-card:has(input:checked) { border-color: #34a7e5; background: #eef7fc; }

.ow-radio-card input { margin-top: 3px; flex-shrink: 0; }

.ow-radio-card-body .title { font-weight: 600; color: #1f2937; font-size: 15px; }
.ow-radio-card-body .desc { color: #6b7280; font-size: 13px; margin-top: 2px; }

.ow-address-block {
  margin-top: 28px;
  padding: 22px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.ow-address-block h4 {
  margin: 0 0 16px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid #34a7e5;
  padding-bottom: 8px;
}

.ow-address-block.ow-shipping {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.ow-upload {
  border: 2px dashed #34a7e5;
  border-radius: 10px;
  padding: 32px 18px;
  text-align: center;
  background: #fff;
}

.ow-upload:hover { border-color: #2b8fc7; background: #eef7fc; }
.ow-upload input[type="file"] { display: block; margin: 10px auto 0; }
.ow-upload .ow-upload-title { font-weight: 600; color: #374151; margin-bottom: 6px; }
.ow-upload .ow-upload-sub { color: #6b7280; font-size: 13px; }

.ow-checkbox-row { display: flex; flex-wrap: wrap; gap: 18px; }
.ow-checkbox-row label { display: flex; align-items: center; gap: 6px; font-size: 15px; color: #374151; }

.req { color: #ef4444; margin-right: 2px; }

.ow-radio-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ow-radio-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  transition: all .2s ease;
  margin: 0;
  font-weight: 500;
  color: #374151;
}

.ow-radio-pill:hover { border-color: #34a7e5; background: #eef7fc; }
.ow-radio-pill:has(input:checked) {
  border-color: #34a7e5;
  background: #eef7fc;
  box-shadow: 0 0 0 1px #34a7e5 inset;
}

.ow-radio-pill input { margin: 0; flex-shrink: 0; }
.ow-radio-pill span { line-height: 1.3; }

@media (max-width: 480px) {
  .ow-radio-inline { grid-template-columns: 1fr; }
}

/* Floating help widget (live site) */
.help-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.help-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
  padding: 20px 22px;
  width: 220px;
}

.help-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: #2c5aa0;
}

.help-card .phone-link { text-decoration: none; color: inherit; display: block; }
.help-card .phone-number {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #2c5aa0;
  line-height: 1.3;
}
.help-card .phone-label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .help-widget { bottom: 16px; right: 12px; }
  .help-card { width: 190px; padding: 16px; }
}

/* --- Summary / payment ------------------------------------------------ */

.ow-summary-box {
  margin-bottom: 24px;
  padding: 22px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.ow-summary-box h4 {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 2px solid #34a7e5;
  padding-bottom: 8px;
}

.ow-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #374151;
}

.ow-summary-row > span:first-child {
  font-weight: 500;
  color: #4b5563;
  flex-shrink: 0;
}

.ow-summary-row > span:last-child {
  font-weight: 600;
  color: #111827;
  text-align: right;
}

.ow-summary-row:last-child { border-bottom: none; }
.ow-summary-row.total {
  border-top: 2px solid #34a7e5;
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1f2937;
}

.ow-payment-box {
  padding: 22px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.ow-payment-box h4 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 2px solid #34a7e5;
  padding-bottom: 8px;
}

.ow-stripe-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f28a4b;
  color: #9a3412;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

#payment-element,
[data-ow="payment-element"] { margin: 16px 0; }

.ow-pay-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-top: 10px;
}

/* --- Actions ------------------------------------------------------------ */

.ow-actions {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ow-actions-start { justify-content: flex-start; }

.ow-btn {
  border-radius: 8px;
  height: 52px;
  padding: 0 32px;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
}

.ow-btn-primary { background: #34a7e5; color: #fff; }
.ow-btn-primary:hover { background: #2b8fc7; color: #fff; }
.ow-btn-secondary { background: #fff; border: 2px solid #e5e7eb; color: #6b7280; }
.ow-btn-secondary:hover { border-color: #34a7e5; color: #34a7e5; }
.ow-btn:disabled { opacity: 0.6; cursor: default; }

.ow-success-actions .ow-btn {
  height: 52px;
  min-width: 180px;
}

/* --- Success screen ------------------------------------------------------ */

.ow-success { padding: 48px 36px; max-width: 760px; margin: 0 auto; text-align: center; }
.ow-success h2 { font-size: 1.9rem; font-weight: 700; color: #1e40af; margin-bottom: 8px; }
.ow-success > p { font-size: 1.05rem; line-height: 1.55; color: #4b5563; }
.ow-order-number {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2b8fc7;
  background: #eef7fc;
  padding: 8px 18px;
  border-radius: 8px;
  margin: 10px 0 14px;
}

.ow-mailing {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0ea5e9;
  border-radius: 10px;
  padding: 18px;
  margin: 20px 0;
}

.ow-success-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
  text-align: left;
}

.ow-success-card { background: #f8fafc; padding: 24px; border-radius: 10px; }
.ow-success-card h4 { font-size: 1.1rem; font-weight: 600; color: #1e40af; margin-bottom: 10px; }
.ow-success-card ul { list-style: none; padding: 0; margin: 0; }
.ow-success-card li { padding: 6px 0 6px 22px; color: #6b7280; position: relative; }
.ow-success-card li::before { content: "✓"; position: absolute; left: 0; color: #34a7e5; font-weight: 700; }
.ow-success-card a { color: #1e40af; text-decoration: none; font-weight: 500; }
.ow-success-card a:hover { text-decoration: underline; }

.ow-success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .ow-form { padding: 20px; }
  .ow-intro-grid,
  .ow-success-grid { grid-template-columns: 1fr; }
  .ow-intro { padding: 32px 18px; }
}

@media print {
  /* Hide chrome + wizard so only the thank-you receipt prints */
  body.is-printing-receipt .fc-header,
  body.is-printing-receipt .site-footer,
  body.is-printing-receipt .help-widget,
  body.is-printing-receipt .order-hero,
  body.is-printing-receipt .ow-intro,
  body.is-printing-receipt [data-ow="intro"],
  body.is-printing-receipt [data-ow="wizard"],
  .fc-header,
  .site-footer,
  .help-widget,
  .order-hero,
  .ow-intro,
  [data-ow="intro"],
  [data-ow="wizard"],
  .ow-progress,
  .ow-form,
  .ow-success-actions,
  .ow-actions {
    display: none !important;
  }

  html, body, main {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .order-page,
  .order-wizard-wrap,
  .order-wizard {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .ow-success {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 8px 12px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .ow-success-grid,
  .ow-mailing,
  .ow-success-card,
  .ow-order-number {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .ow-success-grid {
    margin: 16px 0 !important;
  }

  a[href]::after {
    content: none !important;
  }
}
