/* ==========================================================================
   AX-UI — AdvisorX Admin Design System
   --------------------------------------------------------------------------
   A small, dependency-free layer of design tokens + layout/component
   primitives shared by every admin screen (tab / microapp).

   Conventions
   -----------
   .ax-block            component
   .ax-block__element   part of a component
   .ax-block--variant   permanent variant chosen at author time
   .is-state            runtime state toggled by Vue (active, invalid, dirty…)

   Everything is scoped under `.ax-app` so it (a) cannot leak into the host
   WordPress theme and (b) reliably out-specifies theme styles for buttons,
   inputs and headings. Put `class="ax-app ax-app--yourscreen"` on the root
   element of a screen and compose the primitives below.

   See ./README.md for the "add a new tab" recipe.
   ========================================================================== */

/* --------------------------------------------------------------------------
    1. Tokens
    Override any of these on `.ax-app--yourscreen` to re-skin a single screen
    without touching a component rule.

    Type and spacing are NOT defined here — they are inherited from AutomaticCSS
    and used directly:

      type     --text-s --text-m --text-l --text-xl --text-xxl, --h1…--h6
      spacing  --space-xs --space-s --space-m --space-l --space-xl --space-xxl

    The app uses a deliberately small slice of both. Type: --text-m is the
    default, --text-s is the only smaller step, --text-l and up are for titles;
    headings take --h1…--h6. Spacing: --space-xs inside a control (padding,
    label/control gaps), --space-m between siblings and for container padding,
    --space-l for major separations (section to section, the tab bar). Three
    steps, in that order — the inherited scale has nothing finer than --space-xs.
    -------------------------------------------------------------------------- */

.ax-app {
    /* Brand */
    --ax-accent: #0b63ce;
    --ax-accent-ink: #0b4f9e;
    --ax-accent-contrast: #fff;
    --ax-accent-soft: rgba(11, 99, 206, 0.1);
    --ax-accent-line: rgba(11, 99, 206, 0.15);

    /* Semantic */
    --ax-danger: #b42318;
    --ax-danger-soft: rgba(180, 35, 24, 0.12);
    --ax-ok: #067647;
    --ax-warn: #b54708;
    --ax-warn-soft: rgba(181, 71, 8, 0.12);

    /* Ink */
    --ax-ink: #111;
    --ax-ink-muted: rgba(0, 0, 0, 0.7);
    --ax-ink-subtle: rgba(0, 0, 0, 0.55);
    --ax-ink-faint: rgba(0, 0, 0, 0.45);

    /* Surfaces */
    --ax-surface: #fff;
    --ax-surface-sunken: rgba(250, 251, 255, 0.72);
    --ax-surface-muted: rgba(245, 246, 248, 0.9);
    --ax-surface-tint: rgba(240, 249, 255, 0.85);
    --ax-surface-wash: linear-gradient(135deg, rgba(240, 247, 255, 0.85), rgba(245, 255, 245, 0.78));

    /* Lines */
    --ax-line: rgba(0, 0, 0, 0.12);
    --ax-line-soft: rgba(0, 0, 0, 0.08);
    --ax-line-strong: rgba(0, 0, 0, 0.2);

    /* Radii */
    --ax-radius-sm: 4px;
    --ax-radius-md: 6px;
    --ax-radius-lg: 10px;
    --ax-radius-pill: 999px;

    /* Effects */
    --ax-shadow-1: 0 4px 10px rgba(0, 0, 0, 0.1);
    --ax-ring: 0 0 0 1px var(--ax-accent-line);
    --ax-transition: 0.15s ease;

    /* Layout */
    --ax-measure: 1100px;

    /* Layout inputs — set these on an individual element, not here:
         --ax-col : minimum column width for .ax-grid   (default 280px)
         --ax-gap : gap for .ax-grid / .ax-cluster / .ax-stack (default --space-m) */

    --ax-gap: var(--space-s);

    color: var(--ax-ink);
    font-size: var(--text-m);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   2. App shell / page furniture
   -------------------------------------------------------------------------- */

.ax-app {
    max-width: var(--ax-measure);
}

/* Headings inside a screen are laid out by the components around them. */
.ax-app h2,
.ax-app h3,
.ax-app h4,
.ax-app h5 {
    margin-top: 0;
}

.ax-app h1 { font-size: var(--h1); }
.ax-app h2 { font-size: var(--h2); }
.ax-app h3 { font-size: var(--h3); }
.ax-app h4 { font-size: var(--h4); }
.ax-app h5 { font-size: var(--h5); }
.ax-app h6 { font-size: var(--h6); }

.ax-app > * + * {
    margin-top: var(--space-m);
}

/* Leading paragraph that explains what a screen does. */
.ax-app .ax-intro {
    color: var(--ax-ink-muted);
    margin: 0 0 var(--space-m);
}

.ax-app .ax-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
    margin-bottom: var(--space-m);
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   These are the "don't reinvent the layout wheel" pieces. Compose them; only
   write bespoke CSS when a screen genuinely needs a one-off shape.
   -------------------------------------------------------------------------- */

/* Vertical rhythm. Set --ax-gap to tune. */
.ax-app .ax-stack > * + * {
    margin-top: var(--ax-gap, var(--space-m));
}

/* Horizontal group that wraps. */
.ax-app .ax-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ax-gap, var(--space-xs));
}

