/* cdob-wholesale.css | v0.2.0 | 2026-08-02 | Generated by Claude, session CDOB-WOO-S11
   (v0.1.0 2026-07-30 CDOB-WOO-S7)
   Wholesale unit W3: the public application form and the wp-admin approval screen.
   v0.2.0 (CDOB-WOO-S11): + the wholesale ACCOUNT surface
   ([cdob_wholesale_account], parts/cdob-wholesale-account.php) on the front
   end, and the approvals screen's Tax-and-permit column on the admin side.
   Front-end additions use ONLY theme-token pairs already derived in
   cdob-core.css (paper on navy 10.39, paper on ink 16.49, navy on paper
   10.39, meta on paper 7.46, fir on paper 9.76); the admin additions reuse
   this sheet's local token layer (ok on wash 5.74 UI accent, ink on surface
   15.89). No new color pair is introduced anywhere in this version.

   THIS SHEET ADDS ONLY WHAT IS MISSING. The application form is built entirely
   from the existing cdob-forms.css baseline (.cdob-form-wrap / -header /
   -eyebrow / -title / -subtitle, .cdob-form, .cdob-field, .cdob-field-row,
   .cdob-cols-2, .cdob-label, .cdob-req, .cdob-input, .cdob-input-error,
   .cdob-field-msg(+.is-visible), .cdob-hint, .cdob-hp, .cdob-form-notice(+-ok),
   .cdob-form-actions, .cdob-form-submit) plus the theme .cdob-btn. Two rules
   below are all the front end needed; no parallel form ruleset exists here.

   TWO CONTEXTS, TWO COLOR SOURCES, and the reason is structural.
   The front-end block resolves the theme token layer (cdob-core.css :root:
   --cdob-* colors, --cdob-ff-*, the --fs-* scale, --cdob-tap-min) exactly as
   cdob-forms.css does, and introduces no color of its own.
   The admin block CANNOT. cdob-core.css is a FRONT-END stylesheet; it is not
   loaded in wp-admin, so var(--cdob-navy) resolves to nothing there and any rule
   depending on it renders unstyled. Rather than hardcode hex at points of use
   (guardrail 5.2), the admin block declares a small local token layer scoped to
   .cdob-wh-admin and every admin rule below references it. One place to retune,
   no raw hex in a declaration that paints something.

   The admin token values are WordPress's own admin palette, chosen so the screen
   sits inside wp-admin rather than beside it. Contrast for every pair this sheet
   actually paints, sRGB-linearized per RC_A11Y_TOKEN_HYGIENE.md (relative
   luminance L = 0.2126R + 0.7152G + 0.0722B over linearized channels; no linear
   approximations):

     --cdob-wh-a-ink       #1d2327  L 0.016092
     --cdob-wh-a-meta      #50575e  L 0.093301
     --cdob-wh-a-surface   #ffffff  L 1.000000
     --cdob-wh-a-wash      #f0f0f1  L 0.871950
     --cdob-wh-a-warn-bg   #fcf9e8  L 0.942729
     --cdob-wh-a-warn      #7a5a00  L 0.114491
     --cdob-wh-a-danger    #8a1f11  L 0.064231
     --cdob-wh-a-ok        #1a6b3c  L 0.110797
     --cdob-wh-a-line      #c3c4c7  L 0.552007

     ink on surface       15.89:1  body text, headings, table cells        PASS 4.5
     ink on warn-bg       15.02:1  the removal-is-not-revocation block     PASS 4.5
     ink on wash          13.95:1  badge text                              PASS 4.5
     meta on surface       7.33:1  timestamps, secondary lines             PASS 4.5
     meta on wash          6.43:1  the "None" badge accent                 PASS 3.0 (UI)
     danger on surface     9.19:1  operator warning text                   PASS 4.5
     danger on warn-bg     8.69:1  operator warning text in the block      PASS 4.5
     danger on wash        8.07:1  suspended badge accent                  PASS 3.0 (UI)
     ok on wash            5.73:1  approved badge accent                   PASS 3.0 (UI)
     warn on warn-bg       6.04:1  the block's 4px accent border           PASS 3.0 (UI)
     line on surface       1.74:1  card and table hairlines: DECORATIVE

   The card/table hairline is decorative and is the ONLY sub-3:1 value here: it
   separates regions that are already separated by whitespace and heading
   structure, carries no state, and is never the boundary of an interactive
   control. Field boundaries and control boundaries on this screen are drawn by
   core's own .button and .widefat rules, which are outside this sheet.

   STATE IS NEVER CARRIED BY COLOR ALONE (WCAG 1.4.1). Every badge prints its
   status as words; the accent border reinforces. Every operator warning is a
   sentence, not a red dot. The suspend confirmation is a text prompt.

   Enqueued from the cdob-starter PLUGIN: front end from the loader when the
   [cdob_wholesale_apply] shortcode is present, admin from
   cdob_wh_admin_enqueue() on the approvals screen only. Versioned by
   CDOB_STARTER_PLUGIN_VERSION so its cache-bust is decoupled from the theme
   $css_ver (plan section 7). */

