/* ============================================================
   GLASS MODAL SCROLLBAR
   A floating "glass" scroll thumb for modal dialogs, matching the
   look of the page-level glass scrollbar (see e.g. twin.js's
   #glassScrollbar/#glassThumb) instead of the browser's native
   scrollbar - which several modals showed poking straight past their
   own rounded corners (native scrollbars render flush to the border
   edge at the very top/bottom of the track, ignoring border-radius).

   Required markup around an existing modal card:
     <div class="modal-card ... glass-scroll-host">
         <div class="glass-scroll-inner" id="...">...all existing
             modal content goes here, unchanged...</div>
         <div class="glass-scroll-track"><div class="glass-scroll-thumb"></div></div>
     </div>
   Then call initGlassModalScroll(document.getElementById('...')) once
   (see assets/glassModalScroll.js) - it stays in sync with content
   changes and window resizes on its own after that.
   ============================================================ */
.glass-scroll-host {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.glass-scroll-inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.glass-scroll-inner::-webkit-scrollbar { display: none; }
.glass-scroll-track {
    position: absolute;
    top: 14px; bottom: 14px; right: 6px;
    width: 6px;
    border-radius: 20px;
    background: rgba(138, 180, 176, 0.12);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 6;
}
.glass-scroll-track.visible { opacity: 1; pointer-events: auto; }
.glass-scroll-thumb {
    position: absolute;
    left: 0; width: 100%;
    background: linear-gradient(180deg, #a0c8c4, #5b8c8a);
    border-radius: 20px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 0 8px rgba(91, 140, 138, 0.3);
    cursor: grab;
}
.glass-scroll-thumb:active { cursor: grabbing; }
.night-mode .glass-scroll-track { background: rgba(255, 255, 255, 0.05); }
.night-mode .glass-scroll-thumb {
    background: linear-gradient(180deg, #8ab4b0, #3e6a68);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08), 0 0 10px rgba(138, 180, 176, 0.35);
}
