/*
 * ================================
 * RD Main Overrides for CEBS
 * Created: 9/2026
 * ================================
 */

/* Misc fixes */
p:empty {
  display:none;
}
body {  /* WCAG compliant large text (SMG 4-2024) */
  font: 14pt/20pt "Roboto", Helvetica, Arial, sans-serif;
}
.title-block__content {  /* WCAG compliant large text (SMG 4-2024) */
  font-weight:bold;
}
.breadcrumbs {  /* WCAG compliant large text (SMG 5-2024) */
  font-size: inherit;
  line-height: inherit;
}

/* Removes the squiggly background (SMG 4-2024) */
.interstitial--pattern {
  background: none;
}
/* Wrapper style correction (SMG 5-2024) */
.header-user__welcome {
  font-family: "Roboto", Helvetica, Arial, sans-serif;
}
@media (min-width: 960px) {
  .header-user__welcome {
    font-size: 16px;
    line-height: 24px;
    margin-right:12px;
  }
}
/* Header overrides (SMG 5-2024) */


/* Disable links on main nav items (9-2024 SMG) */
nav.header-nav ul.header-nav__main-list li.header-nav__main-item:hover,
nav.header-nav ul.header-nav__main-list li.header-nav__main-item:focus {
  cursor:pointer;
}
nav.header-nav ul.header-nav__main-list li.header-nav__main-item a.header-nav__main-link {
  pointer-events:none;
}

/* Disable styles for registration buttons after registration is closed (10-2024 SMG) */
.register-button .button.registration-closed {
  background-color: #ededed;
  color: #777777;
  pointer-events: none;
}

/* Hide bootstrap, IFEBP and ISCEBS layout options (10-2024 SMG) */
#ZoneEditorToolboxContainer div[caption^="grid"],
#ZoneEditorToolboxContainer div[caption^="IFEBP"],
#ZoneEditorToolboxContainer div[caption^="ISCEBS"] {
  display:none;
}

/* Added from IFEBP styles (1-2025 SMG) */
a.anchor {
  display: block;
  position: relative;
  top: -150px;
  visibility: hidden;
}

/* Homepage adjustment for smaller screens (3-2025 SMG) */
@media screen and (max-width:960px) {
  .hero__content {
    margin-left: 0;
    padding: 48px 24px;
  }
}

/* Tab adjustment (SMG 6-2025) */
.tabs--standard .tabs__tab {  
  font-weight:700;
}

/* Popover Styles (SMG 8-2025) */
body:has(div[popover]:popover-open){
  overflow:hidden;
}
.popover-container {
  button.open-popover * {
    font-weight:700;
  }
  .background-element-blocker {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    top: 0;
    left: 0;
    background: transparent;
    pointer-events: all;
  }
  div[popover],
  div[popover]::backdrop {
    transition: 250ms opacity, 250ms display allow-discrete,
      250ms overlay allow-discrete;
    opacity: 0;
  }
  div[popover]:popover-open,
  div[popover]:popover-open::backdrop {
    opacity: 1;
    @starting-style {
      opacity: 0;
    }
  }  
  div[popover] {
    width: 100%;
    max-width: 85vw;
    padding: 48px 72px 48px 48px;
    max-height: 90vh;
    background: white;
    color: #262626;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    @media screen and (min-width:768px) {
      max-width: 70vw;
    }
    &:popover-open + .background-element-blocker {
      display: block;
    }
    &::backdrop {
      background-color: rgba(0, 68, 124, 0.8);
      backdrop-filter: blur(5px);
    }    
    button.close-popover {
      position: absolute;
      top: 0;
      right: 0;
      background: none;
      i {
        font-size: 42px;
        font-weight: 300;
        padding: 9px 15px;
        color: rgba(0, 0, 0, 0.25);
        &:hover,
        &:focus {
          color: #262626;
        }
      }
    }
  }
}
body.sfPageEditor .popover-container {
  .button {
    background: none;
    border-radius: 0;
    width: 100%;
    padding: 0;
    font-weight: inherit;
    transition: none;
    color: inherit;
    font: inherit;
    &:hover,
    &:focus {
      transform: none;
      box-shadow: none;
      cursor: default;
    }
  }
  div[popover] {
    opacity: 1;
    display: block;
    position: relative;
    padding: 0;
    top: 0;
    left: 0;
    transform: none;
  }
}
/* Header Logo swap (DK 8-2025) */
.header-logo img.IFlogoglobe {display:none;}

