/*
 * HTG.iRIS/PACS Mobile Review
 * Only active when mobile.js adds the htg-mobile class.
 */

#htg-mobile-rotate {
  display: none;
}

body.htg-mobile {
  margin: 0;
  overscroll-behavior: none;
  background: #020617;
}

body.htg-mobile,
body.htg-mobile #root {
  width: 100%;
  min-width: 0 !important;
  min-height: 100%;
}

/* Portrait mode: hide the broken desktop UI and request landscape. */
body.htg-mobile.htg-portrait {
  overflow: hidden !important;
}

body.htg-mobile.htg-portrait #root {
  visibility: hidden;
  pointer-events: none;
}

body.htg-mobile.htg-portrait #htg-mobile-rotate {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(24px + env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    calc(24px + env(safe-area-inset-left));
  color: #f8fafc;
  background:
    radial-gradient(circle at 50% 25%, #123a70 0%, #071a3a 40%, #020617 100%);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

#htg-mobile-rotate .htg-rotate-card {
  width: min(100%, 380px);
  padding: 34px 26px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  background: rgba(8, 24, 54, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

#htg-mobile-rotate .htg-rotate-icon {
  display: block;
  margin-bottom: 18px;
  color: #38bdf8;
  font-size: 58px;
  line-height: 1;
}

#htg-mobile-rotate .htg-rotate-brand {
  margin-bottom: 8px;
  color: #38bdf8;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#htg-mobile-rotate h1 {
  margin: 0 0 12px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
}

#htg-mobile-rotate p {
  margin: 0;
  color: #b9c9df;
  font-size: 16px;
  line-height: 1.55;
}

/* Landscape mode */
body.htg-mobile.htg-landscape {
  overflow: hidden;
}

body.htg-mobile.htg-landscape #root {
  visibility: visible;
  width: 100vw;
  height: 100dvh;
}

@media (orientation: landscape) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
}
