/* YELLA v1.2.79 — scrolling belongs to the content, never to the chrome containing X.
   Replaces the v1.2.78 scrollbar-hiding workaround with separate scroll surfaces.
   The shell stays stationary; all original form and modal controls retain their IDs. */

/* Shared backdrop modal shells: Post a Fish, account and event suggestions. */
html body :is(#catch-modal,#auth-modal,#event-modal) > .modal-box {
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:0!important;
  isolation:isolate;
  min-height:0!important;
  max-height:calc(100dvh - 18px)!important;
}
html body :is(#catch-modal,#auth-modal,#event-modal) .modal-box > .yella-modal-scroll-v1279 {
  box-sizing:border-box;
  display:block;
  flex:0 1 auto;
  min-height:0;
  width:100%;
  max-height:calc(100dvh - 20px);
  padding:50px clamp(18px,4vw,43px) 25px;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none!important;
  -ms-overflow-style:none;
  position:relative;
  z-index:1;
}
html body :is(#catch-modal,#auth-modal,#event-modal) .yella-modal-scroll-v1279::-webkit-scrollbar { display:none!important;width:0!important;height:0!important; }
html body #catch-modal .modal-box > .yella-modal-scroll-v1279 {
  padding:45px clamp(12px,3.7vw,22px) 21px;
}
html body :is(#catch-modal,#auth-modal,#event-modal) .modal-box > button.close-modal,
html body #catch-modal .modal-box:has(#yella-quicklog-stage-photo.is-active) > button.close-modal,
html body #catch-modal .modal-box:has(#yella-quicklog-stage-details.is-active) > button.close-modal {
  position:absolute!important;
  inset:11px 12px auto auto!important;
  z-index:100!important;
  display:grid!important;
  place-items:center!important;
  box-sizing:border-box!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #5b9ab5!important;
  border-radius:9px!important;
  background:#05283b!important;
  color:#f4faff!important;
  font:750 23px/1 system-ui,sans-serif!important;
  box-shadow:0 1px 8px #00131c60!important;
  transform:none!important;
  cursor:pointer;
  touch-action:manipulation;
}
html body :is(#catch-modal,#auth-modal,#event-modal) .modal-box > button.close-modal:focus-visible {outline:2px solid #ffd468!important;outline-offset:2px!important}

/* Native dialog shells: Points, install instructions and profile editing. */
html body :is(#yella-points-dialog,#yella-pwa-help,dialog.yp-edit-dialog) {
  position:fixed!important;
  overflow:hidden!important;
  padding:0!important;
  max-height:calc(100dvh - 20px)!important;
}
html body :is(#yella-points-dialog,#yella-pwa-help,dialog.yp-edit-dialog) > .yella-dialog-scroll-v1279 {
  box-sizing:border-box;
  width:100%;
  max-height:calc(100dvh - 22px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none!important;
  -ms-overflow-style:none;
  padding:56px clamp(18px,4vw,30px) 22px;
}
html body :is(#yella-points-dialog,#yella-pwa-help,dialog.yp-edit-dialog) > .yella-dialog-scroll-v1279::-webkit-scrollbar {display:none!important;width:0!important;height:0!important}
html body :is(#yella-points-dialog,#yella-pwa-help,dialog.yp-edit-dialog) > :is(.yella-points-close,.yella-pwa-help-x-v1212,.yp-dialog-close) {
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  z-index:80!important;
  margin:0!important;
}
html body #yella-points-dialog > .yella-points-close {width:34px!important;height:34px!important;border-radius:9px!important}
html body dialog.yp-edit-dialog > .yp-dialog-close {width:36px!important;height:36px!important;border-radius:10px!important}
html body dialog.yp-edit-dialog > .yella-dialog-scroll-v1279 {padding:55px clamp(16px,4vw,30px) 25px}
html body #yella-pwa-help > .yella-dialog-scroll-v1279 {padding:55px 23px 22px}

/* Catch correction: the original .inner becomes the scroller; move X to outer dialog. */
html body #yella-edit-catch-dialog {
  overflow:hidden!important;
  padding:0!important;
  max-height:calc(100dvh - 18px)!important;
}
html body #yella-edit-catch-dialog > .yella-edit-catch-inner {
  box-sizing:border-box;
  max-height:calc(100dvh - 20px);
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch;
  padding-top:55px!important;
}
html body #yella-edit-catch-dialog > .yella-edit-catch-inner::-webkit-scrollbar {display:none!important;width:0!important;height:0!important}
html body #yella-edit-catch-dialog > .yella-edit-catch-x {
  position:absolute!important;top:12px!important;right:13px!important;z-index:90!important;
  height:34px!important;width:34px!important;border-radius:9px!important;
  margin:0!important;
}

