/*
 * Cashback Pro V36.7.159
 * Touch press feedback and theme-aware portrait drawer backdrop.
 */

/* V36.7.159: touch labels should not invoke Android text-selection UI. */
@media (hover: none) and (pointer: coarse) {
  html body #app-sidebar #main-tabs-nav .tab-btn,
  html body #tab-admin .admin-subnav-btn,
  html body #tab-admin .customer-admin-subnav-btn,
  html body #tab-admin .backup-update-tab-btn,
  html body #tab-admin .tabs-nav .tab-btn {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* Keep pressed feedback clearly visible during the whole hold. The original
   item retains this class even when the finger moves off it; JS removes it
   only on release/cancel. The class is added only for touch/pen pointers, so
   this does not alter mouse hover behavior on desktop. Selectors outrank the
   touch-hover cleanup rules from V154. */
html body #app-sidebar #main-tabs-nav .tab-btn.v367159-pressing,
html body #app-sidebar #main-tabs-nav .tab-btn.v367159-pressing:hover:not(.active):not([aria-current="page"]),
html body #app-sidebar #main-tabs-nav .tab-btn.active.v367159-pressing:hover,
html body #tab-admin .admin-nav-shell .admin-subnav-btn.v367159-pressing,
html body #tab-admin .admin-nav-shell .admin-subnav-btn.v367159-pressing:hover:not(.active):not([aria-selected="true"]),
html body #tab-admin .admin-nav-shell .admin-subnav-btn.active.v367159-pressing:hover,
html body #tab-admin .customer-admin-subnav-btn.v367159-pressing,
html body #tab-admin .customer-admin-subnav-btn.v367159-pressing:hover:not(.active):not([aria-selected="true"]),
html body #tab-admin .customer-admin-subnav-btn.active.v367159-pressing:hover,
html body #tab-admin .backup-update-tab-btn.v367159-pressing,
html body #tab-admin .backup-update-tab-btn.v367159-pressing:hover:not(.active):not([aria-selected="true"]),
html body #tab-admin .backup-update-tab-btn.active.v367159-pressing:hover,
html body #tab-admin .tabs-nav .tab-btn.v367159-pressing,
html body #tab-admin .tabs-nav .tab-btn.v367159-pressing:hover:not(.active):not([aria-selected="true"]),
html body #tab-admin .tabs-nav .tab-btn.active.v367159-pressing:hover {
  color: var(--text-main, var(--text-primary, #24334a)) !important;
  background: linear-gradient(115deg, rgba(91, 151, 224, .30), rgba(153, 112, 222, .26)) !important;
  border-color: rgba(133, 166, 231, .82) !important;
  box-shadow: inset 0 0 0 1px rgba(205, 222, 255, .24),
              0 5px 18px rgba(74, 107, 177, .24) !important;
  transform: scale(.985) !important;
  filter: brightness(1.08) !important;
  transition: background .12s ease, border-color .12s ease,
              box-shadow .12s ease, transform .12s ease !important;
}

/* Preserve each theme's accent instead of forcing a single purple hue. */
html body.theme-halloween #app-sidebar #main-tabs-nav .tab-btn.v367159-pressing,
html body.theme-halloween #tab-admin .admin-subnav-btn.v367159-pressing,
html body.theme-halloween #tab-admin .customer-admin-subnav-btn.v367159-pressing,
html body.theme-halloween #tab-admin .backup-update-tab-btn.v367159-pressing {
  background: linear-gradient(115deg, rgba(214, 113, 54, .26), rgba(151, 85, 191, .28)) !important;
  border-color: rgba(210, 151, 224, .78) !important;
}
html body.theme-winter #app-sidebar #main-tabs-nav .tab-btn.v367159-pressing,
html body.theme-winter #tab-admin .admin-subnav-btn.v367159-pressing,
html body.theme-winter #tab-admin .customer-admin-subnav-btn.v367159-pressing,
html body.theme-winter #tab-admin .backup-update-tab-btn.v367159-pressing {
  background: linear-gradient(115deg, rgba(66, 154, 215, .28), rgba(119, 157, 229, .24)) !important;
  border-color: rgba(135, 205, 246, .8) !important;
}
html body.theme-ocean #app-sidebar #main-tabs-nav .tab-btn.v367159-pressing,
html body.theme-ocean #tab-admin .admin-subnav-btn.v367159-pressing,
html body.theme-ocean #tab-admin .customer-admin-subnav-btn.v367159-pressing,
html body.theme-ocean #tab-admin .backup-update-tab-btn.v367159-pressing {
  background: linear-gradient(115deg, rgba(32, 177, 181, .27), rgba(70, 133, 214, .25)) !important;
  border-color: rgba(102, 218, 218, .82) !important;
}

/* Portrait drawer: scrim begins immediately under the brand/header row, so
   the separate category-toggle strip is included in the outside blur. The
   toggle itself remains above the scrim and can still close the drawer. */
@media (max-width: 980px) and (orientation: portrait) {
  html body .header-menu-row {
    position: relative !important;
    z-index: 1801 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
  }
  html body .header-menu-row .mobile-menu-toggle {
    position: relative !important;
    z-index: 1802 !important;
    pointer-events: auto !important;
  }

  html body #sidebar-backdrop.sidebar-backdrop,
  html body .sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: var(--v36-app-header-height, 104px) 0 0 0 !important;
    z-index: 1690 !important;
    width: 100vw !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: rgba(8, 18, 38, .25) !important;
    -webkit-backdrop-filter: blur(7px) saturate(112%) !important;
    backdrop-filter: blur(7px) saturate(112%) !important;
    transition: opacity .20s ease, visibility .20s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  html body.sidebar-expanded #sidebar-backdrop.sidebar-backdrop,
  html body.sidebar-expanded .sidebar-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  html body.sidebar-collapsed #sidebar-backdrop.sidebar-backdrop,
  html body.sidebar-collapsed .sidebar-backdrop {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Dim and blur should be visible in the default dark appearance too. */
  html body.default-dark-mode #sidebar-backdrop,
  html body.theme-default.default-dark-mode #sidebar-backdrop,
  html body.dark-mode #sidebar-backdrop {
    background: rgba(0, 5, 18, .43) !important;
    -webkit-backdrop-filter: blur(8px) saturate(92%) brightness(.80) !important;
    backdrop-filter: blur(8px) saturate(92%) brightness(.80) !important;
  }

  html body.default-light-mode #sidebar-backdrop,
  html body.theme-default.default-light-mode #sidebar-backdrop,
  html body.light-mode #sidebar-backdrop {
    background: rgba(65, 87, 128, .13) !important;
    -webkit-backdrop-filter: blur(7px) saturate(105%) brightness(.97) !important;
    backdrop-filter: blur(7px) saturate(105%) brightness(.97) !important;
  }

  html body.theme-halloween #sidebar-backdrop {
    background: rgba(23, 8, 32, .38) !important;
    -webkit-backdrop-filter: blur(8px) saturate(105%) !important;
    backdrop-filter: blur(8px) saturate(105%) !important;
  }
  html body.theme-winter #sidebar-backdrop {
    background: rgba(3, 17, 39, .36) !important;
    -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
    backdrop-filter: blur(8px) saturate(112%) !important;
  }
  html body.theme-ocean #sidebar-backdrop {
    background: rgba(0, 26, 35, .37) !important;
    -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
    backdrop-filter: blur(8px) saturate(112%) !important;
  }
}
