/*
 * Cashback Pro V36.7.120
 * Landscape scroll stability, Admin shell parent cleanup, and seasonal
 * Winter/Ocean ZIP-verification dialog palettes.
 */

/* =========================================================================
   1) LANDSCAPE PHONE SCROLL — ONE ROOT SCROLLER
   Previous attempts set both html and body to overflow-y:auto, creating two
   competing scroll containers. V117 had html height:auto, which lets the root
   grow with content and can remove the scrollport. Keep html at viewport
   height and make it the only scroller; body returns to normal block flow.
   ========================================================================= */
@media (orientation: landscape) and (max-width: 1100px) and (max-height: 850px) {
  html {
    display: block !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  html body {
    display: block !important;
    position: relative !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-overflow-scrolling: auto !important;
  }

  html body .app-header {
    position: relative !important;
    top: auto !important;
  }

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

  html body .tab-content,
  html body .tab-content.active,
  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-x: visible !important;
    overflow-y: visible !important;
    transform: none !important;
    touch-action: pan-y !important;
  }

  /* Disable sticky navigation in short landscape; it must scroll with content. */
  html body #tab-admin > .admin-card > .admin-nav-shell,
  html body #tab-admin > .admin-card > .admin-nav-shell > .admin-subnav {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }

  /* Footer is ordinary content after main, never a flex spacer or fixed bar. */
  html body footer.app-footer {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 22px 0 calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================================================
   2) REMOVE THE LAST SQUARE PARENT BEHIND ROUNDED ADMIN NAVIGATION
   Clear the structural #tab-admin and .admin-card wrappers (including pseudo
   surfaces). The rounded .admin-nav-shell remains the sole outer frame.
   ========================================================================= */
html body #tab-admin,
html body #tab-admin::before,
html body #tab-admin::after,
html body #tab-admin > .admin-card,
html body #tab-admin > .admin-card::before,
html body #tab-admin > .admin-card::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !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;
}

html body #tab-admin > .admin-card {
  box-sizing: border-box !important;
  padding: 0 !important;
  overflow: visible !important;
}

html body #tab-admin > .admin-card > .admin-nav-shell {
  position: relative !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border-radius: 30px !important;
  border-style: solid !important;
  border-width: 1px !important;
  background-clip: padding-box !important;
  overflow: hidden !important;
}

/* No pseudo-frame behind the rounded shell or its layout-only inner wrapper. */
html body #tab-admin > .admin-card > .admin-nav-shell::before,
html body #tab-admin > .admin-card > .admin-nav-shell::after,
html body #tab-admin > .admin-card > .admin-nav-shell > .admin-subnav::before,
html body #tab-admin > .admin-card > .admin-nav-shell > .admin-subnav::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* =========================================================================
   3) THEME-COLORED FOOTER — remove the flat white footer bar in Light mode
   ========================================================================= */
html body.theme-default.default-light-mode footer.app-footer,
html body.default-light-mode footer.app-footer {
  color: #40536d !important;
  background-color: rgba(220, 233, 250, .72) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(110, 160, 226, .17), transparent 58%),
    radial-gradient(ellipse at 100% 100%, rgba(174, 145, 223, .16), transparent 58%),
    linear-gradient(120deg, rgba(222, 237, 252, .78), rgba(234, 229, 249, .76), rgba(218, 239, 237, .74)) !important;
  border-top: 1px solid rgba(118, 148, 190, .30) !important;
  box-shadow: 0 -10px 26px rgba(52, 78, 120, .07), inset 0 1px rgba(255,255,255,.66) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
  backdrop-filter: blur(18px) saturate(135%) !important;
}

html body.theme-default.default-dark-mode footer.app-footer,
html body.default-dark-mode footer.app-footer {
  color: #c8d5ed !important;
  background-color: rgba(15, 26, 47, .78) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(68, 112, 184, .18), transparent 58%),
    radial-gradient(ellipse at 100% 100%, rgba(123, 91, 184, .16), transparent 58%),
    linear-gradient(120deg, rgba(17, 34, 59, .84), rgba(23, 26, 53, .82)) !important;
  border-top: 1px solid rgba(130, 155, 202, .24) !important;
  box-shadow: 0 -10px 26px rgba(0, 0, 0, .14), inset 0 1px rgba(235,243,255,.06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
  backdrop-filter: blur(18px) saturate(135%) !important;
}

/* =========================================================================
   4) WINTER ZIP-CHECK / PROMPT DIALOG — ice-blue frost, no Halloween orange
   ========================================================================= */
html body.theme-winter #theme-dialog-overlay .theme-dialog-card {
  color: #edf7ff !important;
  background-color: rgba(8, 29, 57, .90) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(105, 191, 255, .20), transparent 57%),
    radial-gradient(ellipse at 100% 100%, rgba(152, 212, 255, .16), transparent 58%),
    linear-gradient(135deg, rgba(12, 43, 78, .94), rgba(8, 28, 57, .94) 58%, rgba(13, 45, 77, .92)) !important;
  border: 1px solid rgba(151, 218, 255, .40) !important;
  box-shadow: 0 24px 70px rgba(0, 14, 36, .54), 0 0 30px rgba(83, 180, 255, .12), inset 0 1px rgba(245, 251, 255, .12) !important;
  -webkit-backdrop-filter: blur(24px) saturate(142%) !important;
  backdrop-filter: blur(24px) saturate(142%) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-head,
