/* Production transport/mobile overrides. Ashrifa's approved visual system stays in index.html. */
.receipt-preparation {
  display: grid;
  gap: .55rem;
  margin: -.15rem 0 .8rem;
  padding: .8rem .9rem;
  color: #315e5a;
  background: #e5f5f2;
  border: 1px solid rgba(9,106,101,.2);
  border-radius: 7px;
}

.receipt-preparation[hidden] { display: none; }
.receipt-preparation > div:first-child { display: grid; gap: .14rem; }
.receipt-preparation strong { color: var(--teal); font-size: .75rem; }
.receipt-preparation span { color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.receipt-preparation.is-error { color: #7a271a; background: #fff1ef; border-color: rgba(180,35,24,.3); }
.receipt-preparation.is-error strong { color: #b42318; }
.receipt-preparation.is-ready { background: #e8f5f2; }

.upload-progress {
  height: 8px;
  overflow: hidden;
  background: rgba(9,106,101,.14);
  border-radius: 999px;
}

.upload-progress[hidden] { display: none; }
.upload-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width .18s ease-out;
}

.button[disabled] { cursor: wait; opacity: .72; transform: none; }
.upload-card.is-preparing { cursor: wait; opacity: .8; }
.upload-card.is-error { border-color: #b42318; background: #fff8f6; }

.eligibility-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(27, 6, 19, .82);
  backdrop-filter: blur(7px);
}

.eligibility-modal[hidden] { display: none; }
.eligibility-card {
  width: min(460px, 100%);
  padding: clamp(1.4rem, 5vw, 2.3rem);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(217, 155, 32, .4);
  border-top: 7px solid var(--saffron);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(20, 4, 14, .42);
  text-align: center;
}

.eligibility-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  color: white;
  background: var(--plum);
  border-radius: 50%;
  font: 700 1.35rem var(--serif);
}

.eligibility-card h2 { margin: .4rem 0 .7rem; font: 500 clamp(1.65rem, 6vw, 2.2rem)/1.08 var(--serif); }
.eligibility-card > p:not(.eyebrow) { margin: 0 auto 1.35rem; color: var(--muted); line-height: 1.6; }
.eligibility-card .button { width: 100%; min-height: 50px; }

/* One dependable dialog scroll surface on every viewport. */
.intake-dialog {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dialog-frame { height: auto; min-height: 100%; overflow: visible; }
.course-info,
.registration-form,
.form-shell,
.form-main,
.success {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.course-info,
.registration-form,
.success { flex: 0 0 auto; }
.dialog-topbar,
.form-progress,
.dialog-actions,
.step-actions { position: static; }
.form-step { padding-bottom: max(.35rem, env(safe-area-inset-bottom)); }
.form-step .step-actions { margin-bottom: 0; }

@media (max-width: 680px) {
  .intake-dialog {
    width: 100%;
    height: 100%;
    min-height: 100svh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }

  .dialog-frame { min-height: 100svh; }
  .dialog-topbar { min-height: 64px; }
  .form-progress { position: static; }
  .step-actions,
  .dialog-actions {
    padding-bottom: max(1rem, calc(.7rem + env(safe-area-inset-bottom)));
    backdrop-filter: none;
  }

  .step-actions .button,
  .dialog-actions .button { min-height: 50px; }
  .success { padding-bottom: max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom))); }
}

@media (max-width: 350px) {
  .step-actions,
  .dialog-actions { flex-direction: column-reverse; }
  .step-actions .button,
  .dialog-actions .button { width: 100%; }
}

@media (hover: none) and (pointer: coarse) {
  .button:hover,
  .programme-door:hover { transform: none; }
}