/* ============================================================
   Front end: [cdob_wholesale_apply]
   Over the cdob-forms.css baseline. Two rules, no colors.
   ============================================================ */

/* The application is denser than the 520px auth forms (seven fields including a
   multi-line one), so it takes the profile editor's wider measure. */
.cdob-wha-wrap {
  max-width: 680px;
}

/* Shape only; the box, border, focus ring, and 44px tap floor all come from
   .cdob-input in cdob-forms.css. */
.cdob-wha-textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

/* ============================================================
   Front end: [cdob_wholesale_account] (v0.2.0)
   Over the cdob-forms.css baseline; theme-token pairs only.

   SPECIFICITY CONTRACT (lesson 148; a11y review S11): the surface renders
   inside the theme's .cdob-prose container, whose element rules
   (.cdob-prose p / .cdob-prose h3, (0,1,1)) outrank a bare component
   class. Every rule on a p or h3 element therefore compounds on the
   .cdob-whacct-wrap ancestor ((0,2,0)); and every text link this block
   owns pins :hover to navy + underline, because the theme's global
   a:hover paints flame, 3.51:1 on paper, a WCAG 1.4.3 fail.
   ============================================================ */

.cdob-whacct-wrap {
  max-width: 680px;
}

/* Status panel. The badge WORD carries the state; the fill reinforces it.
   Approved: paper on navy 10.39. Suspended: paper on ink 16.49. Pending,
   none, and reviewed: navy on paper 10.39 with a solid navy border (the
   border is the same full-strength navy). Non-interactive spans; no focus
   state applies. */
.cdob-whacct-status {
  margin: 0 0 8px;
}
.cdob-whacct-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: var(--fs-400);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--cdob-navy);
  color: var(--cdob-paper); /* 10.39:1 */
}
.cdob-whacct-badge.is-pending,
.cdob-whacct-badge.is-none {
  background: var(--cdob-paper);
  color: var(--cdob-navy); /* 10.39:1 */
  border: 2px solid var(--cdob-navy);
}
.cdob-whacct-badge.is-suspended {
  background: var(--cdob-ink);
  color: var(--cdob-paper); /* 16.49:1 */
}
.cdob-whacct-wrap .cdob-whacct-statusbody {
  margin: 10px 0 0;
}
.cdob-whacct-wrap .cdob-whacct-links {
  margin: 8px 0 0;
  font-weight: 600; /* navy links from the theme base rule, 10.39:1 */
}
.cdob-whacct-wrap .cdob-whacct-links a:hover,
.cdob-whacct-wrap .cdob-whacct-permitfile a:hover {
  color: var(--cdob-navy); /* hold 10.39:1; never the 3.51:1 global flame */
  text-decoration: underline;
}
.cdob-whacct-wrap .cdob-whacct-tax {
  margin: 8px 0 0;
  color: var(--cdob-fir); /* 9.76:1 on paper */
  font-weight: 600;
}

/* Section blocks: whitespace + a decorative hairline divider (same posture
   as every hairline in this sheet: never carries state). */
.cdob-whacct-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--cdob-ui-border);
}
.cdob-whacct-wrap .cdob-whacct-heading {
  margin: 0 0 10px;
  font-family: var(--cdob-ff-serif);
  font-size: var(--fs-600);
  color: var(--cdob-navy); /* 10.39:1 */
}
.cdob-whacct-wrap .cdob-whacct-permitfile {
  margin: 0 0 6px;
}
.cdob-whacct-muted {
  color: var(--cdob-on-light-meta); /* 7.46:1 */
  font-size: var(--fs-400);
}

/* The native file input gets the baseline box but a lighter vertical
   rhythm; the selected-file feedback is the shared hint-swap script
   (lesson 169), which toggles this class. The .cdob-input 44px floor is
   never redeclared here. */
.cdob-whacct-file {
  padding: 10px 12px;
}
.cdob-sub-file-selected {
  color: var(--cdob-fir); /* 9.76:1; the changed TEXT is the signal */
  font-weight: 600;
}

/* ============================================================
   wp-admin: the approvals screen (.cdob-wh-admin)
   Local token layer, see the header for values and contrast.
   ============================================================ */

.cdob-wh-admin {
  --cdob-wh-a-ink: #1d2327;
  --cdob-wh-a-meta: #50575e;
  --cdob-wh-a-surface: #ffffff;
  --cdob-wh-a-wash: #f0f0f1;
  --cdob-wh-a-warn-bg: #fcf9e8;
  --cdob-wh-a-warn: #7a5a00;
  --cdob-wh-a-danger: #8a1f11;
  --cdob-wh-a-ok: #1a6b3c;
  --cdob-wh-a-line: #c3c4c7;
}

