/* Shared trading controls extend the existing WenaPay layout and theme. */
:root{--merchant-nav-height:76px}
html body[data-wp-screen] .merchant-trading-nav{position:fixed!important;transform:none!important;inset:auto 10px max(8px,env(safe-area-inset-bottom))!important;z-index:80;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:auto!important;max-width:560px!important;margin:0 auto!important;padding:7px!important;border-radius:20px!important;border:1px solid #454a50!important;background:#191b1e!important;color:#f5f5f4!important;box-shadow:0 8px 28px #0003}
html body .merchant-trading-nav a{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:4px!important;min-width:0!important;min-height:48px!important;padding:5px!important;color:inherit!important;text-decoration:none;font-size:.75rem!important;line-height:1.2!important;border-radius:14px!important}
html body .merchant-trading-nav svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body .merchant-trading-nav a.active{background:#ff7b32!important;color:#19100a!important}
html[data-theme="light"] body .merchant-trading-nav{background:#fff!important;color:#444!important;border-color:#dedede!important}
html body[data-wp-screen] :is(button,input,select,textarea){scroll-margin:90px 0}
html body[data-wp-screen] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #ff7b32;outline-offset:3px}
html[data-theme="light"] body[data-wp-screen] :is(button,a,input,select,textarea):focus-visible{outline-color:#9a3700}
html body .merchant-sell-now{display:flex;align-items:center;justify-content:center;min-height:48px;padding:12px;margin:0 0 12px;background:#ff7b32;color:#19100a;border-radius:14px;text-decoration:none;font-weight:800}
.merchant-start-setting{display:flex;align-items:center;gap:12px;padding:12px 0;min-height:48px;font-size:1rem}
.merchant-start-setting input{width:22px;height:22px;flex-shrink:0;accent-color:#ff7b32}
.merchant-back-services{display:inline-flex;align-items:center;min-height:44px;margin-bottom:10px;color:inherit}
body[data-merchant-trading-view="business"] :is(.spaza-services-head,.merchant-sell-now,.merchant-pending-services,#business-dashboard>summary){display:none!important}
body[data-merchant-trading-view="business"] .spaza-business-content{padding-top:0}
.merchant-pending-services{margin-top:12px}
.merchant-pending-services>summary{cursor:pointer;min-height:48px;padding:12px 4px;font-weight:700}
body[data-wp-screen="BUSINESS-POS-V9"] .pos-main{padding-bottom:180px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-hero{display:block!important;margin:8px 0 12px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-hero h1{font-size:clamp(24px,4vw,34px)!important;line-height:1.15!important;margin:4px 0 8px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-hero-copy>p{display:none}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-mode-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:10px}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-mode-card{aspect-ratio:auto!important;min-height:48px!important;padding:12px!important;border-radius:14px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:8px!important;box-shadow:none!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-mode-card strong{font-size:.95rem!important;line-height:1.3!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-mode-card :is(small,.mode-icon,.mode-arrow){display:none!important}
html body[data-wp-screen="BUSINESS-POS-V9"] :is(.add-product,.qty-row button,.category-button,.pos-favourite){min-width:44px!important;min-height:44px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .add-product{width:44px!important;height:44px!important;color:#19100a!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .search-wrap{width:100%!important;min-height:48px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .search-wrap input{font-size:16px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .catalogue-toolbar{flex-wrap:wrap!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .catalogue-actions{min-width:0;width:100%}
html body[data-wp-screen="BUSINESS-POS-V9"] .product-card{padding-top:58px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .product-name{font-size:1rem!important;line-height:1.3}
html body[data-wp-screen="BUSINESS-POS-V9"] .product-stock{font-size:.8rem!important}
.pos-favourite{position:absolute;left:10px;top:10px;border:1px solid var(--wp-line,#777);border-radius:12px;background:var(--wp-panel,#191b1e);color:var(--wp-ink,#fff);font-size:24px;cursor:pointer}
.pos-favourite[aria-pressed="true"]{color:#ff7b32}
.pos-session-tools{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.pos-session-tools>button,.pos-session-tools>details>summary{min-height:44px;padding:10px 12px;border:1px solid var(--wp-line,#777);border-radius:12px;background:var(--wp-panel,#191b1e);color:var(--wp-ink,#fff);font:inherit;cursor:pointer}
.pos-session-tools>details{flex:1 1 160px}
.pos-held-row{padding:8px 0}
.pos-session-status{font-size:.9rem;color:var(--wp-muted,#aaa);line-height:1.5;overflow-wrap:anywhere}
html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar{bottom:calc(var(--merchant-nav-height) + env(safe-area-inset-bottom))!important;z-index:81!important}
body[data-wp-modal-open] .merchant-trading-nav,body.cart-open .merchant-trading-nav{visibility:hidden}
@media(max-width:720px){
 html body[data-wp-screen] :is(input,select,textarea){font-size:16px!important;min-height:44px}
 html body[data-wp-screen="BUSINESS-CHILD-V7"] .shell{padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}
 html body[data-wp-screen="BUSINESS-CHILD-V7"] :is(.filter,.salehead,.action-row,.actions){min-width:0;flex-wrap:wrap}
 html body[data-wp-screen="BUSINESS-CHILD-V7"] :is(.salehead h3,.item,.row,.card){overflow-wrap:anywhere;min-width:0}
 html body[data-wp-screen="BUSINESS-POS-V9"] .pos-cart{height:var(--wp-visible-height,100dvh)!important;max-height:100dvh!important;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
 html body[data-wp-screen="BUSINESS-POS-V9"] .pos-cart .cart-summary{padding-bottom:20px}
}
@media(min-width:1101px){html body[data-wp-screen="BUSINESS-POS-V9"] .merchant-trading-nav{display:none!important}}
@media(prefers-reduced-motion:reduce){html body[data-wp-screen] *{scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}

html body:is([data-wp-screen="BUSINESS-CHILD-V7"],[data-wp-screen="BOOKS-TAX-V7"],.merchant-stock-page) .shell{padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}
html body .merchant-trading-nav{transform:none!important;box-sizing:border-box}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-context-banner{min-height:44px!important;margin-bottom:10px!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-greeting{display:none!important}
html body[data-wp-screen="BUSINESS-POS-V9"] .catalogue-toolbar>div>p{display:none}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-session-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:relative;gap:6px}
html body[data-wp-screen="BUSINESS-POS-V9"] .pos-session-tools>button,html body[data-wp-screen="BUSINESS-POS-V9"] .pos-session-tools>details>summary{padding:8px 5px;min-height:44px;font-size:.875rem;line-height:1.3;text-align:center}
#heldSalesList{position:absolute;left:0;right:0;top:100%;z-index:30;padding:12px;border:1px solid var(--wp-line,#777);border-radius:14px;background:var(--wp-panel,#191b1e);box-shadow:0 10px 25px #0003}
html body[data-wp-screen="BUSINESS-POS-V9"] .category-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:8px 12px;font-size:.875rem;line-height:1.3;background:var(--wp-panel);color:var(--wp-ink)}
html body[data-wp-screen="BUSINESS-POS-V9"] .category-button.active,html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar button{background:#ff7b32!important;color:#19100a!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] .pos-hero h1{color:#111315!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] .pos-hero h1::first-line{color:#111315!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] .stock-action{background:#fff!important;color:#111315!important;border-color:#dedede!important}
@media(max-width:720px){
 html body.merchant-stock-page .shell,html body.merchant-stock-page .shell *{min-width:0}
 html body.merchant-stock-page :is(.grid,.panel,.inventory-products,.stock-row,.threshold-row,.receive-row){max-width:100%}
 html body.merchant-stock-page .grid{grid-template-columns:minmax(0,1fr)!important}
 html body.merchant-stock-page .threshold-row{grid-template-columns:minmax(0,1fr) 80px}
 html body.merchant-stock-page :is(input,select,textarea){max-width:100%;font-size:16px!important;min-height:44px}
 html body.merchant-stock-page .hero-actions{max-width:100%;min-width:0}
}
html body[data-wp-screen="BUSINESS-POS-V9"] :is(.charge-button,.checkout-primary,.show-payment-button,.payment-action.primary-action,.scan-done,.scan-mode){color:#19100a!important}
html body[data-wp-screen="BUSINESS-POS-V9"] :is(.checkout-primary,.checkout-secondary,.camera-button,.scan-close,.payment-dialog-close,.payment-action,.secondary-button){min-height:44px;min-width:44px}
html body[data-wp-screen="BUSINESS-POS-V9"] :is(.checkout-panel,.scanner-fallback) :is(input,select){width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--wp-line);border-radius:12px;background:var(--wp-panel-2);color:var(--wp-ink);font-size:16px}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] :is(.payment-dialog,.payment-complete,.payment-expired,.scan-shell,.scan-basket,.scanner-fallback,.scan-line){background:#fff!important;color:#111315!important;border-color:#dedede!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] :is(.payment-dialog,.payment-complete,.payment-expired,.scan-shell) :is(h2,h3,strong,label){color:#111315!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] :is(.payment-overlay-copy,.payment-device-note,.payment-complete p,.payment-expired p,.scan-shell p,.scan-shell small){color:#625c57!important}
html[data-theme="light"] body[data-wp-screen="BUSINESS-POS-V9"] :is(.checkout-secondary,.payment-action:not(.primary-action),.payment-dialog-close,.scan-close,.completion-details>div,.payment-dialog-link){background:#f5f3f0!important;color:#111315!important;border-color:#dedede!important}
html body:is([data-wp-screen="BUSINESS-CHILD-V7"],[data-wp-screen="BOOKS-TAX-V7"],.merchant-stock-page) :is(button,.mini,.button){min-height:44px}
html body.merchant-stock-page .editor-close{min-width:44px;min-height:44px}

html[data-theme] body[data-wp-screen="BUSINESS-POS-V9"] :is(.category-button.active,.mobile-cart-bar button,.charge-button,.checkout-primary,.show-payment-button,.payment-action.primary-action,.scan-done,.scan-mode){color:#19100a!important}
html[data-theme] body[data-wp-screen="BUSINESS-POS-V9"] :is(.mobile-cart-bar button span,.scan-mode strong){color:#19100a!important}

body.merchant-stock-page .stock-hero::before{right:0;max-width:100%}
html[data-theme="light"] body.merchant-stock-page :is(.heading h2,.inventory-copy strong){color:#111315!important}
/* Stock opens on inventory tasks; selling remains one tap away in the shared nav. */
html body.merchant-stock-page .stock-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body.merchant-stock-page .stock-actions .stock-action[href="/merchant/sale"]{display:none!important}
html body.merchant-stock-page .stock-actions .stock-action{min-height:72px!important;gap:6px!important;padding:10px!important;grid-column:auto!important}
html body.merchant-stock-page .stock-actions .stock-action .action-icon{width:32px!important;height:32px!important}
@media(max-width:720px){html body.merchant-stock-page .stock-hero h1{font-size:28px!important;line-height:1.1!important}html body.merchant-stock-page .stock-hero{gap:12px!important;margin-bottom:12px!important}}

body[data-wp-screen="BUSINESS-HOME-V7"] .merchant-dashboard-main{padding-bottom:110px}
@media(max-width:720px){html body[data-wp-screen="BUSINESS-POS-V9"] .catalogue-actions .stock-action{display:none!important}}
/* Legacy loyalty markup lacked the sizing reset used by the other workspaces. */
html body[data-wp-screen],html body[data-wp-screen] *,html body[data-wp-screen] *::before,html body[data-wp-screen] *::after{box-sizing:border-box}
html body[data-wp-screen] .shell{max-width:100%;min-width:0}

html[data-theme] body[data-wp-screen] .merchant-trading-nav a.active[aria-current="page"]{background:#ff7b32!important;color:#19100a!important}
html[data-theme] body[data-wp-screen] .merchant-trading-nav a.active[aria-current="page"] :is(span,svg){color:#19100a!important}