/* Row with items pushed to both ends (heading left, badge right). */
.ax-app .ax-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-m);
}

.ax-app .ax-split--top {
    align-items: flex-start;
}

/* Responsive column grid. --ax-col sets the minimum comfortable column width;
   columns collapse to one automatically, no media query required. */
.ax-app .ax-grid {
    display: grid;
    gap: var(--ax-gap, var(--space-m));
    grid-template-columns: repeat(auto-fit, minmax(min(var(--ax-col, 280px), 100%), 1fr));
}

.ax-app .ax-grid--wide  { --ax-col: 360px; }
/* Always exactly two columns (e.g. Primary / Backup pairs) — unlike the
   auto-fit default above, this never collapses to one column on narrow
   panels, since a lone stacked "Backup" reads as unrelated to "Primary". */
.ax-app .ax-grid--half  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ax-app .ax-grid--tight { --ax-col: 240px; }
.ax-app .ax-grid--one   { grid-template-columns: 1fr; }

/* --------------------------------------------------------------------------
   4. Surfaces: card / section / callout
   -------------------------------------------------------------------------- */

.ax-app .ax-card {
    border: 1px solid var(--ax-line);
    border-radius: var(--ax-radius-lg);
    padding: var(--space-m);
    background: var(--ax-surface-muted);
    margin-bottom: var(--space-m);
}

.ax-app .ax-card:last-child {
    margin-bottom: 0;
}

/* Cards laid out by a parent primitive get their spacing from its gap. */
.ax-app .ax-grid > .ax-card,
.ax-app .ax-stack > .ax-card,
.ax-app .ax-cluster > .ax-card {
    margin-bottom: 0;
}

/* Nested/secondary card — sits inside another card. */
.ax-app .ax-card--sunken {
    background: var(--ax-surface-sunken);
    border-color: var(--ax-line-soft);
}

/* Tinted explainer / control box (view builders, routing model, shell nav). */
.ax-app .ax-card--wash {
    background: var(--ax-surface-wash);
    border-color: var(--ax-line);
}

.ax-app .ax-card--flat {
    padding: var(--space-xs);
}

.ax-app .ax-card.is-invalid {
    border-color: var(--ax-danger);
    box-shadow: 0 0 0 1px var(--ax-danger-soft);
}

.ax-app .ax-card.is-dirty {
    border-color: var(--ax-warn);
    box-shadow: 0 0 0 1px var(--ax-warn-soft);
}

.ax-app .ax-card__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    font-weight: 700;
    margin-bottom: var(--space-m);
}

.ax-app .ax-card__title {
    margin: 0;
    font-size: var(--text-l);
    font-weight: 700;
}