@media (max-width: 1449.97px) {

    .header-logo img.IFlogoglobe {display:block; height:72px;}
  .header-logo img.IFlogofull {display:none; }
}

/* Type identifier in header (SMG 6-2025) */
.title-block__content .title-image-burst {
  display: inline-block;
  background-color: #00447c;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.3rem;
  line-height: 1.1;
  font-family: "Barlow Semi Condensed", "Roboto", Helvetica, Arial, sans-serif;
  padding: 6px 0.75rem;
  border-radius: 10px 0 10px 0;
  margin: 0 0 1rem;
}

/* Tab adjustment (SMG 6-2025) */
.tabs--standard .tabs__tab {  
  font-weight:700;
}

/* Header Restructuring Overrides (SMG 8-2025) */
body {
  &:not(.is-scrolled) {
    header.page-header {
      position:relative;
    }
    main#top.content {
      padding-top:24px !important;
      @media screen and (min-width:768px) {
        padding-top:48px !important;
      }
    }
  }  
  &.sfPageEditor {
    header.page-header .page-header__content .header-search {
      @media screen and (min-width: 1200px) {
          height:auto;
        }
    }
  }
  header.page-header {
    padding-bottom:0;
    transition-duration: 500ms;
    .page-header__content {
      padding-bottom:0;
      @media screen and (min-width: 1200px) {
        display:grid;
        grid-template-columns: 1fr 72px;
        grid-template-areas:"nav search";
      }
      nav.header-nav {
      position:relative;
      top:0;
      padding:0;
      grid-area:nav;
        @media screen and (min-width: 1200px) {
          margin-top:0;
        }
      }
      .header-search {
        top:0;
        margin:0;      
        grid-area:search;
        @media screen and (min-width: 1200px) {
          height:100%;
        }
      }
    }
  }  
}

/* Card grid override (SMG 9-2025) */
.card-grid .card {
  background:#F6F6F6;
}

/* utility nav tweaks (DK 2-2026) */

