/* SR Francis rollout v12: final cross-template header and mobile corrections. */

/* Force the approved trading descriptor to survive legacy template rules. */
header .srf-trading-descriptor {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

header .srf-simple-brand {
  min-width: 0 !important;
  max-width: 100% !important;
  flex-shrink: 1 !important;
}

header .srf-simple-brand-copy {
  min-width: 0 !important;
}

header .srf-simple-brand-copy strong,
header .srf-simple-brand-copy small {
  white-space: nowrap !important;
}

/* Credentials must never expand to the source image's natural dimensions. */
header .header-license-card,
header .header-triangle,
header .header-gassafe,
header .header-gassafe-card,
header .ciphe-badge,
header .bath-badge.ciphe-badge {
  flex: 0 0 auto !important;
  width: 112px !important;
  max-width: 22vw !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin-left: auto !important;
}

header .header-license-card img,
header .header-triangle img,
header .header-gassafe img,
header .header-gassafe-card img,
header .ciphe-badge img,
header .bath-badge.ciphe-badge img {
  display: block !important;
  width: 100% !important;
  max-width: 112px !important;
  height: auto !important;
  max-height: 76px !important;
  object-fit: contain !important;
  margin: 0 !important;
}

@media (max-width: 850px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  header .topwrap,
  header .wrap.top,
  header .wrap.head,
  header .head {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 88px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }

  header .srf-simple-brand {
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 0 !important;
  }

  header .srf-global-mark {
    width: 36px !important;
    height: 44px !important;
    flex: 0 0 36px !important;
    margin-right: 7px !important;
  }

  header .srf-simple-brand-copy strong {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1 !important;
  }

  header .srf-trading-descriptor {
    margin-top: 2px !important;
    font-size: clamp(7px, 2.25vw, 9px) !important;
    line-height: 1.05 !important;
    letter-spacing: .08em !important;
    white-space: nowrap !important;
  }

  header .srf-simple-brand-copy small {
    margin-top: 3px !important;
    padding-top: 3px !important;
    font-size: clamp(8px, 2.4vw, 10px) !important;
    line-height: 1 !important;
  }

  header .header-license-card,
  header .header-triangle,
  header .header-gassafe,
  header .header-gassafe-card,
  header .ciphe-badge,
  header .bath-badge.ciphe-badge {
    width: 82px !important;
    max-width: 23vw !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
  }

  header .header-license-card img,
  header .header-triangle img,
  header .header-gassafe img,
  header .header-gassafe-card img,
  header .ciphe-badge img,
  header .bath-badge.ciphe-badge img {
    width: 100% !important;
    max-width: 82px !important;
    max-height: 62px !important;
  }

  header .area-badge {
    flex: 0 1 auto !important;
    max-width: 30vw !important;
    margin: 0 0 0 auto !important;
    padding: 7px 9px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .srf-master-nav {
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .srf-master-nav-inner {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .mobilebar a.srf-approved-cta {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  .mobilebar a.srf-approved-cta > span {
    display: inline !important;
  }
}

@media (max-width: 390px) {
  header .srf-simple-brand-copy strong { font-size: 23px !important; }
  header .srf-trading-descriptor { font-size: 7px !important; }
  header .srf-simple-brand-copy small { font-size: 8px !important; }
  header .header-license-card,
  header .header-triangle,
  header .header-gassafe,
  header .header-gassafe-card,
  header .ciphe-badge,
  header .bath-badge.ciphe-badge { width: 72px !important; max-width: 21vw !important; }
}
