/* v2.26 — accurate Live Teaching status, clean modal scrolling, and logout cleanup. */

/* Temporary Result: one clean scroll surface inside the rounded dialog. */
#modal-temporary-result {
  align-items: center !important;
  overflow: hidden !important;
}
#modal-temporary-result > div {
  width: min(1180px, 100%) !important;
  height: min(780px, calc(100dvh - var(--mv-modal-safe-top) - 28px)) !important;
  max-height: calc(100dvh - var(--mv-modal-safe-top) - 28px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
}
#modal-temporary-result > div > * {
  flex: 0 0 auto !important;
}
#modal-temporary-result > div > :first-child {
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
}
#modal-temporary-result > div > :last-child {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 5 !important;
}
#modal-temporary-result #temporary-result-students {
  min-height: 0 !important;
  overflow: visible !important;
}

/* Resume attendance: keep the scrollbar inside the dialog body, not outside the card. */
#modal-next-meeting {
  overflow: hidden !important;
}
#modal-next-meeting .mv-resume-dialog {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  max-height: calc(100dvh - var(--mv-modal-safe-top) - 28px) !important;
}
#modal-next-meeting .mv-resume-header {
  flex: 0 0 auto !important;
}
#modal-next-meeting .mv-resume-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
}

/* Neutral inset scrollbars instead of the bright browser rail. */
#modal-temporary-result > div,
#modal-next-meeting .mv-resume-body {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
#modal-temporary-result > div::-webkit-scrollbar,
#modal-next-meeting .mv-resume-body::-webkit-scrollbar { width: 8px; }
#modal-temporary-result > div::-webkit-scrollbar-track,
#modal-next-meeting .mv-resume-body::-webkit-scrollbar-track { background: transparent; }
#modal-temporary-result > div::-webkit-scrollbar-thumb,
#modal-next-meeting .mv-resume-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
#modal-temporary-result > div::-webkit-scrollbar-thumb:hover,
#modal-next-meeting .mv-resume-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@supports not (height: 100dvh) {
  #modal-temporary-result > div {
    height: min(780px, calc(100vh - var(--mv-modal-safe-top) - 28px)) !important;
    max-height: calc(100vh - var(--mv-modal-safe-top) - 28px) !important;
  }
  #modal-next-meeting .mv-resume-dialog {
    max-height: calc(100vh - var(--mv-modal-safe-top) - 28px) !important;
  }
}

@media (max-width: 768px) {
  #modal-temporary-result > div {
    height: calc(100dvh - var(--mv-modal-safe-top) - 20px) !important;
    max-height: calc(100dvh - var(--mv-modal-safe-top) - 20px) !important;
    border-radius: 24px !important;
  }
  #modal-next-meeting .mv-resume-dialog {
    max-height: calc(100dvh - var(--mv-modal-safe-top) - 20px) !important;
    border-radius: 24px !important;
  }
}
