/* Shared portal surfaces. Keep semantic states and native controls on one palette. */
html body:is(.admin-body,.wu-portal,.sd-portal),html body:has(>#main),html body:has(>.layout>#main){--soft:var(--pp-soft)!important;--accent:var(--pp-primary)!important;--white:var(--pp-on)!important;--warn:#80500b;--warnbg:#fff3d9;--danger:var(--pp-danger)!important;--ct-focus:var(--pp-primary)!important}

html body:is(.admin-body,.wu-portal,.sd-portal) :is(.card,.panel,.wu-card,.workspace-panel,.order-items,.delivery-summary,.setup-grid,.chat-log,.upload-dropzone,.empty),html body #main#main :is(.card,.order-items,.delivery-summary,.chat-log){color:var(--pp-text)!important;border-color:var(--pp-line)!important}
html body #main#main :is(.order-items,.delivery-summary,.setup-grid,.chat-log),html body.admin-body :is(.upload-dropzone,.table-toolbar,.filter-bar){background:var(--pp-soft)!important}
html body #main#main :is(.card,.panel),html body.admin-body :is(.panel,.card){background:var(--pp-card)!important;box-shadow:none!important}
html body:is(.admin-body,.wu-portal,.sd-portal) :is(.muted,.hint,.help-text,.empty),html body #main#main :is(.muted,.hint,.empty,small),html body #customerAddressSetup#customerAddressSetup :is(p,label){color:var(--pp-muted)!important}
html body #main#main :is(button,.button),html body #nav#nav button,html body.admin-body :is(button,.button,.btn){background-color:var(--pp-soft)!important;color:var(--pp-text)!important;border-color:var(--pp-line)!important;text-shadow:none!important}
html body #main#main :is(button.primary,.button.primary,button[type=submit]),html body #nav#nav button:is(.active,[aria-selected=true],[aria-current=page]),html body.admin-body :is(.primary,.btn-primary,button[type=submit],button.active){background-color:var(--pp-primary)!important;color:var(--pp-on)!important;-webkit-text-fill-color:var(--pp-on)!important;border-color:var(--pp-primary)!important}
html body #main#main :is(button.primary,.button.primary,button[type=submit]) :is(span,b,small),html body #nav#nav button.active :is(span,b,small){color:inherit!important;-webkit-text-fill-color:inherit!important}
html body #main#main :is(button.danger,.button.danger),html body.admin-body :is(button.danger,.btn-danger){background-color:var(--pp-danger-soft)!important;color:var(--pp-danger)!important;-webkit-text-fill-color:var(--pp-danger)!important;border-color:var(--pp-danger)!important}
html body #main#main button:disabled,html body.admin-body button:disabled{background:var(--pp-disabled)!important;color:var(--pp-disabled-text)!important;-webkit-text-fill-color:var(--pp-disabled-text)!important;opacity:1!important}
html body #main#main :is(.badge,.status-tag),html body.admin-body :is(.badge,.status-tag){background:var(--pp-primary-soft)!important;color:var(--pp-text)!important;border:1px solid var(--pp-line)!important}
html body #main#main :is(.badge.pending,.notice),html body.admin-body :is(.badge.pending,.notice){background:var(--warnbg,#fff3d9)!important;color:var(--warn,#80500b)!important;border-color:var(--pp-line)!important}
html body #main#main :is(.money,.price){color:var(--pp-price)!important}
html body #main#main :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),textarea,select),html body.admin-body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),textarea,select),html body #customerAddressSetup#customerAddressSetup :is(input,textarea,select){background-color:var(--pp-card)!important;color:var(--pp-text)!important;-webkit-text-fill-color:var(--pp-text)!important;border-color:var(--pp-line)!important;box-shadow:none!important;color-scheme:inherit}
html body :is(#main,#customerAddressSetup) :is(input,textarea)::placeholder,html body.admin-body :is(input,textarea)::placeholder{color:var(--pp-muted)!important;-webkit-text-fill-color:var(--pp-muted)!important;opacity:1!important}
html body #main#main :is(input,textarea,select):focus,html body.admin-body :is(input,textarea,select):focus,html body #customerAddressSetup#customerAddressSetup :is(input,textarea,select):focus{outline:0!important;box-shadow:none!important;border-color:var(--pp-primary)!important}
html body #main#main :is(input,textarea):read-only{background-color:var(--pp-soft)!important}
html body :is(#main,#modalBody,#customerAddressSetup) :is(input[type=checkbox],input[type=radio]),html body.admin-body :is(input[type=checkbox],input[type=radio]){accent-color:var(--pp-primary)}
html body #main#main :is(th,td),html body.admin-body :is(th,td){border-color:var(--pp-line)!important;color:var(--pp-text)!important}
html body #main#main th,html body.admin-body th{background:var(--pp-soft)!important}
html body #main#main tbody tr:hover,html body.admin-body tbody tr:hover{background:var(--pp-soft)!important}
html body #modal#modal,html body #modalBody#modalBody,html body #customerAddressSetup#customerAddressSetup{background:var(--pp-card)!important;color:var(--pp-text)!important;border-color:var(--pp-line)!important;color-scheme:inherit}
html body #customerAddressSetup#customerAddressSetup .ca-address-header{background:var(--pp-card)!important;border-color:var(--pp-line)!important}
html body #customerAddressSetup#customerAddressSetup .ca-address-header h2{color:var(--pp-text)!important}
html body #customerAddressSetup#customerAddressSetup :is([data-ca-close],[data-ca-locate]){background:var(--pp-soft)!important;color:var(--pp-text)!important;border-color:var(--pp-line)!important}
html body #customerAddressSetup#customerAddressSetup button[type=submit]{background:var(--pp-primary)!important;color:var(--pp-on)!important;border-color:var(--pp-primary)!important}
html body #customerAddressSetup#customerAddressSetup [data-ca-error]{color:var(--pp-danger)!important}
html body #message#message{background:var(--pp-text)!important;color:var(--pp-bg)!important;border:1px solid var(--pp-line)!important}
/* GIS leaves a two-pixel white canvas around the native pill. Clip that canvas only. */
html body #customerLoginDialog#customerLoginDialog .google-login-button iframe{clip-path:inset(2px 10px round 999px)!important;background:transparent!important;color-scheme:normal!important}
html body #customerLoginDialog#customerLoginDialog .google-login-button{background:transparent!important;box-shadow:none!important;outline:0!important}
html body #customerLoginDialog#customerLoginDialog .google-login-box [role=status]:empty{display:none!important}
html body #customerLoginDialog#customerLoginDialog .google-login-box [role=status]{color:var(--pp-danger)!important}
html body #customerLoginDialog#customerLoginDialog :is(.cu-option,.cu-footer a,.cu-back):focus-visible{outline:2px solid var(--pp-primary)!important;outline-offset:3px!important}
@media(max-width:760px){html body #customerAddressSetup#customerAddressSetup,html body #modal#modal{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}html body #main#main :is(th,td),html body.admin-body :is(th,td){vertical-align:top}}

html body #customerLoginDialog#customerLoginDialog#customerLoginDialog :is(input,textarea,select):is(:focus,:focus-visible){outline:0!important;outline-offset:0!important;box-shadow:none!important;border:1px solid var(--pp-primary)!important}

@media(max-width:720px){html body.wu-portal .top .brand{min-width:0!important;max-width:100%!important;white-space:normal!important;align-items:center!important}html body.wu-portal .top .brand>span{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.4!important}html body.wu-portal .top .brand img{flex:none!important}html body.wu-portal .top .tools #locale{width:170px!important;min-width:0!important;max-width:100%!important}}

/* Shared spacing and controls for product, coupon and settings forms. */
html body.wu-portal #modal{box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overscroll-behavior:contain}
html body.wu-portal #modal :is(h2,h3,legend,summary,label,p,small){overflow-wrap:anywhere;line-height:1.5}
html body.wu-portal :is(#modal,[data-ops-form]) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){min-width:0!important;max-width:100%!important;box-sizing:border-box;font-size:16px!important;min-height:44px!important}
html body.wu-portal :is(#modal,[data-ops-form]) :is(button,.actions>a){min-height:44px;white-space:normal;line-height:1.4}
html body.wu-portal #modal .grid,html body.wu-portal [data-ops-form] .grid{min-width:0}
html body.wu-portal #modal label{min-width:0}
html body.wu-portal #modal .ops-choice-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,.5fr) auto;gap:8px;align-items:center}
@media(max-width:640px){
html body.wu-portal #modal{padding:18px!important;width:calc(100vw - 24px)!important;scroll-padding-top:52px}
html body.wu-portal #modal .grid,html body.wu-portal [data-ops-form] .grid{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
html body.wu-portal #modal .ops-choice-row{grid-template-columns:minmax(0,1fr) minmax(80px,.6fr)}
html body.wu-portal #modal .ops-choice-row>button{grid-column:1/-1;justify-self:start}
html body.wu-portal #modal .wu-editor-footer{display:flex;flex-wrap:wrap;gap:10px;background:#fff}
html body.wu-portal #modal .wu-editor-footer>button{flex:1 1 120px}
}