.ax-app .ax-card__subtext {
    margin: var(--space-xs) 0 0;
    font-weight: 400;
    color: var(--ax-ink-muted);
}

/* A titled block inside a card or panel. */
.ax-app .ax-section + .ax-section {
    margin-top: var(--space-l);
}

.ax-app .ax-section__title {
    font-size: var(--text-m);
    font-weight: 600;
    margin: 0 0 var(--space-xs);
    padding-bottom: 0.25em;
    border-bottom: 1px solid var(--ax-line-soft);
}

/* Secondary block revealed inside a card (advanced settings, extra pools). */
.ax-app .ax-subpanel {
    margin-top: var(--space-xs);
    padding-top: var(--space-m);
    border-top: 1px solid var(--ax-line-soft);
}

.ax-app .ax-subpanel__desc {
    color: var(--ax-ink-muted);
}

/* Transparent grouping wrapper (tab panel). */
.ax-app .ax-panel {
    min-height: 150px;
}

.ax-app .ax-panel__desc {
    color: var(--ax-ink-muted);
    margin: 0 0 var(--space-l);
}

/* --------------------------------------------------------------------------
   5. Navigation: underline tabs + pill chips
   -------------------------------------------------------------------------- */

.ax-app .ax-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--ax-line);
    margin-bottom: var(--space-l);
}

.ax-app .ax-tab {
    padding: var(--space-xs) var(--space-m);
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-size: var(--text-m);
    line-height: 1.4;
    color: var(--ax-ink-muted);
    margin-bottom: -2px;
    transition: color var(--ax-transition), border-color var(--ax-transition);
}

.ax-app .ax-tab:hover {
    color: var(--ax-accent);
}

.ax-app .ax-tab.is-active {
    color: var(--ax-accent);
    border-bottom-color: var(--ax-accent);
    font-weight: 600;
}

.ax-app .ax-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.ax-app .ax-chip {
    border: 1px solid var(--ax-line-strong);
    border-radius: var(--ax-radius-pill);
    background: var(--ax-surface);
    color: var(--ax-ink);
    padding: var(--space-xs) var(--space-m);
    font-size: var(--text-m);
    line-height: 1.4;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ax-app .ax-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--ax-shadow-1);
}

.ax-app .ax-chip.is-active {
    border-color: var(--ax-accent);
    background: var(--ax-accent);
    color: var(--ax-accent-contrast);
}

/* Unsaved-changes marker for a tab label. */
.ax-app .ax-dot {
    color: var(--ax-warn);
    font-size: var(--text-s);
    vertical-align: super;
    margin-left: 0.25em;
}

/* --------------------------------------------------------------------------
   6. Controls: buttons, inputs, fields
   -------------------------------------------------------------------------- */

.ax-app .ax-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    border: 1px solid var(--ax-line-strong);
    border-radius: var(--ax-radius-md);
    background: var(--ax-surface);
    color: var(--ax-ink);
    padding: var(--space-xs) var(--space-m);
    font-size: var(--text-m);
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--ax-transition), color var(--ax-transition), border-color var(--ax-transition);
}

.ax-app .ax-btn:hover {
    border-color: var(--ax-ink-subtle);
}

.ax-app .ax-btn[disabled],
.ax-app .ax-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ax-app .ax-btn--primary {
    border-color: var(--ax-accent);
    background: var(--ax-accent);
    color: var(--ax-accent-contrast);
    font-weight: 600;
}

.ax-app .ax-btn--primary:hover {
    border-color: var(--ax-accent-ink);
    background: var(--ax-accent-ink);
}

/* Neutral until hovered, then reads as destructive (remove / reset). */
.ax-app .ax-btn--danger {
    color: var(--ax-ink-subtle);
}

.ax-app .ax-btn--danger:hover {
    background: var(--ax-danger);
    border-color: var(--ax-danger);
    color: #fff;
}

.ax-app .ax-btn--link {
    border: none;
    background: none;
    padding: 0;
    color: var(--ax-accent);
    font-size: var(--text-m);
}

