/* modal_scroll_force.css — High-specificity override for scroll + actions visibility
   Use with HTML:
     <div id="customModal" class="appModal" style="display:none;">
       <div class="appModal-content">
         <div id="modalText"></div>
         <div class="appModal-actions">...</div>
       </div>
     </div>
*/

/* Overlay */
#customModal.appModal {
  position: fixed !important;
  inset: 0 !important;
  display: none;
  align-items: flex-start !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.45) !important;
  z-index: 10000 !important;
  padding: 10vh 16px 16px !important;
  box-sizing: border-box !important;
}
#customModal.appModal.is-open { display: flex !important; }

/* Modal card (flex column, capped height) */
#customModal .appModal-content {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
  width: min(92%, 720px) !important;
  max-height: 80vh !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

/* Scrollable body */
#customModal #modalText {
  padding: 20px 20px 0 20px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;     /* <-- force scroll here */
  line-height: 1.4 !important;
  font-size: 15px !important;
  color: #333 !important;
  word-break: break-word !important;
  overscroll-behavior: contain !important;
  white-space: normal !important; /* or pre-line if you set textContent */
}

/* Actions row */
#customModal .appModal-actions {
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  padding: 12px 20px 16px 20px !important;
  border-top: 1px solid #eee !important;
  background: #fff !important;
  flex: 0 0 auto !important;     /* never shrink */
  /* Not sticky; buttons stay visible because only the text scrolls */
}

/* Optional tiny entrance animation */
@keyframes modalIn {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
#customModal.appModal.is-open .appModal-content { animation: modalIn .16s ease-out; }