/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

html {
  scroll-behavior: smooth;
}

body {
  display: none;
  font-size: var(--font-size-m);
  margin: 0;
  font-family: var(--font-family-body);
  line-height: 1.6;
  color: var(--body-color);
}

body.appear {
  display: block;
}

.custom {
  footer .button-container,
  .footer-nav-links {
    display: none;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font-family);
  font-weight: var(--heading-font-weight);
  line-height: var(--heading-line-height);
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-xxs);
  scroll-margin: calc(var(--spacing-l) + 1em);
}

h1 {
  font-size: var(--font-size-xxl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

h4 {
  font-size: var(--font-size-m);
}

h5 {
  font-size: var(--font-size-s);
}

h6 {
  font-size: var(--font-size-xs);
}

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
  color: var(--color-grey);
}

code,
pre {
  font-family: var(--body-semibold-font-family);
  font-size: var(--font-size-s);
}

code {
  padding: var(--spacing-xxs);
}

pre {
  overflow: scroll;
}

main pre {
  background-color: var(--color-grey);
  padding: var(--spacing-xxs);
  overflow-x: auto;
  white-space: pre;
}

/* links */
a:any-link {
  color: var(--color-black);
  text-decoration: underline;
  font-weight: var(--font-weight-bold);
}

a:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}

/* default button */
a.button:any-link,
button {
  font-family: var(--font-family-bold);
  display: inline-block;
  box-sizing: border-box;
  text-decoration: none;
  padding: var(--spacing-xxs-l) var(--spacing-xs);
  text-align: center;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  cursor: pointer;
  color: var(--color-white);
  background-color: var(--link-color);
  margin: var(--spacing-xs) 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0.25rem;
}

a.button:any-link:hover,
a.button:hover,
button:hover {
  background-color: var(--bg-button-hover);
  color: var(--color-black);
  cursor: pointer;
}

a.button:any-link:focus,
a.button:focus,
button:focus {
  background-color: var(--color-pink);
  color: var(--color-white);
  outline: 1px solid var(--color-black);
  cursor: pointer;
}

a.button:any-link:active,
a.button:active,
button:active {
  background-color: var(--color-pink);
  color: var(--color-white);
  border: none;
  outline: 2px solid var(--color-active-outline);
  cursor: pointer;
}

/* primary button */
a.button.primary:any-link,
a.button.primary,
button.primary {
  background-color: white;
  border: 1px solid var(--color-black);
  color: var(--color-black);
}

a.button.primary:any-link:hover,
a.button.primary:hover,
button.primary:hover {
  background-color: var(--color-light-pink);
  color: var(--color-black);
  cursor: pointer;
  border: 1px solid var(--color-light-pink);
  outline: none;
}

a.button.primary:any-link:focus,
a.button.primary:focus,
button.primary:focus {
  background-color: transparent;
  color: var(--color-black);
  outline: 1px solid var(--color-black);
  cursor: pointer;
}

a.button.primary:any-link:active,
a.button.primary:active,
button.primary:active {
  background-color: var(--color-black);
  color: var(--color-white);
  border: none;
  cursor: pointer;
}