.ax-app .ax-btn--link:hover {
    text-decoration: underline;
}

.ax-app .ax-btn--xs {
    font-size: var(--text-s);
    padding: 0 var(--space-xs);
}

/* Square button for single-glyph actions such as + / −. */
.ax-app .ax-btn--icon {
    min-width: 30px;
    padding: var(--space-xs);
    font-size: var(--text-l);
    line-height: 1;
}

.ax-app .ax-input,
.ax-app .ax-textarea,
.ax-app .ax-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: var(--ax-radius-sm);
    background: var(--ax-surface);
    color: var(--ax-ink);
    padding: var(--space-xs);
    font-size: var(--text-m);
    font-family: inherit;
}

.ax-app .ax-textarea {
    min-height: 72px;
    resize: vertical;
}

.ax-app .ax-input:focus-visible,
.ax-app .ax-textarea:focus-visible,
.ax-app .ax-select:focus-visible,
.ax-app .ax-btn:focus-visible,
.ax-app .ax-tab:focus-visible,
.ax-app .ax-chip:focus-visible {
    outline: 2px solid var(--ax-accent);
    outline-offset: 1px;
}

.ax-app .ax-input.is-invalid,
.ax-app .ax-textarea.is-invalid,
.ax-app .ax-select.is-invalid {
    border-color: var(--ax-danger);
    outline-color: var(--ax-danger);
}

/* Label + hint + control. Stack several of them with `.ax-stack`; fields carry
   no sibling margin of their own so they stay aligned inside a grid column. */
.ax-app .ax-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.ax-app .ax-field > small {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--ax-ink-muted);
}

.ax-app .ax-field__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.ax-app .ax-field__header > label {
    font-weight: 600;
    margin: 0;
}

/* Boxed field: carries the inherited / custom override states. */
.ax-app .ax-field--boxed {
    border: 1px solid var(--ax-line-soft);
    border-radius: var(--ax-radius-md);
    background: #fafbff;
    padding: var(--space-xs);
    transition: border-color var(--ax-transition), background var(--ax-transition);
}

.ax-app .ax-field--boxed.is-inherited {
    background: var(--ax-surface-muted);
    border-color: var(--ax-line-soft);
}

.ax-app .ax-field--boxed.is-custom {
    background: var(--ax-surface-tint);
    border-color: var(--ax-accent);
    box-shadow: var(--ax-ring);
}

/* The control inside a boxed field inherits the field's state — screens do
   not need to bind state classes to the input as well. */
.ax-app .ax-field.is-inherited .ax-textarea,
.ax-app .ax-field.is-inherited .ax-input {
    color: var(--ax-ink-faint);
    background: rgba(0, 0, 0, 0.025);
    font-style: italic;
}

.ax-app .ax-field.is-custom .ax-textarea,
.ax-app .ax-field.is-custom .ax-input {
    border-color: var(--ax-accent);
    background: var(--ax-surface);
    color: #000;
}

.ax-app .ax-field__action {
    margin-top: var(--space-xs);
}

/* --------------------------------------------------------------------------
   7. Feedback: status, badges, notes, empty states
   -------------------------------------------------------------------------- */

.ax-app .ax-status {
    min-height: 20px;
    margin-bottom: var(--space-m);
}

.ax-app .ax-status.is-ok    { color: var(--ax-ok); }
.ax-app .ax-status.is-error { color: var(--ax-danger); }

.ax-app .ax-badge {
    display: inline-block;
    font-size: var(--text-s);
    border-radius: var(--ax-radius-pill);
    padding: 0 var(--space-xs);
    white-space: nowrap;
    background: var(--ax-accent-soft);
    color: var(--ax-accent);
    font-weight: 600;
}

.ax-app .ax-badge--muted {
    background: var(--ax-line-soft);
    color: var(--ax-ink-subtle);
    font-weight: 400;
}

.ax-app .ax-badge--warn {
    background: var(--ax-warn-soft);
    color: var(--ax-warn);
}

