/* WOTTT 04.94.0 — targeted component, contrast, focus, responsive hardening.
   Nothing here changes visibility/permissions or provider/CRM business flows. */
html {scroll-padding-top:12px;}
body {font-family:var(--w-font);}
/* Semantic form states; composer and search shells keep their existing borderless inputs. */
.workspace :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not(:disabled) {accent-color:var(--w-accent);}
.workspace :is(input,select,textarea)[aria-invalid="true"],
.workspace :is(input,select,textarea):user-invalid {border-color:var(--w-error);box-shadow:inset 0 0 0 1px var(--w-error);}
.workspace :is(input,select,textarea):disabled {cursor:not-allowed;opacity:.7;background:var(--w-surface-muted);}
.workspace :is(button,[role="button"],input,select,textarea,summary,a[href],[tabindex="0"]):focus-visible {
  outline:2px solid var(--w-focus)!important;outline-offset:3px!important;
  box-shadow:var(--w-focus-ring);
}
/* An outer ring signals focus for intentionally borderless composer and search inputs. */
.workspace :is(.professional-composer,.search-box,.note-composer):focus-within {
  outline:2px solid var(--w-focus);outline-offset:2px;
}
.workspace :is(button,[role="button"],a[href]):disabled,
.workspace :is(button,[role="button"])[aria-disabled="true"] {cursor:not-allowed;}
.workspace :is(button,[role="button"])[aria-busy="true"] {cursor:progress;}
/* Normalize only the outer components of existing approved workspaces. */
.workspace :is(.action-dialog,.global-panel,.customer-drawer,.db-modal,.lw-dialog,.w93-popover,.cp-dialog) {
  border-color:var(--w-line);
  color:var(--w-text);
}
.workspace :is(.action-dialog,.global-panel,.db-modal,.lw-dialog,.w93-popover) :is(input,select,textarea) {
  min-width:0;max-width:100%;
}
.workspace :is(.action-dialog,.global-panel,.db-modal,.lw-dialog,.w93-popover) :is(button,input,select,textarea) {
  font-family:var(--w-font);
}
.workspace :is(.action-dialog,.global-panel,.db-modal,.lw-dialog,.w93-popover) :is(button,input,select,textarea):disabled {opacity:.7;}
.workspace :is(.action-dialog,.global-panel,.db-modal,.lw-dialog,.w93-popover) :is(.inline-error,.error-box,.w93-error,[role="alert"]) {overflow-wrap:anywhere;}

/* Shared control feel, without overriding module-specific intent (danger/primary). */
.workspace :is(.wa90-btn,.rp91-btn,.cp92-scope-btn,.sw-primary,.tw-primary,.ow-primary,.primary-button):not(:disabled) {
  transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease;
}
.workspace :is(.wa90-btn,.cp92-scope-btn,.primary-button) {border-radius:var(--w-radius-sm);}
.workspace :is(.wa90-card,.tw-task-card,.social-crm-card,.sw-channel-admin-card,.bc-card,.tw-link-card) {
  border-color:var(--w-line);border-radius:var(--w-radius-md);
}
.workspace :is(.tw-table,.rh-table,.rp91-table,.sw-table) {color:var(--w-text);}
.workspace :is(.rh-table-head,.sw-table-head) {font-weight:var(--w-weight-semibold);}
.workspace :is(.wa90-empty,.rp-empty,.rh-group-empty,.rh-table-empty,.tw-empty,.social-empty,.sw-empty,.cp92-empty) {
  color:var(--w-text-muted);line-height:1.6;overflow-wrap:anywhere;
}
.workspace :is(.wa90-account-badges,.w93-mention-rows) {flex-wrap:wrap;}
.workspace :is(.tw-table-wrap,.rp91-table-scroll,.rh-table-wrap) {overflow-x:auto;max-width:100%;}
/* Contrast of small secondary text is controlled by the semantic --ui-muted alias. */
.workspace :is(.wa90-btn,.cp92-scope-btn,.w93-pin-button,.w93-refresh):hover:not(:disabled) {border-color:var(--w-line-strong);}
/* Controlled visual language for notice/toast/error/loading surfaces. */
.workspace :is(.error-box,.inline-error,.action-dialog-error,.w93-error) {border-radius:var(--w-radius-md);}
.workspace :is(.error-box,.inline-error,[role="alert"]) {line-height:var(--w-line-height);}
.workspace :is(.toast,.notice,.notice-stack>div) {border-radius:var(--w-radius-md);overflow-wrap:anywhere;}
.workspace :is(.empty-state,.no-results,.empty-placeholder,[data-empty-state]) {color:var(--w-text-muted);line-height:1.6;}
.workspace :is(.skeleton,.loading-skeleton,[data-loading-skeleton]) {background-color:var(--w-surface-muted);border-radius:var(--w-radius-sm);}
/* Tables preserve their existing columns, with horizontal scrolling where needed. */
.workspace :is(.table-scroll,.table-wrap,.data-table-wrap,.rh-table-wrap,.tw-table-wrap,.ow-table-wrap) {
  max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
}
.workspace table {border-collapse:separate;border-spacing:0;max-width:100%;}
.workspace :is(table th,table td) {overflow-wrap:break-word;}
.workspace table th {color:var(--w-text);font-weight:var(--w-weight-semibold);}
.workspace table :is(tr,th,td):focus-visible {outline:2px solid var(--w-focus);outline-offset:-2px;}
/* WOTTT 04.93 collaboration popover: explicit accessible keyboard focus. */
.workspace .w93-popover {max-width:calc(100vw - 24px);box-shadow:var(--w-shadow);}
.workspace .w93-collab-open[aria-expanded="true"] {box-shadow:var(--w-focus-ring);border-color:var(--w-focus);}
.workspace .w93-mentions label {min-height:31px;}
/* Status is not colour alone: keep existing badge text and avoid low-opacity legends. */
.workspace :is(.pill,.foundation-badge,.count-badge,.status-badge,.w93-collab-open b) {font-weight:var(--w-weight-semibold);}
.workspace :is(.muted,.small,.eyebrow,.section-label) {color:var(--w-text-muted);}
/* More predictable scroll and touch behavior without changing structural layout. */
.workspace :is(.global-panel-body,.customer-drawer-body,.action-dialog-body,.nav-scroller,.notes-timeline) {
  overscroll-behavior:contain;scrollbar-gutter:stable;
}
.workspace :is(.global-panel,.customer-drawer,.action-dialog,.w93-popover) {max-height:100dvh;}
/* Explicit responsive tiers. The canonical Inbox view already controls list vs thread.
   We reinforce its behavior but never force desktop's four-column dock below 1680. */
