/**
 * Chromium compositor stability layer.
 * Repeated backdrop filters combined with fixed gradients can produce full-width
 * raster seams while a hover state is repainted. Keep blur on the app shell only;
 * cards retain their glass appearance through translucent fills and highlights.
 */

body {
  background-attachment: scroll;
}

body::before {
  position: absolute;
}

:where(
  .card,
  .today-panel,
  .today-payment-reminder,
  .finance-panel,
  .expenses-panel,
  .wh-list-panel,
  .wh-editor,
  .pe-section,
  .tg-form-card,
  .tg-control-card,
  .tg-status-card,
  .quick-booking-section,
  .new-work-quick-card,
  .admin-admin-card,
  .pub-service-card,
  .client-hub-table-wrap,
  .wh-table-wrap,
  #worksScreen .works-filters,
  #motivationScreen .motivation-hero
) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

:where(
  #newWorkModal .new-work-modal,
  #newWorkModal .new-work-modal__actions,
  #workEditorModal .client-hub-modal__bar,
  #workCloseConfirmModal .work-close-confirm,
  #workPrintPickerModal .work-print-picker,
  #motivationScreen .motivation-rule-actions
) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Isolate repainted surfaces so a local hover cannot invalidate a screen-wide layer. */
:where(
  .card,
  .today-panel,
  .pub-service-card,
  #worksScreen .works-dash-card,
  #worksScreen .work-list-card,
  #motivationScreen .motivation-employee-card,
  #motivationScreen .motivation-algorithm-card
) {
  isolation: isolate;
  contain: paint;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .card,
    .today-panel,
    .pub-service-card,
    #worksScreen .works-dash-card,
    #worksScreen .work-list-card,
    #motivationScreen .motivation-employee-card,
    #motivationScreen .motivation-algorithm-card
  ) {
    transition-property: color, background-color, border-color, box-shadow;
  }

  :where(
    .card,
    .today-panel,
    .pub-service-card,
    #worksScreen .works-dash-card,
    #worksScreen .work-list-card,
    #motivationScreen .motivation-employee-card,
    #motivationScreen .motivation-algorithm-card
  ):hover {
    transform: none !important;
    filter: none !important;
  }
}