/* Mobile More sheet: its grab handle/header (and X) no longer scroll. */
html body #yella-mobile-more-v190 .yella-more-sheet {
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  min-height:0;
}
html body #yella-mobile-more-v190 .yella-more-links {
  overflow-y:auto!important;
  overflow-x:hidden!important;
  min-height:0;
  overscroll-behavior:contain;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch;
}
html body #yella-mobile-more-v190 .yella-more-links::-webkit-scrollbar {display:none!important;width:0!important;height:0!important}

/* Already-separated body-scrollers for verified catches, profile panels, search and
   notifications: remove painted scroll tracks, not their ability to scroll. */
html body :is(#leader-lightbox .leader-lightbox-details,
 #yella-search-panel .yella-global-results,#yella-notifications-panel .yella-notifications-content,
 .yella-comments-scroll-v191,.yella-quicklog-success-wrap) {
  scrollbar-width:none!important;
  -ms-overflow-style:none;
}
html body :is(#leader-lightbox .leader-lightbox-details,
 #yella-search-panel .yella-global-results,#yella-notifications-panel .yella-notifications-content,
 .yella-comments-scroll-v191,.yella-quicklog-success-wrap)::-webkit-scrollbar {
  display:none!important;width:0!important;height:0!important;
}

@media (max-width:440px) {
 html body #catch-modal .modal-box > .yella-modal-scroll-v1279 {padding-left:12px;padding-right:12px}
 html body :is(#auth-modal,#event-modal) .modal-box > .yella-modal-scroll-v1279 {padding-left:17px;padding-right:17px}
}
/* Extra specificity: older v1.2.77 / v1.2.78 :has() rules must never
   re-enable scrolling on the shell after the content wrapper is introduced. */
html body #catch-modal .modal-box:has(#yella-quicklog-stage-photo.is-active),
html body #catch-modal .modal-box:has(#yella-quicklog-stage-details.is-active) {
  overflow-x:hidden!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
}

/* Keep both photo actions on one line at narrow mobile widths. */
@media(max-width:440px){
 html body #catch-modal #yella-quicklog-stage-photo .yella-quicklog-action {
   white-space:nowrap!important;
   font-size:clamp(10px,3.1vw,13px)!important;
   gap:5px!important;
 }
 html body #catch-modal #yella-quicklog-stage-photo .yella-quicklog-action strong {white-space:nowrap!important}
}
/* Dynamic profile editor has legacy ID-scoped overflow rules with greater
   specificity. Override them so the X is not inside a scroll container. */
html body :is(#profile-content,#yella-public-member-content) dialog.yp-edit-dialog {
 overflow:hidden!important;
 padding:0!important;
 max-height:calc(100dvh - 20px)!important;
}
html body :is(#profile-content,#yella-public-member-content) dialog.yp-edit-dialog > button.yp-dialog-close {
 position:absolute!important;top:12px!important;right:12px!important;
 z-index:90!important;width:36px!important;height:36px!important;
 border-radius:10px!important;margin:0!important;
}
/* Fallback for future dialog-style menus with a close control: never show a
   native track through a close hit target. Actual scrolling remains enabled. */
html body dialog:has(button[aria-label^="Close"]) {
 scrollbar-width:none!important;
 -ms-overflow-style:none;
}
html body dialog:has(button[aria-label^="Close"])::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