/* secondary button */
a.button.secondary:any-link,
a.button.secondary,
button.secondary {
  background-color: transparent;
  color: var(--color-black);
  padding: var(--spacing-xxxs-l) 0;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

a.button.secondary:any-link:hover,
a.button.secondary:hover,
button.secondary:hover {
  background-color: transparent;
  color: var(--color-light-pink);
  cursor: pointer;
  outline: none;
}

a.button.secondary:any-link:focus,
a.button.secondary:focus,
button.secondary:focus {
  background-color: transparent;
  color: var(--color-black);
  cursor: pointer;
}

a.button.secondary:any-link:active,
a.button.secondary:active,
button.secondary:active {
  background-color: transparent;
  color: var(--color-black);
  border: none;
  cursor: pointer;
  outline: unset;
}

.button.chevron {
  position: relative;
  padding-right: 35px !important;
}

.button.chevron::after {
  content: '';
  background-image: url('../../icons/chevron-right-white.svg');
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  right: 10px; /* Adjust position as needed */
  top: 50%;
  transform: translateY(-50%);
  width: 16px; /* Adjust width as needed */
  height: 16px; /* Adjust height as needed */
}

.button.chevron:hover::after {
  background-image: url('../../icons/chevron-right.svg');
}

/* disabled button */
a.disabled:any-link,
a.disabled,
button:disabled,
button:disabled:hover {
  background-color: var(--color-disabled);
  color: var(--color-black);
  cursor: unset;
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* sections */
main .section {
  padding: var(--spacing-m) var(--spacing-xs);
}

.section .default-content-wrapper p {
  font-size: var(--font-size-xs);
  line-height: 1.5rem;
  font-weight: 400;
}

/* Notification pane */
.section.notification {
  padding: 0;

  > div {
    padding: var(--spacing-xs) var(--spacing-s);
    background-color: var(--bg-color-paper);

    p {
      margin: 0;
      color: var(--notification-text-color);
      font-size: var(--font-size-xs-alt);
      line-height: 1.5rem;

      a {
        color: var(--color-black);
        text-decoration: underline;
      }
    }
  }
}

/*stylelint-disable*/
.section.notification.bg-black {
  > div {
    background-color: var(--bg-color-black);

    p,
    a {
      color: var(--color-white);
    }
  }
}

header {
  height: var(--nav-mobile-height);

  @media (width >= 1024px) {
    height: var(--nav-height);
  }
}

.partner > header {
  > div > div > nav {
    > div:not(:nth-child(2)) {
      display: none;
    }

    > div:nth-child(2) {
      margin: 0 auto;
    }
  }
}

.custom > header {
  > div > div > nav {
    > div:not(:nth-child(2)) {
      display: none;
    }

    > div:nth-child(2) {
      margin: 0 auto;
    }
  }
}

.section.breadcrumb-container {
  background: var(--color-white);
  padding: 8px 25px;
  border-top: 1px solid var(--bg-color-paper);
}

.no-padding-top {
  padding-top: 0 !important;
}

.no-padding-bottom {
  padding-bottom: 0 !important;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;

  &.image {
    > .default-content-wrapper p {
      display: inline-block;
      vertical-align: middle;
      margin-right: 10px;
    }
  }
}
/*stylelint-enable*/

.error {
  color: var(--color-error);
}

@media (width >= 768px) {
  .section > div {
    max-width: var(--max-width-container);
    margin: auto;
  }

  .section .default-content-wrapper p {
    font-size: var(--font-size-s);
    line-height: 2rem;
  }

  /* Notification pane */
  .section.notification {
    > div {
      max-width: 100%;
      padding: 0.5rem 0;
      text-align: center;
    }
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--color-grey);
}

/* Header Nav */
.header-nav-container.section {
  display: grid;
  margin: var(--spacing-l) var(--spacing-s);
  grid-auto-rows: auto;
  padding: 0;

  @media (width >= 768px) {
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--spacing-l);
    padding: var(--spacing-l) var(--spacing-s);
    border-radius: 1rem;
    border: 1px solid var(--bg-color-paper);
    background: var(--color-white);
    box-shadow: var(--box-shadow);
    max-width: var(--max-width-large);
    margin: -120px var(--spacing-l) var(--spacing-xxl) var(--spacing-l);
  }

  @media (width >= 1024px) {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 var(--spacing-xl);
    padding: var(--spacing-l) var(--spacing-xxxl);
    border-radius: 1rem;
    border: 1px solid var(--bg-color-paper);
    background: var(--color-white);
    box-shadow: var(--box-shadow);
    margin: var(--spacing-xxl-negative) var(--spacing-xxxl) var(--spacing-xxl) var(--spacing-xxxl);
    margin-left: auto;
    margin-right: auto;
    width: 1232px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .header-nav-wrapper {
    width: -webkit-fill-available;
    margin-top: 0;
  }

  .header-nav-wrapper:nth-child(1) {
    @media (width >= 768px) {
      grid-area: 1 / 1 / span 2 / span 1;
    }

    @media (width >= 1024px) {
      grid-area: 1 / 1 / span 4 / span 1;

      span.divider:last-child {
        display: none;
      }
    }
  }

  .header-nav-wrapper:nth-child(2) {
    @media (width >= 768px) {
      grid-area: 3 / 1 / span 4 / span 1;

      span.divider:last-child {
        display: none;
      }
    }

    @media (width >= 1024px) {
      grid-area: 1 / 2 / span 1 / span 1;

      span.divider:last-child {
        display: flex;
      }
    }
  }

  .header-nav-wrapper:nth-child(3) {
    @media (width >= 768px) {
      grid-area: 1 / 2 / span 1 / span 1;
    }

    @media (width >= 1024px) {
      grid-area: 2 / 2 / span 6 / span 1;

      span.divider:last-child {
        display: none;
      }
    }
  }

  .header-nav-wrapper:nth-child(4) {
    @media (width >= 768px) {
      grid-area: 2 / 2 / span 1 / span 1;
    }

    @media (width >= 1024px) {
      grid-area: 1 / 3 / span 1 / span 1;
    }
  }

  .header-nav-wrapper:nth-child(5) {
    @media (width >= 768px) {
      grid-area: 3 / 2 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }
    }

    @media (width >= 1024px) {
      grid-area: 2 / 3 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }
    }
  }

  .header-nav-wrapper:nth-child(6) {
    @media (width >= 768px) {
      grid-area: 4 / 2 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }
    }

    @media (width >= 1024px) {
      grid-area: 3 / 3 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }
    }
  }

  .header-nav-wrapper:nth-child(7) {
    @media (width >= 768px) {
      grid-area: 5 / 2 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }

      span.divider:last-child {
        display: none;
      }
    }

    @media (width >= 1024px) {
      grid-area: 4 / 3 / span 1 / span 1;

      .divider {
        margin: var(--spacing-xs) 0;
      }

      span.divider:last-child {
        display: none;
      }
    }
  }
}

