/* Shared owner workspace appearance. Scope excludes the public landing studies. */
html[data-workspace-theme],html[data-workspace-theme] body{background:var(--wa-bg)!important;color:var(--wa-ink)}
html[data-workspace-theme] :is(.owner-shell>.inbox-header,.workspace-deck,.owner-drawer,.owner-drawer iframe,.workspace-panel iframe,.ac-shell,.ow-root,.ow-page,.ow-toolbar){background:var(--wa-bg)!important;color:var(--wa-ink)}
html[data-workspace-theme] .ow-toolbar{--ink:var(--wa-ink);--muted:var(--wa-muted);--accent:var(--wa-accent);--theme-on:var(--wa-on)}
html[data-workspace-theme] :is(.account-button>span:first-child,.ac-avatar,.ow-avatar,.ow-profile-mark,.anchor-logo){background:var(--wa-avatar);color:var(--wa-avatar-ink)}
html[data-workspace-theme] :is(.header-pair .icon-button,.owner-name small,.message-preview,.service-label,.conversation-meta time,.conversation-meta>svg,.row-menu,.thread-person p,.thread-context small,.date-divider,.message small,.frame-loading,.inbox-empty,.new-message p,.service,.duration,.appointment-end,.today-link,.study-note,.ac-row.signout,.ac-row>.ac-arrow,.ac-text,.ac-chat-date,.ac-typing,.ac-plan small,.ac-return-note,.theme-hint,.theme-caption>span,.identity-editor label,.identity-dialog .identity-editor label,.identity-hint,.identity-optional,.identity-feedback){color:var(--wa-muted)}
html[data-workspace-theme] :is(.header-pair .icon-button.selected,.inbox-empty h2,.identity-invitation,.identity-theme){color:var(--wa-ink)}
html[data-workspace-theme] :is(.conversation-row,.conversation-row.has-unread,.thread,.new-message,.schedule,.ac-panel,.ac-billing-card,.ac-compose textarea,.message-composer textarea,.inbox-search,.gallery-dialog,.identity-dialog){background:var(--wa-surface);color:var(--wa-ink);border-color:var(--wa-line)}
html[data-workspace-theme] :is(.conversation-open:hover,.row-menu:hover,.conversation-actions button,.inbox-empty button,.notice,.thread-context,.incoming p,.mode,.arrow,.schedule .appointment,.ac-icon,.ac-label input,.ac-msg p,.ac-secondary,.ac-scenarios select,.ac-handoff-symbol){background:var(--wa-soft);color:var(--wa-ink);border-color:var(--wa-line)}
html[data-workspace-theme] :is(.message-composer,.ac-compose){background:var(--wa-bg);border-color:var(--wa-line)}
html[data-workspace-theme] :is(.conversation-meta b,.outgoing p,.message-composer>button,.primary,.ac-primary,.ac-signin-options .ac-primary,.ac-msg.outgoing p,.ac-compose button,.ac-badge,#ac-toast,.ow-primary,.ow-button.is-selected){background:var(--wa-accent);color:var(--wa-on)}
html[data-workspace-theme] :is(.thread-header,.conversation-actions,.new-message button,.identity-theme,.identity-field+.identity-field){border-color:var(--wa-line)}
html[data-workspace-theme] :is(input,textarea)::placeholder{color:var(--wa-muted);opacity:.75}
html[data-workspace-theme] :is(button,a,input,textarea,summary,select):focus-visible{outline-color:var(--wa-highlight)}
html[data-workspace-theme] .unread-dot{background:var(--wa-highlight);border-color:var(--wa-bg)}
html[data-workspace-theme] .beui-tabs-list{border-color:color-mix(in srgb,var(--wa-ink) 6%,transparent)}
html[data-workspace-theme] .beui-tabs-list .beui-tab{color:var(--wa-muted)}
html[data-workspace-theme] .beui-tabs-list .beui-tab:is([aria-selected=true],:hover){color:var(--wa-ink)}
html[data-workspace-theme] .beui-tabs-list .beui-tab-indicator{background:var(--wa-ink)}
html[data-workspace-theme] .beui-tab-count{background:var(--wa-soft);color:var(--wa-ink)}
html[data-workspace-theme] :is(.mode [aria-pressed=true],.done){background:var(--wa-surface);color:var(--wa-ink)}
html[data-workspace-theme] :is(.day.today,.day[aria-pressed=true]){border-color:var(--wa-line)}
html[data-workspace-theme] :is(.day .has-booking,.calendar-key i,.schedule .appointment-row:after){background:var(--wa-highlight)}
html[data-workspace-theme] .schedule .appointment-row:before{background:var(--wa-line)}
html[data-workspace-theme] .schedule .appointment-row:after{border-color:var(--wa-surface);box-shadow:0 0 0 1px var(--wa-line)}
html[data-workspace-theme] .week-strip{scrollbar-color:var(--wa-line) transparent}
html[data-workspace-theme] :is(h1 em,.ac-success-symbol,.empty>span){color:var(--wa-highlight)}
html[data-workspace-theme] :is(.ac-row:hover,button.ac-detail-row:hover){background:color-mix(in srgb,var(--wa-soft) 50%,transparent)}
html[data-workspace-theme] .identity-dialog{--ink:var(--wa-ink)}
html[data-workspace-theme] .identity-editor textarea:focus{box-shadow:0 1px var(--wa-highlight)}
html[data-workspace-theme] .ac-signin-options button{background:var(--wa-surface);color:var(--wa-ink)}
/* The existing editor overlays share the saved workspace palette, too. */
html[data-workspace-theme] :is(.owner-dialog,.availability-dialog,.identity-dialog){--ink:var(--wa-ink);--green:var(--wa-accent);--muted:var(--wa-muted)}
html[data-workspace-theme] :is(.availability-dialog,.av-header,.av-detail,.gallery-header){background:var(--wa-surface);color:var(--wa-ink);border-color:var(--wa-line)}
html[data-workspace-theme] :is(.gallery-back,.gallery-image-wrap,.av-back,.av-week button,.av-calendar button){background:var(--wa-soft);color:var(--wa-ink);border-color:var(--wa-line)}
html[data-workspace-theme] :is(.av-week button,.av-calendar button)[aria-pressed=true]{background:var(--wa-accent);color:var(--wa-on);border-color:var(--wa-accent)}
html[data-workspace-theme] .av-detail{background:var(--wa-surface)}
html[data-workspace-theme] :is(.av-mode,.av-exceptions,.av-exception,.work-field+.work-field,.review,.gallery-credits){border-color:var(--wa-line)}
html[data-workspace-theme] :is(.av-mode button,.av-day-headings,.av-calendar-meta,.av-scope,.av-explainer,.av-time-fields label,.av-time-dash,.av-off-note,.av-status,.av-prototype,.av-exception small,.av-exception>span:last-child,.gallery-count,.gallery-intro>span,.gallery-credits,.gallery-image-fallback,.work-editor label,.work-feedback,.meet-chat-note,.anchor-business p,.anchor-about,.anchor-facts>div,.anchor-icon,.reviews-total,.review-service,.reviews-demo,.review blockquote,.reviews-score>span){color:var(--wa-muted)}
html[data-workspace-theme] .av-mode button[aria-pressed=true]{color:var(--wa-ink)}
html[data-workspace-theme] :is(.av-mode>span,.av-custom-dot,.av-calendar .av-custom:after){background:var(--wa-highlight)}
html[data-workspace-theme] .av-switch:before{background:var(--wa-soft);border-color:var(--wa-line)}
html[data-workspace-theme] .av-switch[aria-checked=true]:before{background:var(--wa-accent);border-color:var(--wa-accent)}
html[data-workspace-theme] .av-switch[aria-checked=true] span{background:var(--wa-on)}
html[data-workspace-theme] .meet-dialog{--profile-accent:var(--wa-ink);--profile-line:var(--wa-line);--profile-surface:var(--wa-soft)}
html[data-workspace-theme] :is(.chat-header .avatar,.tiny-avatar,.sf-monogram,.storefront-profile .avatar){background:var(--wa-avatar);color:var(--wa-avatar-ink)}
/* Pair palette canvas and content retain their own readable foreground roles. */
html[data-workspace-theme^="theme-pair-"] body,html[data-workspace-theme^="theme-pair-"] :is(.owner-shell>.inbox-header,.workspace-deck,.owner-drawer,.workspace-panel,.ac-shell,.ow-root,.ow-page,.ow-toolbar){color:var(--pair-page-ink)}
html[data-workspace-theme^="theme-pair-"] :is(.owner-name small,.header-pair .icon-button,.ow-local-note,.ac-shell>.ac-text){color:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] :is(.incoming p,.thread-context,.ac-msg p,.notice,.gallery-back,.av-back,.ac-icon){color:var(--pair-card-ink)}
html[data-workspace-theme^="theme-pair-"] .ow-toolbar{--ink:var(--pair-page-ink);--muted:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] :is(.inbox-header,.inbox-header button,.owner-name,.header-pair .icon-button.selected,.ow-toolbar .beui-tab[aria-selected=true]){color:var(--pair-page-ink)}
html[data-workspace-theme^="theme-pair-"] :is(.owner-name small,.header-pair .icon-button,.ow-toolbar .beui-tab,.ow-edit-hint,.ow-local-note){color:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] .ow-toolbar .beui-tab-indicator{background:var(--pair-page-ink)}
html[data-workspace-theme^="theme-pair-"] .ow-canvas-hint{color:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] :is(.inbox-header,.inbox-filters,.ow-toolbar,.workspace-payment-tabs,.ac-shell){--wa-ink:var(--pair-page-ink);--wa-muted:var(--pair-page-muted);--wa-highlight:var(--pair-page-ink)}
html[data-workspace-theme^="theme-pair-"] .ac-shell{--wa-surface:var(--pair-bg);--ink:var(--pair-page-ink);--muted:var(--pair-page-muted);--line:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] .study-back{color:var(--pair-page-muted)}
html[data-workspace-theme^="theme-pair-"] .ac-icon,html[data-workspace-theme^="theme-pair-"] .ac-icon svg{color:var(--pair-card-ink)}

/* Count badges sit on a card-colored surface, even inside dark page tabs. */
html[data-workspace-theme]{--wa-count-ink:var(--wa-ink);--wa-count-bg:var(--wa-soft)}
html[data-workspace-theme^="theme-pair-"]{--wa-count-ink:var(--pair-card-ink);--wa-count-bg:var(--pair-card-bg)}
html[data-workspace-theme] .beui-tab-count{background:var(--wa-count-bg);color:var(--wa-count-ink)}

/* Content controls and overlays never inherit the outer page's "soft" canvas.
   Keep the surface and inset foreground pairs together across all themes. */
html[data-workspace-theme] :is(.inline-preview,dialog,.new-message,.conversation-actions){
 --surface:var(--wa-surface);--soft:var(--wa-soft);--bubble:var(--wa-soft);
 --ink:var(--wa-ink);--muted:var(--wa-muted);--line:var(--wa-line);
 --accent:var(--wa-accent);--green:var(--wa-accent);--theme-on:var(--wa-on);
 --content-ink:var(--pair-card-ink,var(--wa-ink));
 --content-muted:var(--pair-card-muted,var(--wa-muted));
}
/* Theme application writes a page-soft inline value on the conversation.
   Its controls need inset-soft throughout, including hover/expanded states. */
html[data-workspace-theme] .chat-app{--soft:var(--wa-soft)!important}
html[data-workspace-theme] dialog::backdrop{background:rgb(0 0 0 / .32)}
html[data-workspace-theme] .inline-preview :is(
 .soft-fact,.pay-choice,.pay-later-choice,.flow-money>div,.revision-changes,
 .location-address,.callout,.deposit-box,.paid-box,.revision-summary,
 .cancellation-money,.cancellation-policy,.correction-preview,.payment-note,
 .payment-now,.paylink-waiting,.chat-paylink.inactive,.header-status-button,
 .service-option,.vehicle-option,.addon,.date,.time-options button,
 .welcome p,.bubble,.composer-field,.deal-dock,.edit-tabs button:not(.selected),
 input,textarea,select){
 --ink:var(--content-ink);--muted:var(--content-muted);
 color:var(--content-ink);
}
html[data-workspace-theme] .inline-preview :is(.soft-fact,.service-option,.vehicle-option,.addon,.date,.time-options button,.deal-dock) :is(small,.helper,.service-price){color:var(--content-muted)}
html[data-workspace-theme] .inline-preview .soft-fact small{color:var(--content-muted)}
html[data-workspace-theme] .inline-preview :is(input,textarea)::placeholder{color:var(--content-muted)}
html[data-workspace-theme] .inline-preview .header-services:is(:hover,[aria-expanded=true]){background:var(--wa-soft);color:var(--content-ink)}
html[data-workspace-theme] :is(.gallery-back,.av-back,.av-week button,.av-calendar button):not([aria-pressed=true]){color:var(--pair-card-ink,var(--wa-ink))}

/* Billing content keeps its own foreground/surface pair inside the account canvas. */
html[data-workspace-theme^="theme-pair-"] .ac-billing-card{
 --wa-surface:var(--pair-surface);--wa-ink:var(--pair-ink);--wa-muted:var(--pair-muted);
 --ink:var(--wa-ink);--muted:var(--wa-muted);--line:var(--wa-line);
}
html[data-workspace-theme^="theme-pair-"] .ac-billing-card{
 background:var(--pair-surface);color:var(--pair-ink);
}
html[data-workspace-theme] .ac-shell .ac-scenarios select{
 color:var(--pair-card-ink,var(--wa-ink));background:var(--wa-soft);border-color:var(--wa-line);
}
html[data-workspace-theme] .ac-sub-status,
html[data-workspace-theme] .ac-sub-status.active{
 background:var(--wa-soft);color:var(--pair-card-ink,var(--wa-ink));
}
html[data-workspace-theme] .ac-sub-status i,
html[data-workspace-theme] .ac-sub-status.active i{background:var(--wa-accent)}
html[data-workspace-theme] .ac-return-note{border-color:var(--wa-accent)}


