/* Scoped installation UI; keeps the existing phone toolbar unchanged. */
[data-pwa-install][hidden] { display: none !important; }
button.mf-install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid #b9d7f2;
  border-radius: 10px;
  background: #f0f7ff;
  color: #0b2e59;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.mf-install-button svg { flex: 0 0 18px; }
.mf-auth > .mf-install-button { margin-top: 12px; }
#mfStudentDrawer .mf-install-button { width: 100%; margin-block: 12px; }
button.mf-install-button:hover { background: #e1efff; }
button.mf-install-button:disabled { opacity: .65; cursor: wait; }
.mf-install-button:focus-visible, #mfInstallClose:focus-visible {
  outline: 3px solid #378ae6;
  outline-offset: 3px;
}
#mfInstallDialog {
  width: min(440px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 22px;
  overflow-y: auto;
  border: 1px solid #b9d7f2;
  border-radius: 18px;
  background: #fff;
  color: #0b2e59;
  text-align: start;
  font-family: 'Cairo', 'Inter', sans-serif;
  box-shadow: 0 20px 60px #071f3e40;
}
#mfInstallDialog::backdrop { background: #071f3e99; }
#mfInstallDialog .mf-install-heading { display: flex; align-items: center; gap: 12px; }
#mfInstallDialog .mf-install-heading img { width: 48px; height: 48px; border-radius: 10px; }
#mfInstallTitle { margin: 0; font-size: 18px; font-weight: 800; }
#mfInstallIntro, #mfInstallSteps { margin-block: 16px; font-size: 13px; line-height: 1.85; }
#mfInstallSteps { padding-inline-start: 22px; list-style: decimal; }
#mfInstallSteps li + li { margin-block-start: 10px; }
#mfInstallOnline { margin-block: 16px; padding: 10px 12px; border-radius: 10px; background: #f0f7ff; font-size: 12px; line-height: 1.8; }
#mfInstallClose { width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: #0b2e59; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
#mfInstallDialog #mfInstallClose { color: #fff !important; }
html[data-theme='dark'] .mf-install-button { background: #192f4b; border-color: #486a8e; color: #e4f0ff; }
html[data-theme='dark'] .mf-install-button:hover { background: #25435f; }
html[data-theme='dark'] #mfInstallDialog { background: #162433; border-color: #486a8e; color: #e4f0ff; }
html[data-theme='dark'] #mfInstallOnline { background: #22384e; color: #d5e8ff; }
html[data-theme='dark'] #mfInstallClose { background: #23649a; color: #fff; }
button.mf-install-video-link { display: inline-flex; align-items: center; gap: 8px; margin-block: 0 16px; padding: 6px 0; border: 0; background: none; color: #1365c7; font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
button.mf-install-video-link:hover { color: #0b4fa3; }
.mf-install-video-link:focus-visible { outline: 3px solid #378ae6; outline-offset: 3px; border-radius: 4px; }
html[data-theme='dark'] button.mf-install-video-link { color: #8fc3ff; }
html[data-theme='dark'] button.mf-install-video-link:hover { color: #bcd9ff; }
#mfInstallVideoDialog { width: min(960px, calc(100vw - 16px)); max-width: calc(100vw - 16px); margin: auto; padding: 12px; border: 0; border-radius: 14px; background: #071f3e; color: #fff; font-family: 'Cairo', 'Inter', sans-serif; }
#mfInstallVideoDialog::backdrop { background: #000c; }
.mf-install-video-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 10px; }
#mfInstallVideoTitle { margin: 0; font-size: 15px; font-weight: 800; }
#mfInstallVideoClose { min-height: 40px; padding: 8px 14px; border: 0; border-radius: 10px; background: #fff; color: #0b2e59; font: inherit; font-weight: 700; cursor: pointer; }
#mfInstallVideoClose:focus-visible { outline: 3px solid #8fc3ff; outline-offset: 3px; }
#mfInstallVideo { display: block; width: 100%; max-height: calc(100dvh - 90px); border-radius: 8px; background: #000; }
@media (max-width: 360px) {
  #mfInstallDialog { padding: 16px; }
  #mfInstallTitle { font-size: 16px; }
}
