/*
 * Cashback Pro V36.7.119
 * 1) Restore the established V36.7.103 landscape document scroll behavior.
 * 2) Remove the last translucent square parent behind the rounded Admin shell.
 */

/* -------------------------------------------------------------------------
   A. Landscape scrolling
   V36.7.117 accidentally made BODY overflow-y:visible while only HTML had an
   auto overflow container, and forced BODY/main into a new display flow.
   The earlier V36.7.103 rules are the known-good approach for this project:
   HTML and BODY both remain auto-scrollers; Admin wrappers stay in normal flow.
   ------------------------------------------------------------------------- */
@media (orientation: landscape) and (max-width: 1100px) {
  html,
  html body {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }

  html body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-overflow-scrolling: touch !important;
  }

  html body main.main-container {
    display: block !important;
    position: relative !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    touch-action: auto !important;
    transform: none !important;
  }

  html body #tab-admin,
  html body #tab-admin > .admin-card,
  html body #tab-admin > .admin-card > .admin-nav-shell,
  html body #tab-admin .admin-pane,
  html body #tab-admin .admin-pane.active,
  html body #tab-admin .backup-update-panel,
  html body #tab-admin .backup-update-panel.active {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    touch-action: pan-y !important;
  }

  html body #tab-admin > .admin-card > .admin-nav-shell {
    margin-bottom: 18px !important;
  }

  html body footer.app-footer {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-top: 24px !important;
    transform: none !important;
  }

  /* The side navigation itself remains a separate scrollable drawer. */
  html body #app-sidebar.app-sidebar {
    touch-action: pan-y !important;
  }
}

/* -------------------------------------------------------------------------
   B. Admin outer backdrop
   The last square haze is the direct #tab-admin > .admin-card wrapper.
   V36.7.116 has a more specific selector painting that parent as a glass card;
   the generic V36.7.118 reset could not win the cascade. Match the exact
   theme-specific selector and clear that parent only. The rounded
   .admin-nav-shell remains the one and only frame around the category buttons.
   ------------------------------------------------------------------------- */
html body.theme-default.default-light-mode #tab-admin > .admin-card,
html body.default-light-mode #tab-admin > .admin-card,
html.theme-bootstrap-light body #tab-admin > .admin-card {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  background-clip: border-box !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  overflow: visible !important;
}

html body.theme-default.default-light-mode #tab-admin > .admin-card::before,
html body.theme-default.default-light-mode #tab-admin > .admin-card::after,
html body.default-light-mode #tab-admin > .admin-card::before,
html body.default-light-mode #tab-admin > .admin-card::after,
html.theme-bootstrap-light body #tab-admin > .admin-card::before,
html.theme-bootstrap-light body #tab-admin > .admin-card::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* The outer Admin nav remains a single rounded shell, independent of the
   parent wrapper. Do not paint a second pseudo-panel behind it. */
html body.theme-default.default-light-mode #tab-admin > .admin-card > .admin-nav-shell,
html body.default-light-mode #tab-admin > .admin-card > .admin-nav-shell,
html.theme-bootstrap-light body #tab-admin > .admin-card > .admin-nav-shell {
  border-radius: 30px !important;
  border-style: solid !important;
  border-width: 1px !important;
  background-clip: padding-box !important;
  overflow: hidden !important;
}

/* Prevent a shadow/outline from the legacy parent from leaking around child
   corners, while keeping every Admin pane and nested card untouched. */
html body.theme-default.default-light-mode #tab-admin > .admin-card > .admin-nav-shell + .admin-pane,
html body.default-light-mode #tab-admin > .admin-card > .admin-nav-shell + .admin-pane {
  margin-top: 16px !important;
}

@media (max-width: 700px) {
  html body.theme-default.default-light-mode #tab-admin > .admin-card > .admin-nav-shell,
  html body.default-light-mode #tab-admin > .admin-card > .admin-nav-shell,
  html.theme-bootstrap-light body #tab-admin > .admin-card > .admin-nav-shell {
    border-radius: 26px !important;
  }
}