html body.theme-winter #theme-dialog-overlay .theme-dialog-actions {
  color: #f1f8ff !important;
  background-color: rgba(39, 87, 132, .54) !important;
  background-image: linear-gradient(110deg, rgba(73, 152, 213, .30), rgba(103, 173, 224, .22), rgba(137, 207, 239, .18)) !important;
  border-color: rgba(151, 218, 255, .27) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-message {
  color: #edf7ff !important;
  -webkit-text-fill-color: #edf7ff !important;
  background: transparent !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-mark {
  color: #a9e5ff !important;
  background: linear-gradient(135deg, rgba(54, 145, 213, .28), rgba(130, 197, 241, .22)) !important;
  border: 1px solid rgba(151, 218, 255, .26) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-highlight {
  color: #d4f0ff !important;
  background: rgba(89, 168, 220, .20) !important;
  border: 1px solid rgba(151, 218, 255, .20) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-close,
html body.theme-winter #theme-dialog-overlay .theme-dialog-actions button:not(.theme-dialog-accept) {
  color: #e8f6ff !important;
  background: rgba(117, 174, 218, .14) !important;
  border: 1px solid rgba(151, 218, 255, .28) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-actions .theme-dialog-accept {
  color: #062544 !important;
  background: linear-gradient(115deg, #a9eaff, #65c7f2 55%, #3b9fe0) !important;
  border: 1px solid rgba(188, 235, 255, .48) !important;
  box-shadow: 0 7px 22px rgba(59, 159, 224, .25) !important;
}
html body.theme-winter #theme-dialog-overlay .theme-dialog-input-wrap input,
html body.theme-winter #theme-dialog-overlay .theme-dialog-input-wrap textarea {
  color: #eff8ff !important;
  caret-color: #a9e5ff !important;
  background: rgba(3, 18, 39, .66) !important;
  border: 1px solid rgba(151, 218, 255, .32) !important;
}

/* =========================================================================
   5) OCEAN ZIP-CHECK / PROMPT DIALOG — deep teal / turquoise, distinct from winter
   ========================================================================= */
html body.theme-ocean #theme-dialog-overlay .theme-dialog-card {
  color: #e8fcff !important;
  background-color: rgba(3, 34, 48, .91) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(30, 210, 207, .20), transparent 57%),
    radial-gradient(ellipse at 100% 100%, rgba(37, 135, 174, .19), transparent 58%),
    linear-gradient(135deg, rgba(3, 57, 68, .94), rgba(3, 31, 50, .94) 58%, rgba(4, 54, 70, .92)) !important;
  border: 1px solid rgba(88, 225, 220, .42) !important;
  box-shadow: 0 24px 70px rgba(0, 15, 27, .56), 0 0 30px rgba(26, 207, 201, .12), inset 0 1px rgba(222, 255, 255, .11) !important;
  -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
  backdrop-filter: blur(24px) saturate(145%) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-head,
html body.theme-ocean #theme-dialog-overlay .theme-dialog-actions {
  color: #eaffff !important;
  background-color: rgba(4, 85, 100, .55) !important;
  background-image: linear-gradient(110deg, rgba(8, 156, 162, .30), rgba(23, 127, 158, .24), rgba(17, 102, 135, .18)) !important;
  border-color: rgba(88, 225, 220, .28) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-message {
  color: #e8fcff !important;
  -webkit-text-fill-color: #e8fcff !important;
  background: transparent !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-mark {
  color: #79f2e9 !important;
  background: linear-gradient(135deg, rgba(12, 168, 167, .28), rgba(39, 126, 172, .25)) !important;
  border: 1px solid rgba(88, 225, 220, .28) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-highlight {
  color: #baf9f2 !important;
  background: rgba(14, 156, 153, .20) !important;
  border: 1px solid rgba(88, 225, 220, .20) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-close,
html body.theme-ocean #theme-dialog-overlay .theme-dialog-actions button:not(.theme-dialog-accept) {
  color: #e4ffff !important;
  background: rgba(57, 159, 166, .15) !important;
  border: 1px solid rgba(88, 225, 220, .28) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-actions .theme-dialog-accept {
  color: #042b39 !important;
  background: linear-gradient(115deg, #7af4df, #27c7c7 55%, #238eb5) !important;
  border: 1px solid rgba(130, 245, 225, .46) !important;
  box-shadow: 0 7px 22px rgba(26, 197, 191, .24) !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-input-wrap input,
html body.theme-ocean #theme-dialog-overlay .theme-dialog-input-wrap textarea {
  color: #eaffff !important;
  caret-color: #79f2e9 !important;
  background: rgba(1, 21, 32, .68) !important;
  border: 1px solid rgba(88, 225, 220, .32) !important;
}

/* Seasonal input placeholders keep enough contrast. */
html body.theme-winter #theme-dialog-overlay .theme-dialog-input-wrap input::placeholder,
html body.theme-winter #theme-dialog-overlay .theme-dialog-input-wrap textarea::placeholder {
  color: #9fc8e6 !important;
}
html body.theme-ocean #theme-dialog-overlay .theme-dialog-input-wrap input::placeholder,
html body.theme-ocean #theme-dialog-overlay .theme-dialog-input-wrap textarea::placeholder {
  color: #91c9cc !important;
}
