/* V110 -- REGULAR mode only (linked by _Layout only when the mode is not Simple, and every rule is scoped to the Regular body marker).
   (1) PB-V109-UI-GLOBAL-001 + owner decisions 2-4: no pink frame around text or objects. Keyboard focus uses the existing BLUE focus
       tokens (--pb-v3-focus #026AA2 light / --pb-v3-focus-dark #62C9FF dark); a selected item keeps its soft fill and gets a neutral
       border. Magenta stays for the brand, fills, actions and icons.
   (2) PB-V109-LANGUAGE-CURRENCY-DISPLAY-R2: the Regular preferences panel (_V110PrefPanel) -- desktop 420 anchored to the globe,
       tablet up to 420, phone a bottom sheet (viewport minus 16) above the bottom bar and the safe area.
   Simple keeps its own look: nothing here applies without body[data-pb-choice-mode="regular"]. */

/* ================================================================== (1) focus + selection tokens */
body[data-pb-choice-mode="regular"] {
    --pb110-focus: var(--pb-v3-focus, #026AA2);
    --pb110-select-border: var(--pb-control-border, #667085);
    --pb-focus: var(--pb110-focus);
    --pb-color-focus: var(--pb110-focus);
    --focus-ring: var(--pb110-focus);
    --v16-focus: var(--pb110-focus);
    --v23-focus: var(--pb110-focus);
    --pb-selection-border: var(--pb110-select-border);
    --pb-color-border-selected: var(--pb110-select-border);
}
html[data-theme="dark"] body[data-pb-choice-mode="regular"],
html[data-theme="black"] body[data-pb-choice-mode="regular"] { --pb110-focus: var(--pb-v3-focus-dark, #62C9FF); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) body[data-pb-choice-mode="regular"] { --pb110-focus: var(--pb-v3-focus-dark, #62C9FF); }
}
/* the screens that define their own focus colour on their root (header + panel, notifications) */
body[data-pb-choice-mode="regular"] :is(.pb42.pb-header, .pb42-pref, #pbNotifPanel.pb67n-panel, #pb67nPage, .pb67n-toast) {
    --pb44-focus: var(--pb110-focus);
    --pb67n-focus: var(--pb110-focus);
}
/* the active link of the top navigation and the bottom bar keep their magenta INDICATOR line (a mark, not a frame) */
body[data-pb-choice-mode="regular"] .pb-topnav :is(a.pb-nav-active, a[aria-current="page"]) { border-bottom-color: var(--pb-action-primary); }
body[data-pb-choice-mode="regular"] .pb-bottomnav a.pb-nav-active .pb-bottomnav-icon::after { background: var(--pb-action-primary); }

/* a heading that receives programmatic focus (tabindex=-1: after a view change, /Notifications h1#pb67nTitle, the public profile name)
   keeps the focus with no frame -- it is not a control */
body[data-pb-choice-mode="regular"] :is(h1, h2, h3, main, [role="main"])[tabindex="-1"]:is(:focus, :focus-visible),
body[data-pb-choice-mode="regular"] #pb67nPage h1:is(:focus, :focus-visible),
body[data-pb-choice-mode="regular"] .pb104p :is(h1, h2)[tabindex]:is(:focus, :focus-visible) { outline: none; box-shadow: none; }

/* ================================================================== (2) the preferences panel */
body[data-pb-choice-mode="regular"] .pb110p { box-sizing: border-box; padding: 20px; border-radius: 16px; }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-head { margin: -6px 0 16px; }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-title { font-size: 18px; line-height: 1.3; }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-close { inline-size: 44px; block-size: 44px; border-color: var(--pb-divider); color: var(--pb-text-primary); }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-close .pb42-glyph { inline-size: 20px; block-size: 20px; }
body[data-pb-choice-mode="regular"] .pb110p-form { display: grid; gap: 16px; margin: 0; }
body[data-pb-choice-mode="regular"] .pb110p-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
/* Give the three display options the full panel width, as in PB-C069. */
body[data-pb-choice-mode="regular"] .pb110p-row--display { display: block; }
body[data-pb-choice-mode="regular"] .pb110p-label { min-inline-size: 64px; font-size: 14px; font-weight: 700; color: var(--pb-text-primary); margin: 0; }
/* A group moves below its label when its intrinsic width no longer fits beside it. */
body[data-pb-choice-mode="regular"] .pb110p-opts { flex: 1 1 max-content; min-inline-size: 0; }
body[data-pb-choice-mode="regular"] .pb110p-row--display .pb110p-label { margin-block-end: 8px; }
body[data-pb-choice-mode="regular"] .pb110p-opts.pb-segmented { display: flex; gap: 6px; padding: 0; background: none; border: 0; border-radius: 0; }

body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding-block: 0; font-size: 14px; font-weight: 600; color: var(--pb-text-primary);
    background: var(--pb-surface); border: 1px solid var(--pb-divider); border-radius: 12px; box-shadow: none; cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt::before { content: none; display: none; }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt:hover { background: var(--pb-surface-hover, var(--pb-surface)); }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt :is(input[type="radio"]) {
    position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: pointer; clip: auto; overflow: visible;
}
/* the active value: PB magenta fill + a check mark (never colour alone) */
body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt:is(.pb-segmented-active, :has(> input:checked)) {
    background: var(--pb-action-primary); border-color: var(--pb-action-primary); color: #FFFFFF; box-shadow: none;
}
body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt:focus-within { outline: 2px solid var(--pb110-focus); outline-offset: 2px; }

body[data-pb-choice-mode="regular"] .pb110p .pb110p-select {
    box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: 0 12px; font-size: 14px; font-family: inherit;
    color: var(--pb-text-primary); background-color: var(--pb-surface); border: 1px solid var(--pb-control-border); border-radius: 12px;
    unicode-bidi: isolate;
}
body[data-pb-choice-mode="regular"] .pb110p .pb110p-select:focus-visible { outline: 2px solid var(--pb110-focus); outline-offset: 2px; }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--pb-danger-text); }
body[data-pb-choice-mode="regular"] .pb110p .pb110p-error[hidden] { display: none; }

@media (min-width: 768px) {
    body[data-pb-choice-mode="regular"] .pb110p.pb-overlay-sheet--pref {
        inline-size: min(420px, calc(100vw - 32px)); max-inline-size: min(420px, calc(100vw - 32px));
        max-block-size: min(85vh, 560px); overflow-y: auto; padding-bottom: 20px;
    }
}
/* phone: a bottom sheet the width of the screen minus 16, above the bottom bar and the safe area */
@media (max-width: 767.98px) {
    body[data-pb-choice-mode="regular"] .pb-overlay-backdrop--pref:has(> .pb110p) { align-items: flex-end; justify-content: center; padding: 0 8px; }
    body[data-pb-choice-mode="regular"] .pb110p.pb-overlay-sheet--pref {
        inline-size: calc(100vw - 16px); max-inline-size: calc(100vw - 16px); padding: 16px; border-radius: 20px;
        margin-block-end: calc(8px + env(safe-area-inset-bottom, 0px));
        max-block-size: calc(100dvh - 32px); overflow-y: auto;
    }
    html[data-pb101-shell="1"] body[data-pb-choice-mode="regular"] .pb110p.pb-overlay-sheet--pref {
        --pb-pref-bar-height: var(--pb120-bar-h, calc(64px + env(safe-area-inset-bottom, 0px)));
        inline-size: min(344px, 100%);
        max-inline-size: 100%;
        margin-block-end: calc(var(--pb-pref-bar-height) + 8px);
        max-block-size: calc(100dvh - var(--pb-pref-bar-height) - 16px - env(safe-area-inset-top, 0px));
    }
    body[data-pb-choice-mode="regular"] .pb110p .pb110p-title { font-size: 17px; }
    body[data-pb-choice-mode="regular"] .pb110p .pb110p-close { inline-size: 48px; block-size: 48px; }
    body[data-pb-choice-mode="regular"] .pb110p-form { gap: 12px; }
}
/* Narrow screens give each group its own full-width row below the label. */
@media (max-width: 400px) {
    body[data-pb-choice-mode="regular"] .pb110p-row { display: block; }
    body[data-pb-choice-mode="regular"] .pb110p-row .pb110p-label { margin-block-end: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt { transition: none; }
}
@media (forced-colors: active) {
    body[data-pb-choice-mode="regular"] .pb110p .pb110p-opt:is(.pb-segmented-active, :has(> input:checked)) { border-color: Highlight; }
}

/* ================================================================== (1b) pink frames drawn directly (not through the focus / selection
   tokens): selected / current / attention / hover frames become neutral; a drop zone being dragged over uses the focus blue. A thin
   magenta MARKER (an underline or a side bar) is not a frame and stays where it already exists. */
body[data-pb-choice-mode="regular"] .pb-path-option.pb-path-active { border-color: var(--pb110-select-border); box-shadow: inset 0 0 0 1px var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb-path-option:has(input:focus-visible),
body[data-pb-choice-mode="regular"] .pb-acct-star input:focus-visible + span { outline-color: var(--pb110-focus); }
body[data-pb-choice-mode="regular"] .pb-acct-star input:checked + span { border-color: var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb-checkout-demo { border-color: var(--pb-divider); }
body[data-pb-choice-mode="regular"] :is(.pb-m67a-awaiting, .pb-orient-status[data-tone="attention"], .pb-spaces-card-current, .pb-acthome-tile-attention,
    .pb-oc-card--confirm, .pb-pf-mode-pill[data-active="1"], .pb55p-steps li[aria-current="step"],
    .pb55p-results li a[aria-current="true"], .pb55p-results li button[aria-pressed="true"]) { border-color: var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb-oc-step--current .pb-oc-step-marker { border-color: var(--pb110-select-border); }
/* unread items: a neutral frame + the magenta side marker keeps them apart from read ones */
body[data-pb-choice-mode="regular"] :is(.pb-oc-thread--unread, .pb-oc-notif--unread) { border-color: var(--pb110-select-border); border-inline-start: 3px solid var(--pb-action-primary); }
body[data-pb-choice-mode="regular"] .pb-pg-chip:has(input:checked) { border-color: var(--pb110-select-border); box-shadow: 0 0 0 1px var(--pb110-select-border) inset; }
body[data-pb-choice-mode="regular"] :is(.pb391-card:hover, .pb63h-card__link:hover, a.pb-v43-quick-link:hover, a.pb-v43-tool:hover) { border-color: var(--pb-control-border); }
body[data-pb-choice-mode="regular"] main[data-pb-mode="admin"] .pb44-table.pb44-cards tr[aria-current] { border-color: var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] :is(.pb-v32-ave-card.is-selected, .pb-v49-hero-card.is-selected, .pb-v49-hero-card[aria-pressed="true"], .pb-v49-hero-card:has(input:checked)) { border-color: var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb-v32-chip[aria-pressed="true"] { border-color: var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb-v32-swatch input:checked + .pb-v32-swatch-dot { box-shadow: 0 0 0 2px var(--pb-surface, #fff), 0 0 0 4px var(--pb110-select-border); }
body[data-pb-choice-mode="regular"] .pb46-seller-nav-item:focus-visible, body[data-pb-choice-mode="regular"] .pb-seller-nav-item:focus-visible { outline-color: var(--pb110-focus); }
body[data-pb-choice-mode="regular"] :is(.pb-studio-drop-over, .pb-m67a-drop--over, .pb-v65i__drop.is-over, .pb-v69s-drop.is-over) { border-color: var(--pb110-focus); }
