.tabs-scroll-container {
  position: relative;
}

.tabs-arrow {
  position: absolute;
  top: 0;
  height: calc(100% - 2px);
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #333;
  transition: opacity 0.3s;
  background-color: transparent;
}

.tabs-arrow-left {
  right: -30px;
  position: absolute;
}

.tabs-arrow-right {
  right: -30px;
  position: absolute;
}

.hidden-arrow {
  opacity: 0;
  pointer-events: none;
}

.tabs-scroll-container {
  position: relative;
}

.tabs-arrow {
  position: absolute;
  top: 0;
  height: calc(100% - 2px);
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.tabs-arrow-left {
  left: -30px;
  position: absolute;
}

.tabs-arrow-right {
  right: -30px;
  position: absolute;
}

.hidden-arrow {
  display: none;
}

.region-parent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
}

.region-parent .region-icon {
  width: 24px;
  height: 29px;
  display: block;
}

.region-parent .region-name {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0;
  color: #30C061;
}
#sectionMap { 
  scroll-margin-top: 100px; 
}

.title-map{
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 0px;
  color: #FFFFFF;
}
#sectionMap .editor{
    position: relative;
    width: 66.666667%;
}
#sectionMap .editor h4,
#sectionMap .editor h5{
  width: 100%;
}
#sectionMap .editor h5{
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0px;
  color: #FFFFFF;
}

/* The region list used to sit in a fixed-height iframe, which forced the
   section's own padding. Now that it is real markup, the section can close
   evenly above and below, at every breakpoint. */
#sectionMap.content-section{
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 640px){
  #sectionMap.content-section{
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}
@media (min-width: 1024px){
  #sectionMap.content-section{
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* Country tabs (Québec / Ailleurs dans le monde). */
/* The intro text keeps a bottom padding from the days when an iframe sat
   underneath it. It made the gap above the tabs 72px against 40px below the
   list; the spacing is now the tabs' margin alone. */
#sectionMap .editor > *:last-child{
  padding-bottom: 0;
  margin-bottom: 0;
}