.ax-app .ax-badge--count {
    font-weight: 400;
}

/* Small round numeric marker (routing tiers, step numbers). */
.ax-app .ax-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: var(--ax-radius-pill);
    background: var(--ax-accent);
    color: var(--ax-accent-contrast);
    font-size: var(--text-s);
    font-weight: 700;
    flex: none;
    margin: 0 0.25em;
}

.ax-app .ax-pip--muted {
    background: rgba(0, 0, 0, 0.35);
}

/* Inline explanatory strip. Sits at the end of a vendor card, so it spaces
   itself off the content above rather than pushing content below it down. */
.ax-app .ax-note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: var(--space-xs);
    font-size: var(--text-s);
    border-radius: var(--ax-radius-md);
    padding: var(--space-xs) var(--space-m);
    margin-top: var(--space-m);
    background: rgba(0, 0, 0, 0.04);
    color: var(--ax-ink-muted);
}

.ax-app .ax-note--accent {
    background: rgba(11, 99, 206, 0.09);
    color: var(--ax-accent-ink);
}

.ax-app .ax-note .ax-pip {
    margin-left: 0;
}

.ax-app .ax-empty {
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: var(--ax-radius-lg);
    padding: var(--space-m);
    text-align: center;
    color: var(--ax-ink-muted);
    margin: 0 0 var(--space-m);
}

.ax-app .ax-empty.is-error {
    border-color: rgba(180, 35, 24, 0.4);
    color: var(--ax-danger);
}

/* Ordered list of explanation steps (collapsible "how it works" blocks). */
.ax-app .ax-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-xs);
}

.ax-app .ax-steps > li {
    display: flex;
    gap: var(--space-m);
    align-items: flex-start;
    background: var(--ax-surface);
    border: 1px solid var(--ax-line-soft);
    border-radius: var(--ax-radius-md);
    padding: var(--space-xs) var(--space-m);
}

.ax-app .ax-steps > li > .ax-pip {
    margin: 2px 0 0;
}

.ax-app .ax-disclosure > summary {
    cursor: pointer;
    font-weight: 600;
}

.ax-app .ax-spinner {
    display: inline-block;
    animation: ax-spin 1s linear infinite;
    font-style: normal;
}

@keyframes ax-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   8. Composite: phone-number list
   Shared by every screen that edits an array of numbers.
   -------------------------------------------------------------------------- */

/* min-width:0 keeps the flexible input from blowing out a grid column. */
.ax-app .ax-phones {
    min-width: 0;
}

.ax-app .ax-phones__label {
    font-weight: 600;
    font-size: var(--text-m);
    margin: 0 0 var(--space-xs);
}

.ax-app .ax-phones__hint {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--ax-ink-muted);
}

.ax-app .ax-phones__rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.ax-app .ax-phone-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: var(--space-xs);
    align-items: center;
}

.ax-app .ax-phone-row__prefix {
    padding: var(--space-xs);
    border: 1px solid var(--ax-line);
    border-radius: var(--ax-radius-sm);
    user-select: none;
    font-size: var(--text-m);
    white-space: nowrap;
    color: var(--ax-ink-subtle);
}

/* --------------------------------------------------------------------------
   9. Utilities — deliberately few. Reach for a primitive first.
   -------------------------------------------------------------------------- */

.ax-app .ax-muted   { color: var(--ax-ink-subtle); font-size: var(--text-s); }
.ax-app .ax-hint    { color: var(--ax-ink-muted); }
.ax-app .ax-nowrap  { white-space: nowrap; }
.ax-app .ax-flush   { margin: 0; }
.ax-app .ax-fill    { flex: 1 1 220px; }
.ax-app .ax-fill--max { max-width: 320px; }

.ax-app .text-s   { font-size: var(--text-s); }
.ax-app .text-m   { font-size: var(--text-m); }
.ax-app .text-l   { font-size: var(--text-l); }
.ax-app .text-xl  { font-size: var(--text-xl); }
.ax-app .text-xxl { font-size: var(--text-xxl); }

