/* Find A Vendor — vendor application portal (/apply).
   Loaded after /styles.css and /coming-soon.css (which supplies the wizard, field and
   sign-in styles). Only portal-specific layout lives here, built on the shared tokens. */

.ap-main { padding: 46px 0 96px; min-height: calc(100vh - 74px - 90px); }

/* Header account bar */
.ap-page .header-inner { gap: 16px; }
/* Header: markup mirrors the coming-soon page or app.js header(), set by apply.js */
.ap-page .header-actions { min-width: 0; }
.ap-page .main-nav a[aria-current="page"] { color: var(--apricot); }
.ap-who { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; min-width: 0; }
.ap-who strong { color: var(--ink); }

/* Page heading */
.ap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; margin-bottom: 30px; }
.ap-head > div { min-width: 0; max-width: 720px; }
.ap-head p { margin: 0; }
.ap-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1; margin: 0 0 12px; overflow-wrap: anywhere; }

/* Changes requested */
.ap-changes { display: grid; gap: 12px; justify-items: start; margin-bottom: 28px; padding: 22px 24px; border: 1px solid var(--yellow); border-left: 6px solid var(--apricot); border-radius: 18px; background: #fff8df; }
.ap-changes h2 { font-family: var(--sans); font-size: 1.3rem; letter-spacing: -.02em; margin: 0; }
.ap-changes p { margin: 0; color: var(--ink-2); }
.ap-note { margin: 0; padding: 14px 18px; border-left: 4px solid var(--apricot); border-radius: 0 12px 12px 0; background: var(--white); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; justify-self: stretch; }

/* Editor layout: steps | card | checklist */
.ap-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr) 280px; grid-template-areas: "progress card side"; gap: 28px; align-items: start; }
.ap-progress { grid-area: progress; position: sticky; top: 96px; }
.ap-card { grid-area: card; }
.ap-side { grid-area: side; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; border-radius: 20px; }
.ap-side:empty { display: none; }

.ap-progress .cs-progress-label { display: grid; gap: 1px; min-width: 0; }
.ap-step-state { font-size: .72rem; font-weight: 650; color: var(--muted); }
.cs-progress-item.is-complete .ap-step-state { color: var(--success); }
.cs-progress-item.is-incomplete .ap-step-state { color: #8a6d12; }
.cs-progress-item.is-error .ap-step-state { color: var(--danger); }
.ap-step-count-state { margin-left: 6px; color: var(--muted); }

.ap-page .field.is-readonly input { background: var(--paper); color: var(--ink-2); cursor: default; }
.ap-flush { margin: 0; }

/* Review step: what's still missing */
.ap-todo { margin-bottom: 16px; }
.ap-todo ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ap-todo li { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 14px; flex-wrap: wrap; }

/* Approval checklist */
.ap-req { background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ap-req summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.ap-req summary::-webkit-details-marker { display: none; }
.ap-req summary::after { content: "+"; margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 1rem; transition: transform .2s ease; }
.ap-req[open] summary::after { transform: rotate(45deg); }
.ap-req-title { font-weight: 800; font-size: .95rem; }
.ap-req-count { font-size: .74rem; font-weight: 750; color: var(--muted); }
.ap-req-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.ap-req-body > p { margin: 14px 0; }
.ap-req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ap-req-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.ap-req-icon { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #b9b5ab; display: grid; place-items: center; font-size: .7rem; font-weight: 900; color: var(--white); }
.ap-req-list .is-met .ap-req-icon { background: var(--success); border-color: var(--success); }
.ap-req-label { margin: 0; font-size: .86rem; font-weight: 700; color: var(--ink); }
.ap-req-tag { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: var(--paper-deep); color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.ap-req-tag.is-done { background: #e5f4e9; color: var(--success); }

/* Quote on request explanation (services step) */
.ap-quote-hint { margin: -8px 0 0; padding: 11px 14px; border-radius: 12px; background: #e2edf5; color: #285978; font-size: .85rem; font-weight: 650; }
.ap-req-detail { margin: 2px 0 0; font-size: .78rem; }

/* Read-only states */
.ap-status-card {
  display: grid; gap: 12px; justify-items: start; margin-bottom: 30px;
  background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--sage); border-radius: 26px;
  padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow);
}
.ap-status-card.is-submitted { border-top-color: #285978; }
.ap-status-card.is-approved { border-top-color: var(--success); background: linear-gradient(180deg, #f2f9f4, var(--white) 60%); }
.ap-status-card.is-rejected { border-top-color: var(--danger); }
.ap-status-card .eyebrow { margin-bottom: 0; }
.ap-status-card .success-mark { margin-bottom: 4px; }
.ap-status-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.04; margin: 0; overflow-wrap: anywhere; }
.ap-status-card p { margin: 0; max-width: 660px; }
.ap-status-card a:not(.btn) { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ap-status-meta { color: var(--ink-2); font-weight: 650; }
.ap-status-meta:empty { display: none; }
.ap-confirm { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); max-width: 660px; }
.ap-confirm .cs-error:empty { display: none; }

.ap-readonly { display: grid; gap: 28px; align-items: start; }
.ap-readonly.has-side { grid-template-columns: minmax(0, 1fr) 300px; }
.ap-readonly .ap-side { grid-area: auto; }
.ap-summary h2 { font-family: var(--sans); font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 16px; }

/* Signed-out, sign-in and error views */
.ap-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: start; max-width: 1040px; margin-inline: auto; }
.ap-auth-copy p { max-width: 460px; }
.ap-state { justify-items: start; }
.ap-state .ap-title { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.ap-state .success-mark { margin-bottom: 4px; }

@media (max-width: 1180px) {
  .ap-layout { grid-template-columns: 236px minmax(0, 1fr); grid-template-areas: "progress side" "progress card"; }
  .ap-side { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 900px) {
  .ap-main { padding-top: 30px; }
  .ap-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "progress" "side" "card"; gap: 16px; }
  .ap-progress { position: static; }
  .ap-progress .cs-aside-note { display: none; }
  .ap-page .cs-progress-num { box-shadow: 0 0 0 4px var(--paper); }
  .ap-readonly.has-side { grid-template-columns: minmax(0, 1fr); }
  .ap-auth { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 590px) {
  .ap-page .header-inner { gap: 10px; }
  .ap-who { max-width: calc(100vw - 270px); font-size: .74rem; }
  .ap-head { margin-bottom: 22px; }
  .ap-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .ap-changes { padding: 18px; }
  .ap-status-card { border-radius: 20px; }
}

/* Verification document uploads (credentials step) */
.ap-docs { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0; }
.ap-docs legend { font-weight: 800; padding: 0 6px; }
.ap-doc-list { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 6px; }
.ap-doc-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .9rem; overflow-wrap: anywhere; }
.ap-doc-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; }
.ap-doc-upload label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
.ap-doc-upload select, .ap-doc-upload input[type="file"] { width: 100%; }
@media (max-width: 640px) { .ap-doc-upload { grid-template-columns: 1fr; } }