.button, .button--small {margin-bottom:15px; }
.header-utility ul a.button {color:white!important;}
.header-utility ul a.button--small {padding:4px 30px; border-radius:48px; font-size:16px;}
.btn, .header-utility .header-user .btn {margin-left:5px;}
.header-utility-desktop .header-utility__list li:first-child a {background:#839D4D; color:white; padding:4px 30px; border-radius:48px; font-size:16px;} 
.header-utility-desktop .header-utility__list li:nth-child(2) a {background:#E27508; color:white; padding:4px 30px; border-radius:48px; font-size:16px;}

/* Search bar fix (SMG 3-2026) */
header.page-header .page-header__content {
  @media screen and (min-width: 1200px) {
    width:100%;
  }
}
header.page-header .header-search.is-focused .header-search__input {
  box-shadow:none;
}

/* Added styles when Background Section widget is flipped (SMG 6-2026) */
@media (min-width: 1376px) {
  .interstitial--right .interstitial__media {
    margin-left: calc(-50vw + 640px) !important;
  }
}

/* Adjusted anchor class to accommodate for top message banner (SMG 7-2026) */
a.anchor {
  top: -192px;
}

/* Overrides to replicate IFEBP wrapper */
header.page-header {
  border-bottom: 1px solid #EDEDED;
  background: #FDFDFD;  
  nav.header-nav a, 
  nav.header-nav a:focus, 
  .header-nav a:hover, 
  .header-utility ul a, 
  .header-utility ul a:hover, 
  .header-utility ul a:focus {
    color: #444;    
    font-family:inherit;
    font-size:inherit;
    line-height:inherit;
  }
  nav.header-nav a.header-nav__main-link {
    font-family: "Halant", "Roboto", Helvetica, Arial, sans-serif;
    font-weight: 700;
  }
  ul.header-nav__list-2 li .header-nav__link-2 {
    font-size: 16px;
    padding-left: 48px;
    @media (min-width: 1200px) {
      font-size: 18px;
      padding-left: 24px;
      color: #00447C;
    }
    &:hover, &:focus {
      color: #0072c6;
      @media (min-width: 1200px) {        
        background: rgba(0, 68, 124, 0.1);
        color: #00447C;
      }
    }
  }  
  .header-utility .header-user .header-user__welcome,
  .header-utility .header-user .header-user__welcome a,
  .header-utility .header-user .header-user__welcome a:hover, 
  .header-utility .header-user .header-user__welcome a:focus {
    color: #707070 !important;
  }
  .header-utility ul a,
  .header-utility ul a:hover, 
  .header-utility ul a:focus {
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color:#777;
    @media (min-width:1200px){
      font-weight: 400;
    }
  }
  .header-utility ul a::after {
    display:none;
  }
  .header-utility ul a.button {
    font-weight:700;
    &:hover,
    &:focus {
      color:white;
    }
  }
  .header-utility__link {
    padding: 12px 6px;
  }
  .header-utility ul.header-utility__list {
  font-size:0;
}
  @media (min-width: 1200px) {
    .header-logo {
      max-width: 370px;
      margin-right: 14px;
      height:96px;
    }
  }
  @media (min-width: 1200px) {
    .header-nav__list-2 {
      background: white;
      border: 1px solid #EDEDED;    
    }
  }
  .header-nav__main-link::before {
    background: #EDEDED;
  }
  .header-nav__main-link::after {
    background: white;
  }
  @media (min-width: 1200px) {
    header.page-header ul.header-nav__list-2 li .header-nav__link-2:hover, 
    header.page-header ul.header-nav__list-2 li .header-nav__link-2:focus {
      color: #00447C;
      background: rgba(0, 68, 124, 0.1);
    }
  }
  @media (min-width: 1200px) {
    .header-search__label {
      color: #444;    
    }
    .header-search__label:hover,
    .header-search__label:focus {
      color: #58599B;
    }
  }
  .header-region {
    display: none;
  }
}

footer.page-footer {
  background: #FDFDFD;
  border-top: 1px solid #EDEDED;
  color: #707070;
  padding-bottom:0;
  a {
    color: #707070;
    &:hover,
    &:focus {
      color: #0072c6;
      text-decoration: underline;
    }
  }
  .footer-logo img {
    max-width: 280px;
    filter: brightness(0) invert(17%) sepia(48%) saturate(3347%) hue-rotate(189deg) brightness(94%) contrast(104%);
  }  
  .page-footer__content {
    @media (min-width:960px) {
      flex: 1% 1 0;
    }
    .footer-social__icon {
      font-size: 18px !important;
      line-height: 24px;
      display: inline-block;
      vertical-align: middle;
      padding: 3px;
    }
  }
  .footer-social {
    display:none;    
  }  
  .footer-actions {
    @media (min-width: 960px) {
      flex: 1;
    }
  }
  .footer-copyright {
    text-align:start;
    background: #00447C;
    color: white;
    padding-bottom: 12px;
    padding-top: 12px;    
    position:relative;
    @media (min-width:768px) {
      margin-top:0;
    }
    &::before,
    &::after {
      background: inherit;
      bottom: 0;
      content: "";
      display: inline-block;
      height: 100%;
      position: absolute;
      width: 100%;
    }
    &::before {
      left: -100%;
    }
    &::after {
      right: -100%;
    }
  }
}
.page-header__toggle {
  color: #00447c;
}
.page-header .toggle-indicator__piece::before {
  background: #00447c;
}
.mobile-menu-is-open .page-header .toggle-indicator__piece::before {
  background: white;
}

@media (max-width: 1199.97px) {
  header.page-header {
    .header-nav,
    .page-header__content {    
      background: white;
    }
    .header-nav {
      margin-top: 15px;
    }
     .header-nav__main-link, .header-nav__link-2, .header-nav__link-3, .header-nav__link-4, .header-nav__link-5 {
      padding: 12px 60px 12px 24px;
      border-bottom: 1px solid #F6F6F6;
    }
    .header-nav__toggle {
      background: #ffffff;
    }
    .header-nav__toggle::before {
      border-top-color: #00447C;
    }
    .header-nav__toggle.is-active::before {
      border-top-color: #7E9F38;
    }
  }
}
@media (min-width: 960px) {
  footer {
    .grid {
      display:grid;
      grid-template-columns: 35% 1fr;
      grid-template-areas: "logo links" "copyright copyright";
      .page-footer__content,
      .footer-actions,
      .footer-copyright {
        width:100%;
      }
      .page-footer__content { grid-area:logo; }
      .footer-actions { grid-area:links; }
      .footer-copyright { grid-area: copyright; }
    }
  }
}