.region-picker__tabs{
  display: flex;
  border-bottom: 1px solid #4A6599;
  /* 36px of margin reads as 40px of white space once the line box of the text
     above is taken in, matching the gap under the list. */
  margin-top: 36px;
  margin-bottom: 40px;
}
.region-picker__tab{
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0;
  color: #FFFFFF;
  padding: 0 0 6px;
  margin-right: 40px;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.region-picker__tab.is-selected{
  color: #30C061;
}
.region-picker__tab.is-selected::after{
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 5px;
  background-color: #30C061;
  border-radius: 25px 25px 0 0;
}

/* Grid rather than CSS columns: every column starts on the same row, so the
   middle one cannot drift down the way it did in the multi-column layout.
   Filling by column keeps the names reading top-to-bottom alphabetically;
   the row counts come from the template, which knows how many regions
   there are. */
.region-picker__list{
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(var(--region-rows-1, 1), auto);
  gap: 20px 16px;
  align-items: start;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px){
  .region-picker__list{
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(var(--region-rows-2, 1), auto);
  }
}
@media (min-width: 992px){
  .region-picker__list{
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(var(--region-rows-3, 1), auto);
  }
}
.region-picker__list li{
  list-style: none;
  margin: 0;
}
.region-picker__link{
  display: inline-block;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 32px;
  letter-spacing: 0;
  color: #FFFFFF;
  text-decoration: none;
}
.region-picker__link:hover,
.region-picker__link:focus{
  color: #30C061;
  text-decoration: none;
}
.region-picker__link--muted{
  color: #808080;
}
.region-picker__link--muted:hover,
.region-picker__link--muted:focus{
  color: #FFFFFF;
}

/* Picture of the map under the Québec list. Same corner radius as the
   embedded videos higher up the page. It gets more room above it than the
   gaps inside the list block, so it reads as its own element rather than as
   the last row of the list. */
.region-picker__map{
  margin: 60px 0 0;
}
.region-picker__map img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* "No challenge in this region this year" prompt. */
.region-donate[hidden]{
  display: none;
}
.region-donate__backdrop{
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(4, 32, 88, 0.6);
}
.region-donate__dialog{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  width: calc(100% - 2rem);
  max-width: 30rem;
  padding: 1.5rem;
  background-color: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.region-donate__close{
  display: block;
  margin-left: auto;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.region-donate__close img{
  width: 34px;
  height: 34px;
}
.region-donate__heading{
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.region-donate__heading h3{
  margin: 0 0 0 1rem;
  font-family: "SofiaPro-Bold", Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  color: #042058;
}
.region-donate__dialog p{
  font-family: "SofiaPro-Regular", Arial, Helvetica, sans-serif;
  line-height: 23px;
  color: #5b637a;
  margin-bottom: 1.5rem;
}
.region-donate__cta{
  display: block;
  width: 100%;
  padding: 0.9rem 0.5rem;
  border-radius: 8px;
  background: #042058;
  color: #fff;
  font-family: "SofiaPro-Bold", Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}
.region-donate__cta:hover,
.region-donate__cta:focus{
  color: #fff;
  text-decoration: none;
}
.region-donate__cta::after{
  display: inline-block;
  position: relative;
  width: 0;
  height: 0;
  content: "";
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #43bf6d;
  top: 1px;
  margin-left: 15px;
}

@media (min-width: 768px) {
  .tabs-arrow {
    display: none !important;
  }
  #sectionMap.content-section.bg-marine .container.x3{
    padding-left: 179px;
  }
}

@media (min-width: 768px) and (max-width:1430px){
  #sectionMap.content-section.bg-marine .container.x3{
    padding-left: 60px;
  }
}

@media (max-width: 768px) {
  .region-parent{
    margin-top: 0;
    margin-bottom: 0px;
  }
    .region-parent .region-name {
    letter-spacing: 0;
    color: #30C061;
    font-size: 20px;
    line-height: 8px;
  }

  .title-sub-parent.mobile-region-name {
    flex-direction: column !important;
  }

  .region-parent .region-icon {
    width: 18px;
    height: 22px;
  }
  .title-sub-parent{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
  }
  #sectionMap .editor{
    position: relative;
    width: 100%;
  }

  /* Tighter than desktop: on a phone the tabs sit right under the intro,
     and they scroll sideways when both labels do not fit. 26px of margin
     reads as the same 30px of white space that sits under the list. */
  .region-picker__tabs{
    margin-top: 26px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .region-picker__tabs::-webkit-scrollbar{
    display: none;
  }
  /* 24px cuts "Ailleurs dans le monde" off on a phone. 20px is the largest
     size that still fits a 375px screen, and stays above the 18px list. */
  .region-picker__tab{
    font-size: 20px;
    line-height: 28px;
    margin-right: 25px;
  }
  .region-picker__map{
    margin-top: 30px;
  }
  #sectionMap .editor h4{
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: 0px;
    color: #FFFFFF;
  }
  #sectionMap .editor h5{
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    letter-spacing: 0px;
    color: #FFFFFF;
  }
}

/* Team page share tooltip: plain links replace the AddThis toolbox (shut
   down in 2023). Same box as the "Copy address" button above them, in each
   network's colour; the icon is centred on the clipboard icon's axis. */
.share-tooltip .share-tooltip-link{
  display: block;
  position: relative;
  width: calc(100% - 30px);
  margin: 10px 15px 0;
  padding: 12px 15px 13px 53px;
  background-color: #042058;
  color: #ffffff;
  font-family: "helvetica neue", "helvetica", arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
}
.share-tooltip .share-tooltip-link:hover,
.share-tooltip .share-tooltip-link:focus{
  color: #ffffff;
  opacity: .85;
}
.share-tooltip .share-tooltip-link.addthis_button_facebook{
  background-color: #1877f2;
}
.share-tooltip .share-tooltip-link.addthis_button_linkedin{
  background-color: #0a66c2;
}
.share-tooltip .share-tooltip-link svg{
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  left: 17px;
  transform: translateY(-50%);
}
.share-tooltip .share-tooltip-link svg path{
  fill: #ffffff;
}

/* Coloured group icon, next to a team name or a participant's name. Its
   artwork is painted as a 48px (56px for the xl) background on a box of that
   exact size, so the moment flexbox shrinks the box the drawing is cropped
   left and right -- which is what a long team name did to the icon beside the
   page title, down to 25px of a 48px circle on a phone. Hold the box at its
   own size and let the text wrap instead. */
.icon-colored,
.icon-colored-xl{
  flex-shrink: 0;
}