@media (min-width:1440px) {
  .workspace :is(.global-panel-body,.customer-drawer-body) {padding-inline:clamp(12px,1.25vw,22px);}
  .workspace .w93-context-docked>.w93-customer-pinned {min-width:0;}
}
@media (min-width:1024px) and (max-width:1439px) {
  .workspace .global-panel {width:min(440px,48vw);}
  .workspace :is(.topbar-actions,.thread-actions) {min-width:0;}
  .workspace .w93-context-docked {grid-template-columns:unset;}
  .workspace .w93-customer-pinned {box-shadow:var(--w-shadow);}
}
@media (min-width:768px) and (max-width:1023px) {
  .workspace .professional-grid {min-width:0;}
  .workspace.focused-shell .professional-grid {grid-template-columns:minmax(225px,32vw) minmax(0,1fr) 36px;}
  .workspace :is(.global-panel,.customer-drawer) {width:min(450px,88vw);}
  .workspace .w93-context-docked {display:initial;}
  .workspace .w93-pin-button {display:none!important;}
}
@media (max-width:767px) {
  /* Smaller screens use existing list/thread transitions and overlay context. */
  .workspace .professional-grid {min-width:0;}
  .workspace :is(.global-panel,.customer-drawer,.social-detail-drawer) {width:min(100vw,480px);max-width:100vw;}
  .workspace .w93-pin-button {display:none!important;}
  .workspace .w93-context-docked {display:block;}
  .workspace :is(.action-dialog,.db-modal,.lw-dialog) {max-width:calc(100vw - 16px);}
  .workspace :is(.action-dialog-body,.global-panel-body,.customer-drawer-body) {overscroll-behavior:contain;}
  .workspace :is(.w93-popover,.floating-menu) {max-width:calc(100vw - 20px);}
  .workspace .w93-popover {max-height:70dvh;}
}
@media (max-width:479px) {
  .workspace :is(.action-dialog-head,.action-dialog-body) {padding-inline:14px;}
  .workspace :is(.w93-pop-body,.w93-popover>header) {padding-inline:12px;}
  .workspace :is(.w93-add>div,.button-row) {flex-wrap:wrap;}
}
@media (prefers-reduced-motion:reduce) {
  html:focus-within {scroll-behavior:auto!important;}
  .workspace :is(.toast,.notice,.skeleton,.loading-skeleton) {animation:none!important;transition:none!important;}
}
@media (forced-colors:active) {
  .workspace :is(button,a,input,select,textarea,summary):focus-visible {outline:2px solid Highlight!important;}
  .workspace :is(.pill,.status-badge,.count-badge) {border:1px solid CanvasText;}
}
