/* Omni-HT Portal Styles — responsive base v7 */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overscroll-behavior: none; overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { color-scheme: only light; }

body {
  min-height: 100vh;
  min-height: 100svh;
}

.portal-card { flex-shrink: 0; overflow-wrap: anywhere; isolation: isolate; contain: paint; overflow: hidden; }
.portal-card button, .portal-card input, .portal-card a { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.portal-card .form-checkbox span { min-width: 0; }
.portal-card[data-free] { position: relative; flex-shrink: 0; }
.portal-container:has([data-free]) { display: grid; align-items: start; justify-content: stretch; }
.centered-wrapper:has([data-free]) { justify-content: flex-start !important; padding:16px 16px 80px; }
.portal-card[data-free] { margin-left: max(0px, calc((100% - var(--card-width)) * var(--card-x))); margin-top: max(0px, calc((var(--safe-height, calc(100svh - 112px)) - var(--card-height, 0px)) * var(--card-y))); }
.portal-form { min-width: 0; }
.portal-card h1, .portal-card p, .portal-card .btn, .form-checkbox { line-height: 1.35; }
.credential-login { margin: 16px 0; }
.capture-form { margin: 16px 0; text-align: left; color: #333; }
.capture-form label:not(.form-checkbox) { display: block; margin-top: 10px; font-size: 14px; }
.capture-form input:not([type=radio]):not([type=checkbox]) { display: block; width: 100%; min-width: 0; margin-top: 5px; padding: 10px; border: 1px solid #aaa; border-radius: 6px; font: inherit; font-size: 16px; }
.capture-form [hidden] { display: none !important; }
.capture-channels { display: flex; gap: 16px; border: 0; padding: 0; margin: 0; }
.capture-error { color: #a11; margin: 8px 0; }
.capture-form [data-error]:not([hidden]), #terms-error:not([hidden]) { display: block; color: #a11; font-size: 14px; margin: 6px 0; }
.credential-login label { display: block; margin-top: 10px; font-size: 14px; }
.credential-login input:not([type=hidden]) { display: block; width: 100%; min-width: 0; margin-top: 5px; padding: 10px; border: 1px solid #aaa; border-radius: 6px; font: inherit; font-size: 16px; }
.login-error { color: #b42318; margin: 0 0 12px; font-size: 14px; }

body.scroll-layout {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
}
body.scroll-layout::-webkit-scrollbar { display: none; }

.portal-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
  display: block;
}

/* Overlay sits between bg image and card — dim/tint layer */
.portal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.centered-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(12px, 3vw, 20px) clamp(8px, 2vw, 20px) 80px;
}

.portal-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.scroll-end-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.scroll-end-bg {
  width: 100%;
  height: auto;
  display: block;
  flex-shrink: 0;
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}

.scroll-end-anchor {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 30px 15px;
  gap: 12px;
}

.scroll-sticky-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-top: 100vh;
}

.sticky-block {
  position: sticky;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  z-index: 10;
}

.portal-footer-detached {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: 90%;
  overflow-wrap: anywhere;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  cursor: pointer;
}

.form-checkbox input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 10px;
}
.btn:hover { opacity: 0.9; }
.portal-card .btn, #disconnect-btn { font-family:inherit; min-height:44px; min-width:min(44px,100%); max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.btn-primary { background: #C9A45C; color: #fff; }

/* Logo image safety net */
.portal-logo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