.section.header-nav-container {
  @media (width < 1024px) {
    display: none;
  }
}

/* helper classes */
.hide {
  display: none !important;
}

.mt-4 {
  margin-top: var(--spacing-l);
}

.mb-4 {
  margin-bottom: var(--spacing-l);
}

.mt-0 {
  margin-top: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.my-4 {
  margin-top: var(--spacing-l);
  margin-bottom: var(--spacing-l);
}

.ev-icon {
  background-image: url('../../icons/EV-logo.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

strong {
  font-family: var(--font-family-bold);
  font-weight: var(--font-weight-bold);
}

em {
  font-style: italic;
}

.section.rating-widget-container {
  background: var(--bg-color-paper);
}

.section.rating-widget-container .default-content-wrapper {
  text-align: center;
}

/* stylelint-disable */
.section.side-page-text-block {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  ol,
  p {
    margin: 0;
  }

  &.legal.mt-4 {
    margin-top: var(--spacing-m);
  }

  &.oly-landing-app {
    padding: 32px 16px;

    ol {
      padding-inline-start: 24px;
    }

    .image-link-wrapper {
      padding-right: 64px;
      padding-bottom: 24px;
      padding-top: 24px;
      display: block;
    }

    .image-link-wrapper:last-of-type {
      padding-right: 0;
      padding-top: 24px;
    }
  }

  .default-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    h2,
    h3 {
      font-weight: 700;
      font-size: var(--font-size-l-alt);
      line-height: 2.5rem;
    }

    p {
      strong {
        font-size: var(--font-size-s);
        font-family: var(--font-family-bold);
        color: var(--color-black);
      }

      font-size: var(--font-size-xs);
      font-weight: 400;
      line-height: 1.5rem;
    }
  }

  @media (width >= 1024px) {
    padding: 48px 312px;

    &.legal {
      padding: var(--spacing-xs-l-alt) 312px;
    }

    &.oly-landing-app {
      padding: 32px 312px;

      .image-link-wrapper {
        display: inline-block;
      }
    }

    &.legal.mt-4 {
      margin-top: 76px;
    }

    .default-content-wrapper {
      h2,
      h3 {
        font-size: var(--font-size-lg);
        line-height: 3rem;
        font-weight: 700;
      }

      p {
        strong {
          font-size: var(--font-size-m);
        }

        font-size: var(--font-size-s);
        line-height: 2rem;
      }
    }
  }
}

.section.tablinks {
  > div {
    max-width: 450px;
    display: flex;
    flex-direction: row;

    > p:first-child {
      > a {
        border-bottom: 2px solid var(--color-pink);
        border-radius: 0;
        pointer-events: none;
      }
    }

    > p > a {
      background-color: var(--bg-color-neutral);
      color: #000;
      border-bottom: 2px solid var(--color-disabled);
      border-radius: 0;
    }
  }
}

.section.tablinks-2 {
  > div {
    max-width: 450px;
    display: flex;
    flex-direction: row;

    > p:nth-of-type(2) {
      > a {
        border-bottom: 2px solid var(--color-pink);
        border-radius: 0;
        pointer-events: none;
      }
    }

    > p > a {
      background-color: var(--bg-color-neutral);
      color: #000;
      border-bottom: 2px solid var(--color-disabled);
      border-radius: 0;
    }
  }
}

.section.tablinks-3 {
  > div {
    max-width: 450px;
    display: flex;
    flex-direction: row;

    > p:last-child {
      > a {
        border-bottom: 2px solid var(--color-pink);
        border-radius: 0;
        pointer-events: none;
      }
    }

    > p > a {
      background-color: var(--bg-color-neutral);
      color: #000;
      border-bottom: 2px solid var(--color-disabled);
      border-radius: 0;
    }
  }
}
/* stylelint-enable */

@media (width<= 768px) {
  .section.tablinks {
    > div {
      display: flex;
      justify-content: center;

      > p > a {
        font-size: 12px;
      }
    }
  }

  .section.tablinks-2 {
    > div {
      display: flex;
      justify-content: center;

      > p > a {
        font-size: 12px;
      }
    }
  }

  .section.tablinks-3 {
    > div {
      display: flex;
      justify-content: center;

      > p > a {
        font-size: 12px;
      }
    }
  }
}

.section.takeaway {
  > div:last-child {
    > div > div > div {
      border: 1px solid var(--border-color);
      padding: 15px;
      border-radius: 5px;
      margin-bottom: 3px;
      align-self: stretch;
    }
  }
}
/* stylelint-disable */
.section.running-cost {
  p:nth-child(1) {
    color: var(--color-pink);
  }
  h2,
  h3 {
    font-weight: 700;
    font-size: var(--font-size-l-alt);
    line-height: 2.5rem;

    @media (width >= 1024px) {
      font-size: var(--font-size-lg);
      line-height: 3rem;
    }
  }
}
/* stylelint-enable */
.section.custom-hero {
  @media (width <= 1024px) {
    > div > div {
      height: 350px;

      div {
        background-color: var(--bg-color-light-beige);

        > div:first-child > div > picture {
          inset: auto;
          z-index: 1;
          bottom: 0;
        }

        > div:nth-child(2) {
          height: 350px;

          > div {
            z-index: 1;
            position: relative;
          }
        }
      }
    }
  }
}

.section.download-section {
  max-width: var(--max-width-container);
  margin: 0 auto;
}

@media (width >= 1024px) {
  .section.campaign-form {
    width: 1024px;
    margin-top: -120px !important;
    border-radius: 5px;
  }
}

/* /marketplace/search */
.filter-resultant .filter-resustant-child {
  padding: var(--spacing-s);
  border-top: 1px solid #e7e6e6;
  font-size: 16px;
}

.active-filter .load-more {
  padding: var(--spacing-s);
}

.active-filter .load-more button {
  border: none;
}

.filter-resultant .filter-resustant-child .card-title {
  font-weight: bold;
  font-family: var(--heading-font-family);
  color: var(--color-black);
  font-size: var(--font-size-s);
  line-height: 1.5rem;
  cursor: pointer;
  margin-bottom: var(--spacing-s);
}

.filter-resultant .filter-resustant-child .card-article-description {
  font-size: 14px;
}

.filter-resultant .filter-resustant-child [class='cardPublishedDate'] {
  color: var(--color-grey);
  font-size: var(--font-size-xs-alt);
}

.text-small {
  font-size: var(--font-size-xs);
}

.text-medium {
  font-size: var(--font-size-m);
}

.text-large {
  font-size: var(--font-size-lg);
}

.text-color-grey {
  color: var(--color-grey);
}

.text-color-black {
  color: var(--color-black);

  /*stylelint-disable*/
  p,
  dl,
  ol,
  ul,
  pre,
  blockquote,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: var(--color-black);
  }
  /*stylelint-enable*/
}

.text-color-brand {
  color: var(--color-pink);
}

@media (width >= 1024px) {
  .col-2-desktop {
    display: grid;
    grid-template-columns: 50% 50%;
    width: 1232px;
    margin: 0 auto;
  }
}
