/* Retail Hub desktop shape standard.
   Keep this semantic and scoped: the dedicated mobile apps do not load it. */
:root {
  --desktop-corner-radius: 7px;
  --oms-radius-xs: 7px !important;
  --oms-radius-sm: 7px !important;
  --oms-radius-md: 7px !important;
  --oms-radius-lg: 7px !important;
  --oms-radius-xl: 7px !important;
  --oms-control-radius: 7px !important;
  --ui-radius-xs: 7px !important;
  --ui-radius-sm: 7px !important;
  --ui-radius-md: 7px !important;
  --ui-radius-lg: 7px !important;
  --ui-radius-xl: 7px !important;
  --radius-sm: 7px !important;
}

html body.stock-workspace {
  --stock-control-radius: 7px !important;
}

html body.route-detail-page {
  --route-row-control-radius: 7px !important;
}

/* Native and ARIA controls, including controls generated by feature scripts. */
html body button:not([role="tab"]):not([role="switch"]):not(.order-hub__tab):not(.website-switch),
html body input:not([type="checkbox"]):not([type="radio"]),
html body select,
html body textarea,
html body summary,
html body [role="button"]:not([role="tab"]),
html body .btn,
html body .ui-button,
html body .ui-control {
  border-radius: 7px !important;
}

/* High-specificity legacy control groups. These selectors intentionally match
   the existing component scopes instead of escalating with artificial IDs. */
html body .top-actions.page-actions .btn,
html body .top-actions.page-actions button,
html body .top-actions.page-actions select.section-menu,
html body .main-section-select select.section-menu,
html body .operator-compact select,
html body .orders-filter-toggle,
html body .orders-status-filters.orders-filters-open,
html body .orders-status-filters.orders-filters-open label,
html body .order-options-wrap .options-button,
html body .order-options-menu button,
html body .order-options-menu a,
html body .order-options-menu summary,
html body .order-quick-actions .btn,
html body .order-actions .options-button,
html body.route-detail-page input[type="time"],
html body.route-detail-page .route-slot-input,
html body .settings-tab.btn,
html body .settings-panel .btn,
html body .settings-panel input[type="file"] {
  border-radius: 7px !important;
}

html body .routes-section-tab,
html body .website-section-tab,
html body .stock-view-tabs,
html body .stock-view-tab span:not(:empty),
html body.stock-workspace .stock-visibility-filter-menu label,
html body .single-toggle-pill.compact-single-toggle,
html body .analytics-bedding-toggle,
html body .website-connection,
html body .website-toast,
html body .builder-intro-icon,
html body .builder-tab-icon,
html body .builder-switch-control,
html body .builder-search,
html body .stock-info__button,
html body .oms-sidebar-logo {
  border-radius: 7px !important;
}

/* Rich text controls form one joined surface: round only the exposed corners. */
html body .website-rich-toolbar {
  border-radius: 7px 7px 0 0 !important;
}

html body .website-description-editor {
  border-radius: 0 0 7px 7px !important;
}

html body .website-accordion-editor .website-description-editor {
  border-radius: 7px !important;
}

html body.route-detail-page .route-stops-table input[class],
html body.route-detail-page .route-stops-table button[class],
html body.route-detail-page .route-action-row button[class],
html body.route-detail-page .route-email-preview-btn,
html body.route-detail-page .route-actions-options .route-manual-submenu,
html body.route-detail-page .route-actions-options .route-manual-submenu summary {
  border-radius: 7px !important;
}

/* Named application surfaces. Class-name matching is limited to established
   surface nouns so ordinary layout wrappers are not restyled. */
html body .card,
html body .ui-card,
html body dialog,
html body [role="dialog"],
html body [role="menu"],
html body [class*="-card"],
html body [class*="__card"],
html body [class*="-panel"],
html body [class*="__panel"],
html body [class*="-dialog"],
html body [class*="__dialog"],
html body [class*="-modal"],
html body [class*="__modal"],
html body [class*="-popup"],
html body [class*="__popup"],
html body [class*="-popover"],
html body [class*="__popover"],
html body [class*="-menu"],
html body [class*="__menu"],
html body [class*="-dropdown"],
html body [class*="__dropdown"],
html body [class*="table-wrap"],
html body fieldset {
  border-radius: 7px !important;
}

html body.order-workspace .card,
html body .settings-wrap .settings-card,
html body .settings-wrap .settings-panel,
html body .settings-repeat-row,
html body .settings-user-card,
html body .settings-summary-box,
html body .supplier-product-section,
html body .supplier-product-card {
  border-radius: 7px !important;
}

/* Rich editors are one joined surface: round only the outside corners. */
html body .settings-rich-toolbar {
  border-radius: 7px 7px 0 0 !important;
}

html body .settings-template-box.rich-template-editor {
  border-radius: 0 0 7px 7px !important;
}

/* Feature surfaces whose established names predate the shared card/panel
   vocabulary. */
html body .stock-info,
html body .stock-info__photo,
html body .stock-info__replacement,
html body .stock-info__inspection,
html body .stock-info__fault,
html body .stock-allocation-empty,
html body .stock-match-badge,
html body.route-detail-page .route-readiness .route-booking-status,
html body.route-detail-page .route-readiness .route-assigned-pill,
html body.route-detail-page .route-balance-pill,
html body.route-detail-page .route-icon-control,
html body.order-workspace.route-detail-page #routeStopsTable input.route-slot-to {
  border-radius: 7px !important;
}

/* Badges remain compact but use the same corner language. Circular dots and
   switch/avatar artwork are separate elements and intentionally untouched. */
html body .badge,
html body .pill,
html body [class*="-badge"],
html body [class*="__badge"],
html body [class*="-pill"],
html body [class*="__pill"],
html body [class*="-chip"],
html body [class*="__chip"],
html body [class*="-tag"],
html body [class*="__tag"],
html body [class*="-count"],
html body [class*="__count"],
html body [class*="-status"],
html body [class*="__status"],
html body .logged-operator,
html body .logged-in,
html body .customer-email-attachment,
html body .order-hub__note-type,
html body .order-hub__replacement-date,
html body .order-hub__replacement-expected,
html body .settings-access-list label,
html body .orders-status-filters label,
html body .warehouse-managed-options-readonly span,
html body .order-money-summary span,
html body .sms-thread-orders span,
html body .builder-category-pill span,
html body .builder-legend span,
html body .builder-bulk-preview-list span,
html body .website-brand-page-summary > span,
html body .website-tag-usage span,
html body .website-product-tags span,
html body .website-tag-defaults span,
html body .website-promotion-selected-products span {
  border-radius: 7px !important;
}

/* Joined controls and borderless rows rely on square internal seams. */
html body .order-hub__tab,
html body .order-hub-service__issue-toggle,
html body .route-sms-modal__switch button,
html body .replacements-tabs button,
html body .builder-tree-supplier > button,
html body .sms-thread-conversation-tabs button,
html body .order-hub__note-types button,
html body .order-hub__note-filters button,
html body [data-customer-history] > .customer-hub__filters button,
html body .customer-hub__picker-row,
html body .workspace-order-row,
html body .workspace-service-row,
html body .supplier-history-row,
html body .supplier-history-detail li,
html body .dashboard-sales-box,
html body .simple-list-row,
html body .assign-panel,
html body .replacement-row,
html body .hub-exchange__items .hub-followup-row,
html body .order-hub__notes-view .order-hub__history-card,
html body.hub-embed-page .quick-modal,
html body .customer-email-preview-embedded {
  border-radius: 0 !important;
}

@media (max-width: 720px) {
  html body .order-hub__dialog {
    border-radius: 0 !important;
  }
}
