@use "_tokens";

$o-brand: "master";
$system-code: "test"; // Required by Origami, but details are hidden behind a login wall...

/*
|-------------------------------------------------------------------------------
| o-header
|-------------------------------------------------------------------------------
*/
@import "o-header/main";

// https://registry.origami.ft.com/components/o-header@8.5.3/sassdoc?brand=master
@include oHeader();

[data-o-header-drawer--no-js] {
  display: none;
}

/*
|-------------------------------------------------------------------------------
| o-footer
|-------------------------------------------------------------------------------
*/

@import "o-footer/main";
@include oFooter(
  $opts: (
    "themes": (
      "dark",
    ),
  )
);

.o-footer {
  margin-top: 0;
}

/*
|-------------------------------------------------------------------------------
| o-cookie-message
|-------------------------------------------------------------------------------
*/
@import "o-cookie-message/main";
@include oCookieMessage();

/** FTPartnerContent module.scss **/
.subbrandContainer {
  background-color: tokens.$token-c-header-subbrand-bg;
  border-bottom: solid 5px tokens.$token-c-header-subbrand-border;
  font-family: "MetricWeb", sans-serif;
  font-size: tokens.$token-base-size;
  color: tokens.$token-c-black;
  height: 61px;
  pointer-events: auto;
  position: relative;
  top: 0;
  right: 0;
  z-index: 99; // stack over the FT footer menu on mobile

  @supports (position: sticky) {
    position: sticky;
  }

  @include tokens.tablet {
    height: 41px;
    padding-top: 0;
  }

  /** moved to inside subrandContaner **/
  .uppercase {
    text-transform: uppercase;
  }
  .tabletHidden {
    @include tokens.tablet {
      display: none;
    }
  }
  .mobileHidden {
    display: none;
    @include tokens.tablet {
      display: block;
    }
  }
  .hidden {
    opacity: 0;
    pointer-events: none;
  }
  .shown {
    opacity: 1;
    pointer-events: auto;
  }
}

.subbrandContent {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  z-index: 101;

  @include tokens.tablet {
    max-width: 1220px;
  }
}

.subbrandTitleContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;

  @include tokens.tablet {
    margin: 0 auto;
  }
}

.subbrandTitle {
  align-items: center;
  color: tokens.$token-c-header-subbrand-title;
  display: flex;
  font-size: 1.25em;
}

.subbrandTitleTooltip {
  cursor: pointer;
  height: 17px;
  margin-left: 10px;
  width: 17px;
}

.subbrandLink {
  color: tokens.$token-c-header-subbrand-items;
  display: block;
  font-size: 1em;
  font-weight: 600;

  @include tokens.tablet {
    display: none;
  }
}

.subbrandTooltip {
  cursor: pointer;
  height: 1.5625em;
  width: 1.5625em;
}

.subbrandAffiliateWrapper {
  display: none;
  @include tokens.tablet {
    display: block;
    width: 25%;
    white-space: nowrap;
  }
}

.subbrandAffiliate {
  color: tokens.$token-c-header-subbrand-items;
  font-size: 1.25em;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.subbrandShare {
  align-items: center;
  display: flex;

  @include tokens.tablet {
    width: 25%;
    justify-content: flex-end;
  }
}

.subbrandShareIcon {
  cursor: pointer;
  height: 27px;
  padding: 0 0 0.25em 0.5em;
  width: 25px;
}

.subbrandShareLink {
  color: tokens.$token-c-header-subbrand-items;
  font-size: 1em;
  pointer-events: none;
  text-decoration: none;

  @include tokens.desktop {
    padding-right: 2px;
  }
}

.subbrandDisclaimer {
  background: #fff;
  box-shadow: 0 1px 4px rgba(77, 72, 69, 0.15), 0 8px 14px rgba(77, 72, 69, 0.2);
  line-height: 1.1;
  margin: 0 auto;
  margin-top: 5px;
  max-width: 20.3125em;
  padding: 0.625em 1em;
  position: relative;
  text-align: center;
  transition: opacity 0.4s ease;
  width: 100vw;

  @include tokens.tablet {
    margin-top: 0.9375em;
    max-width: 100%;
    padding: 1em 1.5625em;
    width: 50em;
  }
}

.subbrandDisclaimerLink {
  color: initial;
  text-decoration: underline;

  &:active {
    color: initial;
  }
}

.subbrandDisclaimerCloseIcon {
  cursor: pointer;
  height: 10px;
  position: absolute;
  right: 0.3125em;
  top: 5px;
  width: 10px;

  @include tokens.desktop {
    top: 10px;
  }
}

.subbrandShareContainer {
  align-items: center;
  background: #fff;
  bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  left: 0;
  position: fixed;
  transition: opacity 0.4s ease;
  width: 100%;
  padding-bottom: 75px;
  overflow: scroll;

  @include tokens.desktop {
    bottom: auto;
    box-shadow: 0 1px 4px rgba(77, 72, 69, 0.15),
      0 8px 14px rgba(77, 72, 69, 0.2);
    height: auto;
    left: auto;
    max-width: 320px;
    padding: 1em 1.25em 0 1.25em;
    position: absolute;
    right: 130px;
    top: 42px;
    width: auto;
    overflow: unset;
  }
}

.shareContainerCloseIcon {
  cursor: pointer;
  height: 25px;
  position: absolute;
  right: 10px;
  top: 15px;
  width: 25px;

  @include tokens.desktop {
    height: 15px;
    width: 15px;
  }
}

.shareIconsContainer {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  width: 100%;

  @include tokens.desktop {
    flex-direction: row;
  }
}

.socialShareIcon {
  cursor: pointer;
  height: 9vh;
  width: 9vh;

  @include tokens.desktop {
    height: 2.5em;
    margin: 0.9375em;
    width: 2.5em;
  }
}

.socialShareText {
  color: tokens.$token-c-header-subbrand-items;
  font-size: 0.9em;
  @include tokens.desktop {
    padding-top: 0.5rem;
  }
}

.shareTitle {
  color: tokens.$token-c-header-subbrand-items;
  font-size: 2em;
  font-weight: 500;

  @include tokens.tablet {
    font-size: 1.25em;
  }
}

/** ShareButton module.scss **/
.socialShareIconContainer {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.socialShareIcon {
  cursor: pointer;
  height: 9vh;
  width: 9vh;

  @include tokens.desktop {
    height: 2.5em;
    margin: 0.9375em;
    width: 2.5em;
  }
}

.desktopHidden {
  @include tokens.desktop {
    display: none;
  }
}

.no-scroll {
  overflow: hidden;

  @include tokens.desktop {
    overflow: auto;
  }
}