.cdob-wh-admin > h2 {
  margin-top: 32px;
  color: var(--cdob-wh-a-ink); /* 15.89:1 on surface */
}

.cdob-wh-admin-lede,
.cdob-wh-admin-empty {
  max-width: 76ch;
  color: var(--cdob-wh-a-meta); /* 7.33:1 on surface */
}

.cdob-wh-admin-muted {
  color: var(--cdob-wh-a-meta); /* 7.33:1 on surface */
}

/* The removal-is-not-revocation block. Deliberately loud: it is the one thing
   on this screen an operator can get catastrophically wrong. */
.cdob-wh-admin-warn {
  max-width: 76ch;
  margin: 20px 0 8px;
  padding: 16px 20px;
  background: var(--cdob-wh-a-warn-bg);
  border-left: 4px solid var(--cdob-wh-a-warn); /* 6.04:1 accent (UI 3:1) */
  color: var(--cdob-wh-a-ink); /* 15.02:1 on warn-bg */
}
.cdob-wh-admin-warn-title {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--cdob-wh-a-ink); /* 15.02:1 on warn-bg */
}
.cdob-wh-admin-warn p {
  margin: 0 0 10px;
  line-height: 1.6;
}
.cdob-wh-admin-warn p:last-child {
  margin-bottom: 0;
}

/* Per-row operator warnings (no account, not a member, your own row). The words
   carry the meaning; the color reinforces. */
.cdob-wh-admin-flag {
  display: inline-block;
  color: var(--cdob-wh-a-danger); /* 9.19:1 on surface, 8.69:1 on warn-bg */
  font-weight: 600;
  line-height: 1.5;
}

/* Pending application cards */
.cdob-wh-admin-card {
  max-width: 900px;
  margin: 0 0 20px;
  padding: 18px 22px;
  background: var(--cdob-wh-a-surface);
  border: 1px solid var(--cdob-wh-a-line); /* decorative hairline, no state */
}
.cdob-wh-admin-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--cdob-wh-a-ink); /* 15.89:1 */
}
.cdob-wh-admin-card-meta {
  margin: 0 0 14px;
  color: var(--cdob-wh-a-meta); /* 7.33:1 */
}

.cdob-wh-admin-fields {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 6px 20px;
  margin: 0 0 14px;
}
.cdob-wh-admin-fields dt {
  font-weight: 600;
  color: var(--cdob-wh-a-ink); /* 15.89:1 */
}
.cdob-wh-admin-fields dd {
  margin: 0;
  color: var(--cdob-wh-a-ink); /* 15.89:1 */
  overflow-wrap: anywhere; /* applicant-supplied text, may be unbroken */
  white-space: pre-wrap;   /* the resale-intent textarea keeps its line breaks */
}

.cdob-wh-admin-account {
  margin: 0 0 14px;
  color: var(--cdob-wh-a-ink); /* 15.89:1 */
}

/* Action rows: each button is its own nonce-bound form, so they need to sit
   inline rather than stacking one per line. */
.cdob-wh-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.cdob-wh-admin-actionform {
  display: inline-block;
  margin: 0;
}

.cdob-wh-admin-table {
  max-width: 1200px;
  margin-top: 12px;
}
.cdob-wh-admin-table td,
.cdob-wh-admin-table th {
  vertical-align: top;
  color: var(--cdob-wh-a-ink); /* 15.89:1 on the striped surface */
}

/* Status badges. The WORD is the status; the left accent reinforces it. */
.cdob-wh-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--cdob-wh-a-wash);
  border-left: 3px solid var(--cdob-wh-a-meta); /* default: 6.43:1 (UI 3:1) */
  color: var(--cdob-wh-a-ink); /* 13.95:1 on wash */
  font-weight: 600;
  white-space: nowrap;
}
.cdob-wh-badge.is-approved {
  border-left-color: var(--cdob-wh-a-ok); /* 5.73:1 on wash (UI 3:1) */
}
.cdob-wh-badge.is-suspended {
  border-left-color: var(--cdob-wh-a-danger); /* 8.07:1 on wash (UI 3:1) */
}
/* is-pending and is-none keep the default meta accent (6.43:1). */
/* v0.2.0: the Tax-and-permit column's exempt badge; the WORD is the state. */
.cdob-wh-badge.is-exempt {
  border-left-color: var(--cdob-wh-a-ok); /* 5.74:1 on wash (UI 3:1) */
}
.cdob-wh-admin-permitcell {
  min-width: 180px;
  line-height: 1.7;
}
/* v0.2.0: the pending card's permit line (between the field list and the
   account line). Ink on surface 15.89:1; the muted span inside it is the
   existing meta 7.33:1. */
.cdob-wh-admin-permitline {
  margin: 0 0 14px;
  color: var(--cdob-wh-a-ink);
}

@media (max-width: 782px) {
  .cdob-wh-admin-fields {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .cdob-wh-admin-fields dt {
    margin-top: 10px;
  }
}
