/* Emulator / GUI w ramce marketingowej (?embed=1 lub iframe) */
html.sc-embed,
html.sc-embed body {
  margin: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #eef2ef !important;
}
html.sc-embed .layout {
  display: grid !important;
  grid-template-columns: 236px minmax(0, 1fr) !important;
  width: 1180px !important;
  max-width: none !important;
  min-height: 740px !important;
  height: 740px !important;
  overflow: hidden !important;
}
html.sc-embed .side {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
}
html.sc-embed .side::-webkit-scrollbar { width: 0; height: 0; }
html.sc-embed .side .brand-cta,
html.sc-embed .side .brand-feedback { display: none !important; }
html.sc-embed .side .nav {
  flex: 1 1 auto;
  overflow: hidden !important;
  scrollbar-width: none !important;
}
html.sc-embed .side .nav::-webkit-scrollbar { width: 0; height: 0; }
html.sc-embed .side .nav button {
  padding: 6px 4px !important;
  font-size: 13px !important;
}
html.sc-embed #sc-emulator-banner { display: none !important; }
html.sc-embed .main {
  min-width: 0 !important;
  height: 740px !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
html.sc-embed .main::-webkit-scrollbar { width: 0; height: 0; }
html.sc-embed .mobilebar { display: none !important; }
html.sc-embed .demo-ribbon { display: none !important; }
html.sc-embed body.smartchem-shell-ready { padding-top: 0 !important; }
html.sc-embed .registration-wrap {
  min-height: 740px !important;
  height: 740px !important;
  overflow: auto !important;
}

/* Ramka na telefonie: układ mobilny programu (bez skali 1180→miniatura) */
html.sc-embed-mobile,
html.sc-embed-mobile body {
  margin: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #eef2ef !important;
}
html.sc-embed-mobile #sc-emulator-banner { display: none !important; }
html.sc-embed-mobile #app-boot-splash { display: none !important; }
html.sc-embed-mobile body.smartchem-shell-ready { padding-top: 0 !important; }
html.sc-embed-mobile #app,
html.sc-embed-mobile #app-root,
html.sc-embed-mobile .layout {
  height: 100% !important;
  min-height: 100% !important;
}
html.sc-embed-mobile .main {
  height: 100% !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html.sc-embed-mobile .demo-ribbon { display: none !important; }
html.sc-embed-mobile .mobilebar {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}
html.sc-embed-mobile body {
  overscroll-behavior: none;
}

/* Pełny ekran (mobile=1): zawsze układ mobilny, na cały ekran — nie desktop */
html.sc-force-mobile,
html.sc-force-mobile body {
  margin: 0 !important;
  min-height: 100% !important;
  background: var(--bg, #eef2ef) !important;
}
html.sc-force-mobile .layout {
  display: block !important;
  grid-template-columns: none !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
}
html.sc-force-mobile .side {
  display: none !important;
}
html.sc-force-mobile .main {
  width: 100% !important;
  max-width: none !important;
  padding: 14px 14px 96px !important;
  box-sizing: border-box !important;
}
html.sc-force-mobile .top {
  display: block !important;
}
html.sc-force-mobile .top h2 {
  font-size: clamp(22px, 6vw, 27px) !important;
  margin-bottom: 10px !important;
}
html.sc-force-mobile .top-mrirw-status {
  max-width: none !important;
  flex: none !important;
  margin: 0 0 10px !important;
}
html.sc-force-mobile .span4,
html.sc-force-mobile .span5,
html.sc-force-mobile .span6,
html.sc-force-mobile .span7,
html.sc-force-mobile .span8,
html.sc-force-mobile .field,
html.sc-force-mobile .field.third,
html.sc-force-mobile .treatments-page .treatment-form-card,
html.sc-force-mobile .treatments-page .treatment-registry-card {
  grid-column: span 12 !important;
}
html.sc-force-mobile .mobilebar {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9 !important;
  background: #fff !important;
  border: 0 !important;
  border-top: 1px solid var(--line, #c5d4bc) !important;
  border-radius: 0 !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: 0 -6px 18px rgba(15, 66, 40, 0.12) !important;
}
html.sc-force-mobile .mobilebar button {
  font-size: 11px !important;
  padding: 10px 4px !important;
  border-radius: 18px !important;
  background: var(--mint, #e8f0e8) !important;
  color: var(--green, #1b3d2f) !important;
  box-shadow: none !important;
}
html.sc-force-mobile .mobilebar button.active {
  background: var(--green, #1b3d2f) !important;
  color: #fff !important;
}
html.sc-force-mobile .hero h2 {
  font-size: clamp(22px, 6vw, 27px) !important;
}
html.sc-force-mobile .registration-wrap {
  min-height: calc(100vh - 72px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px !important;
}
html.sc-force-mobile .registration-card {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}
html.sc-force-mobile .demo-ribbon {
  display: none !important;
}

/* Zatwierdzone okno rejestracji w ramce na stronie — cała karta, bez paska */
html.sc-embed-reg,
html.sc-embed-reg body {
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f8f9f8 !important;
}
html.sc-embed-reg #sc-emulator-banner,
html.sc-embed-reg #app-boot-splash { display: none !important; }
html.sc-embed-reg body.smartchem-shell-ready,
html.sc-embed-reg body { padding-top: 0 !important; }
html.sc-embed-reg #app,
html.sc-embed-reg #app-root {
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
html.sc-embed-reg .registration-wrap {
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  align-items: flex-start !important;
  padding: 6px !important;
}
html.sc-embed-reg .registration-card {
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  margin: 0 auto;
  padding: 28px !important; /* jak Windows / program — akceptacja formy 2026-09-08 */
  max-width: 100% !important; /* mobile: pełna szer. iframe, bez skali */
  box-sizing: border-box !important;
}
/* Desktop: iframe 852px — karta +50% (520→780) */
@media (min-width: 700px) {
  html.sc-embed-reg .registration-card {
    max-width: 780px !important;
  }
}
html.sc-embed-reg .registration-card > p.muted {
  margin-bottom: 0;
}
html.sc-embed-reg .registration-card .form {
  gap: 10px !important;
}
