/* Apex Cosmetics: customer wholesale pages (round 17) — /wholesale, /wholesale/apply, /wholesale/order, /wholesale/checkout.
   Approved design: Preview/Pages/Wholesale/WholesaleArea.razor + Preview/assets/preview-site.css (.ph-wholesale, .ph-ws-*).
   Linked from each wholesale page's markup (not index.html), and every rule is under .cs-page .cs-ws, so nothing else is
   restyled. The page body sits inside .cs-page (cosmetics-storefront.css: ivory canvas, ink text, serif h1-h3): without it
   these pages showed app.css's black body with dark bootstrap text. Tokens come from .cs-page (--cs-*). */

.cs-page .cs-ws { padding-top: 24px; }
.cs-page .cs-ws-narrow { max-width: 760px; }
.cs-page .cs-ws-medium { max-width: 920px; }
.cs-page .cs-ws h1 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 8px; overflow-wrap: anywhere; }
.cs-page .cs-ws h2 { font-size: 22px; margin: 0 0 10px; }
.cs-page .cs-ws h3 { font-size: 17px; margin: 0 0 4px; font-family: var(--cs-sans); font-weight: 600; letter-spacing: 0; }
.cs-page .cs-ws section { margin: 28px 0 0; }
.cs-page .cs-ws-lead { font-size: 17px; color: var(--cs-ink); max-width: 62ch; }
.cs-page .cs-ws-intro { color: #374151; margin-bottom: 18px; }
.cs-page .cs-ws ul, .cs-page .cs-ws ol { margin: 0; }
.cs-page .cs-ws-steps { display: grid; gap: 10px; padding-left: 22px; }
.cs-page .cs-ws-steps li::marker { color: var(--cs-cobalt); font-weight: 700; }

/* Cards and notes */
.cs-page .cs-ws-card { padding: 20px; border: 1px solid var(--cs-line); border-radius: 12px; background: var(--cs-white); min-width: 0; }
.cs-page .cs-ws-card + .cs-ws-card { margin-top: 16px; }
.cs-page .cs-ws-note { padding: 14px 16px; border-radius: 8px; background: var(--cs-tint); color: var(--cs-ink); font-size: 15px; }
.cs-page .cs-ws-note.is-ok { background: #e8f5ec; color: #14532d; }
.cs-page .cs-ws-note.is-warn { background: #fef3c7; color: #5b3a05; }
.cs-page .cs-ws-note.is-muted { background: var(--cs-soft); color: var(--cs-ink); }
.cs-page .cs-ws-note a { color: inherit; font-weight: 600; text-decoration: underline; }
.cs-page .cs-ws-note p + p, .cs-page .cs-ws-note p + div { margin-top: 6px; }
.cs-page .cs-ws-error { color: #9f1239; font-size: 14px; font-weight: 500; }

/* Buttons (cosmetics-storefront.css .cs-btn) */
.cs-page .cs-ws-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.cs-page .cs-ws .cs-btn { text-decoration: none; }
.cs-page .cs-ws .cs-btn:disabled, .cs-page .cs-ws .cs-btn[disabled] { background: #d5dae3; color: #374151 !important; border-color: transparent; cursor: not-allowed; }
.cs-page .cs-ws .cs-btn-block { width: 100%; }
.cs-page .cs-ws-link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--cs-cobalt); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.cs-page .cs-ws-link-btn:hover { color: var(--cs-cobalt-dark); }

/* Program page questions */
.cs-page .cs-ws-faq { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cs-page .cs-ws-faq details { border: 1px solid var(--cs-line); border-radius: 8px; background: var(--cs-white); }
.cs-page .cs-ws-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 600; list-style: none; }
.cs-page .cs-ws-faq summary::-webkit-details-marker { display: none; }
.cs-page .cs-ws-faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--cs-ink); border-bottom: 2px solid var(--cs-ink); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.cs-page .cs-ws-faq details[open] summary::after { transform: rotate(-135deg); }
.cs-page .cs-ws-faq summary:focus-visible { outline-offset: -2px; border-radius: 8px; }
.cs-page .cs-ws-faq details > p { padding: 0 16px 16px; color: #374151; font-size: 15px; line-height: 1.6; }
.cs-page .cs-ws-contact { margin-top: 16px; font-size: 15px; color: #374151; }

/* Application form */
.cs-page .cs-ws-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cs-page .cs-ws-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cs-page .cs-ws-field-wide { grid-column: 1 / -1; }
.cs-page .cs-ws-field label { padding: 0; font-size: 14px; font-weight: 600; color: var(--cs-ink); }
.cs-page .cs-ws-field .cs-ws-hint { font-weight: 400; color: var(--cs-muted); }
.cs-page .cs-ws input:not([type=radio]):not([type=checkbox]), .cs-page .cs-ws select, .cs-page .cs-ws textarea {
    width: 100%; max-width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9cdd6; border-radius: 6px; background: var(--cs-white);
    color: var(--cs-ink); font-size: 16px; line-height: 1.4; box-shadow: none; }
.cs-page .cs-ws textarea { min-height: 96px; resize: vertical; }
.cs-page .cs-ws input:disabled { background: var(--cs-soft); color: var(--cs-muted); }
.cs-page .cs-ws input:focus, .cs-page .cs-ws select:focus, .cs-page .cs-ws textarea:focus { border-color: var(--cs-cobalt); outline: 2px solid rgba(31, 85, 214, .25); outline-offset: 0; }
.cs-page .cs-ws-form-foot { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* Ordering: tier cards, explainer, details */
.cs-page .cs-ws-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 6px 0 12px; padding: 0; list-style: none; }
.cs-page .cs-ws-tier { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--cs-line); border-radius: 8px; background: var(--cs-white); font-size: 14px; color: #374151; }
.cs-page .cs-ws-tier strong { font-size: 17px; color: #10213A; }
.cs-page .cs-ws-tier.is-active { border-color: var(--cs-cobalt); box-shadow: 0 0 0 1px var(--cs-cobalt) inset; background: #f5f8ff; }
.cs-page .cs-ws-tier-flag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cs-cobalt); }
.cs-page .cs-ws-explainer { font-size: 16px; margin: 4px 0 2px; }
.cs-page .cs-ws-example { font-size: 14px; color: var(--cs-muted); margin-bottom: 8px; }
.cs-page .cs-ws-details { margin: 8px 0 18px; font-size: 14px; }
.cs-page .cs-ws-details summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--cs-cobalt); }
.cs-page .cs-ws-details ul { display: grid; gap: 4px; padding-left: 20px; color: #374151; }

/* Ordering: layout, catalog table, quantity stepper */
.cs-page .cs-ws-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cs-page .cs-ws-table-wrap { overflow-x: auto; border: 1px solid var(--cs-line); border-radius: 12px; background: var(--cs-white); }
.cs-page .cs-ws-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--cs-ink); }
.cs-page .cs-ws-table th, .cs-page .cs-ws-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--cs-line); }
.cs-page .cs-ws-table th { background: #f3f6fb; font-weight: 600; white-space: nowrap; color: var(--cs-ink); }
.cs-page .cs-ws-table th small { display: block; font-weight: 500; color: var(--cs-muted); font-size: 12px; }
.cs-page .cs-ws-table tbody tr:last-child td { border-bottom: 0; }
.cs-page .cs-ws-table .cs-ws-num { text-align: right; white-space: nowrap; }
.cs-page .cs-ws-table .is-on { background: #eef3ff; }
.cs-page .cs-ws-variant { display: block; font-size: 13px; color: var(--cs-muted); }
.cs-page .cs-ws-stepper { display: inline-flex; align-items: center; gap: 4px; }
.cs-page .cs-ws-stepper button { min-width: 44px; height: 44px; border: 1px solid #c9cdd6; border-radius: 6px; background: var(--cs-white); color: #10213A; font-size: 15px; font-weight: 700; cursor: pointer; }
.cs-page .cs-ws-stepper button:hover { border-color: var(--cs-navy); }
.cs-page .cs-ws .cs-ws-stepper input { width: 72px; min-height: 44px; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; }

/* Ordering: wholesale cart summary */
.cs-page .cs-ws-cart { position: sticky; top: 88px; display: grid; gap: 8px; }
.cs-page .cs-ws-cart h2 { font-size: 20px; margin-bottom: 4px; }
.cs-page .cs-ws-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.cs-page .cs-ws-row-total { padding-top: 10px; border-top: 1px solid var(--cs-line); font-size: 17px; }
.cs-page .cs-ws-next { padding: 10px 12px; border-radius: 6px; background: #fff4e5; color: #5c3200; font-size: 14px; }
.cs-page .cs-ws-next ul { padding-left: 18px; }
.cs-page .cs-ws-problem { color: #9f1239; font-size: 14px; }
.cs-page .cs-ws-history { display: grid; gap: 6px; padding: 0; list-style: none; }
.cs-page .cs-ws-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; }

/* Checkout */
.cs-page .cs-ws-lines { display: grid; gap: 6px; padding: 0; list-style: none; font-size: 15px; }
.cs-page .cs-ws-lines li { display: flex; justify-content: space-between; gap: 12px; }
.cs-page .cs-ws-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.cs-page .cs-ws-radio input { width: 18px; height: 18px; accent-color: var(--cs-cobalt); }
.cs-page .cs-ws-check-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cs-page .cs-ws-check-form .s2 { grid-column: span 2; }
.cs-page .cs-ws-check-form .s3 { grid-column: span 3; }
.cs-page .cs-ws-check-form .s6 { grid-column: 1 / -1; }

@media (max-width: 900px) {
    .cs-page .cs-ws-order-layout { grid-template-columns: minmax(0, 1fr); }
    .cs-page .cs-ws-cart { position: static; }
}

@media (max-width: 760px) {
    .cs-page .cs-ws { padding-top: 16px; }
    .cs-page .cs-ws-form { grid-template-columns: minmax(0, 1fr); }
    .cs-page .cs-ws-card { padding: 16px; }
    .cs-page .cs-ws-actions .cs-btn { flex: 1 1 100%; }
    .cs-page .cs-ws-check-form { grid-template-columns: minmax(0, 1fr); }
    .cs-page .cs-ws-check-form .s2, .cs-page .cs-ws-check-form .s3 { grid-column: 1 / -1; }
    /* Catalog table becomes one card per product, each cell labelled (the preview's mobile layout). */
    .cs-page .cs-ws-table-wrap { border: 0; background: none; overflow: visible; }
    .cs-page .cs-ws-table thead { display: none; }
    .cs-page .cs-ws-table, .cs-page .cs-ws-table tbody, .cs-page .cs-ws-table tr, .cs-page .cs-ws-table td { display: block; width: 100%; }
    .cs-page .cs-ws-table tr { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--cs-line); border-radius: 10px; background: var(--cs-white); }
    .cs-page .cs-ws-table td { padding: 3px 0; border: 0; text-align: left; }
    .cs-page .cs-ws-table .cs-ws-num { text-align: left; }
    .cs-page .cs-ws-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--cs-muted); }
    .cs-page .cs-ws-table td.cs-ws-qty-cell { padding-top: 8px; }
}
