/**
 * aci-patient.css — Patient-side ACI detail page styles.
 *
 * Introduced in Phase 5 of the Atlas Clinical Investigation cutover.
 * Re-uses the patient shell palette tokens when present, with local
 * fallbacks so the shared payment/status sections can render anywhere.
 */

/* ---------- PaymentCardComponent (shared) ---------- */

.acp-skeleton {
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2f7 25%, #faf4e8 38%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: acp-skeleton-shimmer 1.4s ease-in-out infinite;
}

.acp-skeleton--list {
  min-height: 120px;
}

@keyframes acp-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.pcc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.12));
  border-radius: 16px;
  box-shadow: none;
}

.pcc--completed { border-top: 4px solid var(--home-green, #2f6c56); }
.pcc--failed    { border-top: 4px solid var(--home-red, #a8342e); }

.pcc-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pcc-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef3f7;
  color: var(--home-accent, #2c5f7f);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.pcc-header--success .pcc-header-icon { background: #e2f0ea; color: var(--home-green, #2f6c56); }
.pcc-header--error   .pcc-header-icon { background: #fde8e8; color: var(--home-red, #a8342e); }

.pcc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--home-ink, #264653);
}

.pcc-subtitle {
  font-size: 13px;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
}

.pcc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pcc-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 10px;
}

.pcc-summary-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--home-ink, #264653);
}

.pcc-summary-desc {
  font-size: 12px;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
}

.pcc-card-placeholder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #fdf8ee;
  border: 1px solid var(--home-border, #e5e7eb);
  border-radius: 10px;
}

.pcc-card-row-split {
  display: flex;
  gap: 12px;
}
.pcc-card-row-split > .pcc-card-row { flex: 1; }

.pcc-card-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
  margin-bottom: 4px;
}

.pcc-card-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--home-border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  color: var(--home-ink, #264653);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.pcc-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--home-accent, #d06c52);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(33, 79, 68, 0.12);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.pcc-btn:disabled { opacity: 0.7; cursor: wait; }
.pcc-btn.pcc-retry { background: var(--home-red, #a8342e); }
.pcc-btn.pcc-continue { background: var(--home-green, #2f6c56); }

.pcc-secure-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
  justify-content: center;
}

.pcc-receipt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #f6faf8;
  border-radius: 10px;
}

.pcc-receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.pcc-receipt-label { color: var(--home-ink-dim, rgba(38, 70, 83, 0.52)); }
.pcc-receipt-value { color: var(--home-ink, #264653); font-weight: 500; }
.pcc-receipt-id { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
.pcc-amount { font-weight: 700; }

/* ---------- Top bar / shell ---------- */

#aci-patient-app {
  min-height: 100vh;
  padding: 24px 16px 64px;
}

.acp-shell {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── NeuroClarity brand slot in patient ACI topbar ─── */
.acp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.acp-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: contain;
}
.acp-brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--home-ink, #264653);
  font-family: 'IBM Plex Sans', sans-serif;
}

.acp-topbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 4px 0;
}

.acp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--home-accent, #d06c52);
  text-decoration: none;
  font-weight: 600;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s;
}
.acp-back:hover {
  background: rgba(208, 233, 221, 0.3);
}

.acp-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.acp-topbar-package {
  font-size: 22px;
  font-weight: 700;
  color: var(--home-ink, #264653);
  font-family: 'Fraunces', serif;
  letter-spacing: -0.03em;
}

.acp-topbar-meta {
  font-size: 13px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
}

.acp-topbar-clin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.acp-topbar-clin--muted { color: var(--home-ink-dim, rgba(38, 70, 83, 0.52)); font-style: italic; }

.acp-pill {
  display: inline-flex;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}
.acp-pill--red   { background: #fde8e8; color: var(--home-red, #a8342e); }
.acp-pill--amber { background: #fef0dc; color: var(--home-amber, #ad6e0d); }
.acp-pill--green { background: #e2f0ea; color: var(--home-green, #2f6c56); }
.acp-pill--blue  { background: #e1edf5; color: var(--home-blue, #1c4f72); }
.acp-pill--teal  { background: #daecea; color: var(--home-teal, #1e6b6b); }
.acp-pill--grey  { background: #e5e7eb; color: var(--home-grey, #4b5563); }

/* ---------- Pending-evidence nudge (booking surfaces) ---------- */

/* Soft, non-blocking amber banner shown above the slot picker while requested
   evidence is still outstanding. "Recommended", not "required" — booking below
   stays fully available. Deliberately NOT an `.acp-card` so the stage-body card
   overrides (white fill, grey border) don't flatten its amber treatment; the
   stage-body flex gap provides separation from the booking card below. */
.acp-evidence-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff8ee;
  border: 1px solid #f0dcb4;
  border-radius: 8px;
  padding: 14px 16px;
}
.acp-evidence-notice-icon {
  color: var(--home-amber, #ad6e0d);
  font-size: 16px;
  margin-top: 1px;
  flex: none;
}
.acp-evidence-notice-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.acp-evidence-notice-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--home-ink, #264653);
}
.acp-evidence-notice-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--home-ink-soft, #4b5d57);
}
.acp-evidence-notice-cta {
  align-self: flex-start;
  margin-top: 4px;
}

/* Compact reminder line carried inside the booked-session card body. */
.acp-evidence-reminder {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.45;
  color: #8a5a06;
  background: #fff8ee;
  border: 1px solid #f0dcb4;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.acp-evidence-reminder i {
  margin-top: 2px;
  flex: none;
  color: var(--home-amber, #ad6e0d);
}

/* ---------- Cards ---------- */

.acp-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acp-card {
  background: #fff;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.12));
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.acp-card-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--home-border, #e5e7eb);
}

.acp-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--home-ink, #264653);
}

.acp-eyebrow {
  margin-bottom: 5px;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.acp-card-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
}

.acp-card-body {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acp-appointment-card {
  border-color: rgba(208, 108, 82, 0.22);
}

.acp-appointment-card .acp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(208, 108, 82, 0.05), rgba(255, 255, 255, 0));
}

.acp-inline-action-card {
  border-style: solid;
}

.acp-inline-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.acp-inline-action-head .acp-action-row {
  flex: 0 0 auto;
}

.acp-card-text {
  margin: 0;
  font-size: 14px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
}

.acp-card--readonly .acp-card-title {
  color: var(--home-grey, #4b5563);
}

/* ---------- CTAs ---------- */

.acp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.acp-cta--primary {
  background: var(--home-accent, #d06c52);
  color: #fff;
  box-shadow: 0 8px 20px rgba(33, 79, 68, 0.12);
}

.acp-cta--ghost {
  background: #fff;
  color: var(--home-ink, #264653);
  border-color: var(--home-border, #e5e7eb);
}
.acp-cta--ghost:hover { background: #f7f8fa; }

.acp-cta--danger { color: var(--home-red, #a8342e); border-color: #f5bfbf; }

.acp-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Earlier-slot alert opt-in on the booked-session card (issue #235). A quiet,
   secondary row: it must read as an offer, not as another booking action, so it
   sits below the button row with no button styling of its own. */
.acp-alert-optin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--home-ink, #264653);
  cursor: pointer;
}

.acp-alert-optin input {
  /* Nudge the box onto the first line's optical centre; a bare checkbox sits
     high against 14px/1.45 text. */
  margin-top: 2px;
  flex: 0 0 auto;
}

.acp-alert-optin small {
  display: block;
  margin-top: 2px;
  color: var(--home-muted, #6b7a80);
}

.acp-action-row {
  display: flex;
  justify-content: flex-start;
}

.acp-action-row .acp-cta {
  width: auto;
}

/* Evidence breakdown (issue #80): one row per category (Interviews /
   Assessments / Uploads) inside the "Evidence needed" card, each with a
   count/progress line and a deep-link CTA. */
.acp-evidence-cat-list {
  display: flex;
  flex-direction: column;
  /* Inset the rows so they line up with the card head's horizontal padding.
     Issue #80 added this list but never padded it, so the rows sat flush to
     the card edge — the icon stuck out left of the "Evidence needed" header
     and the CTA hugged the right border. Match the base .acp-card-head /
     .acp-card-body inset (18px); the patient shell bumps this to 20px to
     match its own wider head padding. */
  padding: 0 18px;
}

.acp-evidence-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--home-border, #e5e7eb);
}
.acp-evidence-cat:first-child { border-top: 0; }

.acp-evidence-cat-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.acp-evidence-cat-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 70, 83, 0.06);
  color: var(--home-ink, #264653);
}

.acp-evidence-cat-text { min-width: 0; }

.acp-evidence-cat-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--home-ink, #264653);
}

.acp-evidence-cat-meta {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--home-ink-dim, #6b7a82);
  margin-top: 1px;
}

.acp-evidence-cat .acp-cta {
  width: auto;
  flex: 0 0 auto;
}

/* CTA-less completed row (e.g. all interviews done — there is no wizard step
   to revisit, so the row shows a quiet Done badge instead of a dead link). */
.acp-evidence-cat-done {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--home-green, #059669);
}

/* On narrow widths, let the CTA drop below the label instead of crushing it. */
@media (max-width: 520px) {
  .acp-evidence-cat {
    flex-direction: column;
    align-items: stretch;
  }
  .acp-evidence-cat .acp-cta { width: 100%; }
}

.acp-payment-section {
  width: min(860px, 100%);
}

.acp-payment-section .pcc {
  max-width: 720px;
}

/* ---------- Banners ---------- */

.acp-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
}
.acp-banner--error {
  background: #fdf0f0;
  color: #7a2424;
  border: 1px solid #f5bfbf;
}

/* ---------- Booking slot picker ---------- */

.acp-slot-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acp-day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.acp-day-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--home-border, #e5e7eb);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.acp-day-btn--active {
  background: var(--home-accent, #2c5f7f);
  color: #fff;
  border-color: var(--home-accent, #2c5f7f);
}

.acp-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.acp-time-btn {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--home-border, #e5e7eb);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.acp-time-btn--active {
  background: var(--home-accent, #2c5f7f);
  color: #fff;
  border-color: var(--home-accent, #2c5f7f);
}

.acp-slot-actions {
  display: flex;
  justify-content: flex-end;
}

.acp-empty,
.acp-empty-line {
  text-align: center;
  padding: 16px;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
  font-size: 13px;
}

/* ---------- Booking summary ---------- */

.acp-booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  font-size: 13.5px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
}

/* Each meta item (e.g. the clinician) is an icon + label; without this the
   icon sits flush against the name. */
.acp-booking-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.acp-booking-meta > span > i {
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.5));
  font-size: 12px;
  width: 14px;
  text-align: center;
  flex: none;
}

.acp-booking-notes {
  font-style: italic;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
}

/* ---------- Waiting state ---------- */

.acp-waiting {
  align-items: flex-start;
  flex-direction: row;
  gap: 12px;
  padding: 18px;
  text-align: left;
}

.acp-waiting-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(208, 108, 82, 0.10);
  color: var(--home-accent, #2c5f7f);
  font-size: 15px;
}

.acp-waiting-text {
  margin: 0;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
  font-size: 14px;
  margin-top: 5px
}

/* ---------- Structured report ---------- */

.acp-report {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.acp-report-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acp-report-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--home-accent-text, #1d3f55);
  letter-spacing: 0.01em;
}

.acp-report-subsection { margin-top: 6px; }

.acp-report-subheading {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acp-report-text {
  margin: 0;
  font-size: 14px;
  color: var(--home-ink, #264653);
  line-height: 1.5;
}

.acp-report-list {
  margin: 2px 0 0;
  padding-left: 20px;
  color: var(--home-ink, #264653);
  font-size: 14px;
  line-height: 1.5;
}

.acp-report-empty {
  margin: 0;
  color: var(--home-ink-dim, rgba(38, 70, 83, 0.52));
  font-style: italic;
}

.acp-report-raw {
  margin: 0;
  padding: 12px;
  background: #f7f8fa;
  border-radius: 8px;
  font-size: 12px;
  overflow-x: auto;
}

@media (min-width: 640px) {
  #aci-patient-app { padding: 40px 24px 64px; }
}

@media (max-width: 640px) {
  .acp-inline-action-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 960px) {
  #aci-patient-app {
    max-width: min(860px, calc(100vw - 48px));
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 36px;
    box-shadow: 0 28px 80px rgba(38, 70, 83, 0.14);
    padding: 32px 40px 48px;
    min-height: calc(100dvh - 48px);
  }
  /* body {
    padding: 24px;
  } */
}

/* ===================================================================== */
/* Support letters from the clinician (#111) — report-stage download card */
/* ===================================================================== */
.acp-letters-card { margin-top: 14px; }

.acp-letter-list {
  gap: 8px;
}

.acp-letter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.14));
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.acp-letter-row:hover {
  border-color: rgba(208, 108, 82, 0.4);
  background: rgba(208, 108, 82, 0.04);
  box-shadow: 0 2px 10px rgba(38, 70, 83, 0.08);
}

.acp-letter-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(208, 108, 82, 0.12);
  color: var(--home-accent, #d06c52);
  font-size: 16px;
}

.acp-letter-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.acp-letter-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--home-ink, #264653);
  overflow-wrap: anywhere;
}

.acp-letter-meta {
  font-size: 12px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
  margin-top: 1px;
}

.acp-letter-dl {
  flex: 0 0 auto;
  color: var(--home-accent, #d06c52);
  font-size: 14px;
}

/* ===================================================================== */
/* Form-fill requests (#215) — report-stage "send a form" card            */
/* ===================================================================== */
.acp-form-fill-card { margin-top: 14px; }

.acp-ff-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.acp-ff-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.14));
  border-radius: 12px;
  background: #fff;
}

.acp-ff-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 70, 83, 0.08);
  color: var(--home-ink, #264653);
  font-size: 16px;
}

.acp-ff-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acp-ff-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--home-ink, #264653);
  overflow-wrap: anywhere;
}

/* Filename links to the patient's own uploaded file; keep it reading as a
   filename (not accent-coloured like the download CTA) until hover. */
.acp-ff-name--link {
  text-decoration: none;
  cursor: pointer;
}

.acp-ff-name--link:hover,
.acp-ff-name--link:focus-visible {
  color: var(--home-accent, #d06c52);
  text-decoration: underline;
}

.acp-ff-status {
  font-size: 12px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
}

.acp-ff-reason {
  font-size: 12px;
  color: var(--home-ink, #264653);
  background: rgba(38, 70, 83, 0.05);
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 4px;
}

.acp-ff-download {
  font-size: 13px;
  font-weight: 600;
  color: var(--home-accent, #d06c52);
  text-decoration: none;
  margin-top: 4px;
}

.acp-ff-download:hover { text-decoration: underline; }

.acp-ff-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* File picker: the native input renders as an OS-default button that clashes
   with the card's pill CTAs, so it is visually hidden (kept focusable and
   still the label's control) behind a ghost-CTA-styled span. */
.acp-ff-file-label {
  /* Positioned so the hidden input below can anchor to THIS label. Without it
     the absolutely-positioned input resolved against the page (offsetParent
     BODY) and sat ~20px away from its own button; clicking "Choose a file"
     focused it and the browser scrolled the page to wherever it had landed,
     which read as the layout breaking on click. */
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
}

/* The native input renders as an OS-default button, so it is transparent and
   stretched over the whole label instead of shrunk to a 1px sliver: it stays
   focusable and clickable exactly where it appears, so focusing it can never
   scroll the page somewhere else. */
.acp-ff-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.acp-ff-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--home-border, #e5e7eb);
  background: #fff;
  color: var(--home-ink, #264653);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.acp-ff-file-label:hover .acp-ff-file-btn { background: #f7f8fa; }

/* Mirror the app's focus ring, since the real input is the hidden element. */
.acp-ff-file-input:focus-visible + .acp-ff-file-btn {
  border-color: var(--home-accent, #d06c52);
  box-shadow: 0 0 0 3px rgba(208, 108, 82, 0.22);
}

.acp-ff-file-name {
  font-size: 13px;
  color: var(--home-ink-soft, rgba(38, 70, 83, 0.72));
  overflow-wrap: anywhere;
}

.acp-ff-note {
  width: 100%;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.14));
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.acp-ff-actions {
  display: flex;
  justify-content: flex-end;
}

.acp-ff-error {
  font-size: 13px;
  color: #b3261e;
  background: rgba(179, 38, 30, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
}

/* -- Reschedule modal ----------------------------------------------------
   The booked card's Reschedule opens the BookingSlotPicker in the shared
   ps-modal-overlay chrome instead of expanding the card inline. Wider than
   the base ps-modal so the day dropdown + time grid breathe; the picker
   brings its own heading, so the modal chrome is just the close button. */
.acp-reschedule-modal {
  position: relative;
  width: min(600px, 100%);
}

.acp-reschedule-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

/* -- Cancel-session modal ------------------------------------------------
   The booked card's Cancel opens a confirm modal (shared ps-modal chrome)
   showing the session being given up, what cancelling does, and an
   optional reason, instead of a bare window.confirm. */
.acp-cancel-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.14));
  border-radius: 12px;
  background: var(--ps-surface-soft, rgba(38, 70, 83, 0.04));
  font-size: 14px;
}

.acp-cancel-summary-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.acp-cancel-summary-row i {
  color: var(--ps-text-soft, #5a6b72);
}

.acp-cancel-reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ps-text-soft, #5a6b72);
}

.acp-cancel-reason textarea {
  border: 1px solid var(--home-border, rgba(38, 70, 83, 0.14));
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.acp-cancel-actions {
  justify-content: flex-end;
}

/* -- Earlier-time alert opt-in ------------------------------------------
   The native (blue) checkbox read as foreign next to the terracotta
   controls; accent-color re-skins it to the app palette and the row gets
   the card's type rhythm. */
.acp-alert-optin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--ps-text, #2c3a40);
}

.acp-alert-optin input[type="checkbox"] {
  accent-color: var(--ps-accent, #d06c52);
  width: 17px;
  height: 17px;
  margin-top: 2px;
  cursor: pointer;
  flex: none;
}

.acp-alert-optin span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acp-alert-optin small {
  font-size: 12.5px;
  color: var(--ps-text-soft, #5a6b72);
}

/* The reassurance line only shows while the box is ticked. The base rule
   above (and the one in the non-shell block) sets `display: block` on this
   element, which would otherwise beat the `hidden` attribute outright. */
.acp-alert-optin small[hidden] {
  display: none;
}

/* Live countdown under the booked card's date line. */
.acp-session-countdown {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ps-accent-text, #9e3b1b);
}
