/*
 * Mealie Drop Family Theme v1.0.1
 * Performance hotfix for touch/mobile browsers, especially iOS Safari.
 *
 * The visual palette and layout remain unchanged. This layer only removes
 * compositor-heavy effects that can stall navigation and painting on mobile.
 */

/* Fixed background painting is needlessly expensive on long SPA pages. */
.v-application.v-theme--light,
.v-application.v-theme--dark {
  background-attachment: scroll !important;
}

@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  /* Decorative fixed layers force continuous compositing while scrolling. */
  .v-application::before,
  .v-application::after {
    display: none !important;
    filter: none !important;
  }

  /*
   * iOS Safari is particularly expensive when backdrop-filter is repeated
   * across cards/sheets/dialogs. Keep translucent surfaces, remove live blur.
   */
  .v-card:not([class*="bg-"]),
  .v-sheet,
  .v-table,
  .v-data-table,
  .v-menu > .v-overlay__content,
  .v-dialog > .v-overlay__content > .v-card,
  .v-expansion-panel,
  .v-stepper,
  .v-timeline-item__body > .v-card,
  .v-snackbar__wrapper,
  .v-overlay__scrim {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Touch devices do not benefit from image/card hover animation work. */
  .v-application .v-card .v-img__img,
  .v-application .v-card .v-responsive,
  .v-card.on-hover,
  .v-card:active {
    transition: none !important;
  }

  .v-card.on-hover {
    transform: none !important;
  }

  /* Keep depth, but make repeated list/card paints much cheaper. */
  .v-card:not([class*="bg-"]),
  .v-sheet,
  .v-expansion-panel {
    box-shadow: 0 4px 14px rgba(74, 48, 22, .07) !important;
  }

  .v-theme--dark .v-card:not([class*="bg-"]),
  .v-theme--dark .v-sheet,
  .v-theme--dark .v-expansion-panel {
    box-shadow: 0 5px 16px rgba(0, 0, 0, .24) !important;
  }
}
