/* Embed region below global navbar (ir-tool-shell pages).
   Do not use min-height: 0 on <main> here: with flex:1 it lets the main box shrink
   shorter than the iframe’s min-height, so overflow paints over #cta below. */
html.ir-shell-html {
  min-height: 100%;
}

body.ir-shell-body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Lusail', Lusail, Arial, sans-serif;
  color: #333;
  background: #ffffff;
}

.ir-shell-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: auto;
  background: #ffffff;
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  /* Match .navbar-inner horizontal inset (barwa-navbar-en.css / barwa-navbar-ar.css) */
  padding-left: calc(2 * var(--navbar-padding-x));
  padding-right: calc(2 * var(--navbar-padding-x));
}

@media (max-width: 1279px) {
  .ir-shell-main {
    padding-left: calc(2 * var(--navbar-padding-x-sm));
    padding-right: calc(2 * var(--navbar-padding-x-sm));
  }
}

@media (max-width: 767px) {
  .ir-shell-main {
    padding-left: calc(2 * var(--navbar-padding-x-xs));
    padding-right: calc(2 * var(--navbar-padding-x-xs));
  }
}

@media (max-width: 639px) {
  .ir-shell-main {
    padding-left: clamp(var(--space-sm), 2vw + var(--space-xs), var(--space-md));
    padding-right: clamp(var(--space-sm), 2vw + var(--space-xs), var(--space-md));
  }
}

/* Keep promo CTA above any stray stacking from replaced elements (iframes) */
body.ir-shell-body #cta.cta-build-future {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.ir-shell-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f8f8;
}

.ir-shell-back {
  font-size: 0.9375rem;
  color: #00417b;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.ir-shell-title {
  flex: 1;
  min-width: 160px;
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 400;
  color: #1b3a6b;
}

.ir-shell-ticker {
  flex-shrink: 0;
  height: 56px;
  max-height: 56px;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
  overflow: hidden;
  overflow-x: clip;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  line-height: 0;
}

.ir-shell-ticker::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.ir-shell-ticker iframe {
  width: 100%;
  height: 56px;
  max-height: 56px;
  border: 0;
  display: block;
}

.ir-shell-frame-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 880px);
  background: #f0f0f0;
}

.ir-shell-frame-wrap iframe {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  min-height: min(72vh, 880px);
  display: block;
  background: #ffffff;
}

/* Fact sheet: full width within main (no side margins from a centered column) */
body.ir-tool--factsheet .ir-shell-toolbar,
body.ir-tool--factsheet .ir-shell-ticker,
body.ir-tool--factsheet .ir-shell-frame-wrap {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.ir-tool--factsheet .ir-shell-title {
  text-align: center;
}