@media (prefers-reduced-motion: reduce) {
    .ax-app * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   10. Vendor Ring Pool — page head, collapsible rows, sticky save bar
   Structural additions only: every color/spacing value below is one of the
   tokens from section 1, so a screen that already matches the design system
   picks these up for free.
   -------------------------------------------------------------------------- */

.ax-app .ax-eyebrow {
    margin: 0;
    font-size: var(--text-s);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ax-ink-subtle);
}

.ax-app .ax-page-title {
    margin: 0 0 var(--space-xs);
}

/* Vendor Ring Pool: name + owner + remove button on one baseline-aligned row. */
.ax-app--vrp .ax-vendor-head {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(180px, 2fr) auto;
    gap: var(--space-m);
    align-items: start;
    margin-bottom: var(--space-m);
}

@media (max-width: 760px) {
    .ax-app--vrp .ax-vendor-head {
        grid-template-columns: 1fr;
    }
}

/* Info tooltip trigger next to a label. The native title attribute carries
   the tooltip text for sighted/mouse users; aria-label carries it to
   screen readers. Deliberately not a custom popover — no new visual system. */
.ax-app .ax-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: var(--space-xs);
    border: 1px solid var(--ax-line);
    border-radius: var(--ax-radius-pill);
    background: none;
    color: var(--ax-ink-subtle);
    font-size: 11px;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}

.ax-app .ax-field__readonly {
    margin: var(--space-xs) 0 0;
    color: var(--ax-ink-muted);
    font-size: var(--text-s);
}

/* Collapsed vendor summary row. Expands in place; only one is open at a
   time, so the list reads as a scannable table of rows rather than a wall
   of open cards. */
.ax-app .ax-vendor-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: var(--space-m);
    padding: var(--space-xs) var(--space-m);
    border: 1px solid var(--ax-line-soft);
    border-radius: var(--ax-radius-md);
    background: var(--ax-surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ax-app .ax-vendor-row:hover {
    border-color: var(--ax-ink-subtle);
}

.ax-app .ax-vendor-row__name {
    font-weight: 600;
}

.ax-app .ax-vendor-row__meta,
.ax-app .ax-vendor-row__rings {
    color: var(--ax-ink-muted);
    font-size: var(--text-s);
}

.ax-app .ax-vendor-row__chevron {
    margin-left: auto;
    color: var(--ax-ink-subtle);
}

.ax-app .ax-vendor-row--add {
    justify-content: center;
    color: var(--ax-accent);
    font-weight: 600;
    border-style: dashed;
}

.ax-app .ax-vendor-body {
    border: 1px solid var(--ax-line-soft);
    border-top: none;
    border-radius: 0 0 var(--ax-radius-md) var(--ax-radius-md);
    padding: var(--space-m);
    margin-top: calc(-1 * var(--space-xs));
}

/* Three-column variant of .ax-phone-row (country-code text, input, remove) —
   the vendor ring pool screen dropped the +/- stepper pair for a single
   trailing remove control plus one "+ Add number" button under the list. */
.ax-app .ax-phone-row--3col {
    grid-template-columns: auto 1fr auto;
}

.ax-app .ax-phone-row__cc {
    color: var(--ax-ink-subtle);
    font-size: var(--text-s);
}

/* Sticky save bar so it stays reachable at the bottom of the viewport on a
   long vendor list, instead of requiring a scroll back to the top. */
.ax-app .ax-savebar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-m);
    padding: var(--space-m);
    margin-top: var(--space-l);
    border-top: 1px solid var(--ax-line);
    background: var(--ax-surface);
    box-shadow: var(--ax-shadow-1);
}

.ax-app .ax-savebar__cache-note {
    flex-basis: 100%;
    order: 3;
    color: var(--ax-ink-subtle);
    font-size: var(--text-s);
}

/* Visually hidden but screen-reader visible — used for the per-row phone
   number <label> that a fieldset's legend can't supply on its own. */
.ax-app .ax-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
