/*
 * 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.
 */

 /* Base setup */
@import url('./base/base.css');

/* stylelint-disable no-empty-source */
:root, .dropin-design {
  /* Adobe Commerce Dropin design tokens */
  --color-brand-300: #6d6d6d;
  --color-brand-500: #454545;
  --color-brand-600: #383838;
  --color-brand-700: #2b2b2b;
  --color-neutral-50: #fff;
  --color-neutral-100: #fafafa;
  --color-neutral-200: #f5f5f5;
  --color-neutral-300: #e8e8e8;
  --color-neutral-400: #d6d6d6;
  --color-neutral-500: #b8b8b8;
  --color-neutral-600: #8f8f8f;
  --color-neutral-700: #666;
  --color-neutral-800: #3d3d3d;
  --color-neutral-900: #292929;
  --color-positive-200: #eff5ef;
  --color-positive-500: #7fb078;
  --color-positive-800: #53824c;
  --color-informational-200: #eeeffb;
  --color-informational-500: #6978d9;
  --color-informational-800: #5d6dd6;
  --color-warning-200: #fdf3e9;
  --color-warning-500: #e79f5c;
  --color-warning-800: #cc7a2e;
  --color-alert-200: #ffebeb;
  --color-alert-500: #db7070;
  --color-alert-800: #c35050;
  --color-button-active: var(--color-brand-700);
  --color-button-focus: var(--color-neutral-400);
  --color-button-hover: var(--color-brand-600);
  --color-action-button-active: var(--color-neutral-50);
  --color-action-button-hover: var(--color-neutral-300);
  --color-opacity-16: rgb(255 255 255 / 16%);
  --color-opacity-24: rgb(255 255 255 / 24%);
  --grid-1-columns: 4;
  --grid-1-margins: 0;
  --grid-1-gutters: 16px;
  --grid-2-columns: 12;
  --grid-2-margins: 0;
  --grid-2-gutters: 16px;
  --grid-3-columns: 12;
  --grid-3-margins: 0;
  --grid-3-gutters: 24px;
  --grid-4-columns: 12;
  --grid-4-margins: 0;
  --grid-4-gutters: 24px;
  --grid-5-columns: 12;
  --grid-5-margins: 0;
  --grid-5-gutters: 24px;
  --shape-border-radius-1: 3px;
  --shape-border-radius-2: 8px;
  --shape-border-radius-3: 24px;
  --shape-border-width-1: 1px;
  --shape-border-width-2: 1.5px;
  --shape-border-width-3: 2px;
  --shape-border-width-4: 4px;
  --shape-shadow-1: 0 0 16px 0 rgb(0 0 0 / 16%);
  --shape-shadow-2: 0 2px 16px 0 rgb(0 0 0 / 16%);
  --shape-shadow-3: 0 2px 3px 0 rgb(0 0 0 / 16%);
  --shape-icon-stroke-1: 1px;
  --shape-icon-stroke-2: 1.5px;
  --shape-icon-stroke-3: 2px;
  --shape-icon-stroke-4: 4px;
  --spacing-xxsmall: 4px;
  --spacing-xsmall: 8px;
  --spacing-small: 16px;
  --spacing-medium: 24px;
  --spacing-big: 32px;
  --spacing-xbig: 40px;
  --spacing-xxbig: 48px;
  --spacing-large: 64px;
  --spacing-xlarge: 72px;
  --spacing-xxlarge: 96px;
  --spacing-huge: 120px;
  --spacing-xhuge: 144px;
  --spacing-xxhuge: 192px;
  --type-base-font-family: adobe-clean, roboto, roboto-fallback, system-ui, sans-serif;
  --type-display-1-font: normal normal 300 6rem/7.2rem var(--type-base-font-family);
  --type-display-1-letter-spacing: 0.04em;
  --type-display-2-font: normal normal 300 4.8rem/5.6rem var(--type-base-font-family);
  --type-display-2-letter-spacing: 0.04em;
  --type-display-3-font: normal normal 300 3.4rem/4rem var(--type-base-font-family);
  --type-display-3-letter-spacing: 0.04em;
  --type-headline-1-font: normal normal 400 2.4rem/3.2rem var(--type-base-font-family);
  --type-headline-1-letter-spacing: 0.04em;
  --type-headline-2-default-font: normal normal 300 2rem/2.4rem var(--type-base-font-family);
  --type-headline-2-default-letter-spacing: 0.04em;
  --type-headline-2-strong-font: normal normal 700 2rem/2.4rem var(--type-base-font-family);
  --type-headline-2-strong-letter-spacing: 0.04em;
  --type-body-1-default-font: normal normal 300 1.6rem/2.4rem var(--type-base-font-family);
  --type-body-1-default-letter-spacing: 0.04em;
  --type-body-1-strong-font: normal normal 700 1.6rem/2.4rem var(--type-base-font-family);
  --type-body-1-strong-letter-spacing: 0.04em;
  --type-body-1-emphasized-font: normal normal 700 1.6rem/2.4rem var(--type-base-font-family);
  --type-body-1-emphasized-letter-spacing: 0.04em;
  --type-body-2-default-font: normal normal 300 1.4rem/2rem var(--type-base-font-family);
  --type-body-2-default-letter-spacing: 0.04em;
  --type-body-2-strong-font: normal normal 700 1.4rem/2rem var(--type-base-font-family);
  --type-body-2-strong-letter-spacing: 0.04em;
  --type-body-2-emphasized-font: normal normal 700 1.4rem/2rem var(--type-base-font-family);
  --type-body-2-emphasized-letter-spacing: 0.04em;
  --type-button-1-font: normal normal 400 2rem/2.6rem var(--type-base-font-family);
  --type-button-1-letter-spacing: 0.08em;
  --type-button-2-font: normal normal 400 1.6rem/2.4rem var(--type-base-font-family);
  --type-button-2-letter-spacing: 0.08em;
  --type-details-caption-1-font: normal normal 400 1.2rem/1.6rem var(--type-base-font-family);
  --type-details-caption-1-letter-spacing: 0.08em;
  --type-details-caption-2-font: normal normal 300 1.2rem/1.6rem var(--type-base-font-family);
  --type-details-caption-2-letter-spacing: 0.08em;
  --type-details-overline-font: normal normal 400 1.2rem/2rem var(--type-base-font-family);
  --type-details-overline-letter-spacing: 0.16em;

  /* Additional tokens */
  --type-fixed-font-family: adobe-clean, "Roboto Mono", menlo, consolas, "Liberation Mono", monospace, system-ui, sans-serif;
  --background-color: var(--color-neutral-50);
  --nav-height: 6.4rem;
}

/* fallback font */
@font-face {
  font-family: adobe-clean;
  size-adjust: 100%;
  src: local("Helvetica");
}

html, body {
  min-height: 100%;
}

html {
  font-size: 62.5%;
}

body {
  font: var(--type-body-1-default-font);
  letter-spacing: var(--type-body-1-default-letter-spacing);
  margin: 0;
  color: var(--color-neutral-800);
  background-color: var(--background-color);
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
  -webkit-font-smoothing: antialiased;
}

body:not(.appear) {
  display: none;
}

header {
  grid-row: 1;
  height: calc(var(--nav-height) + var(--nav-border-size));
}

main {
  grid-row: 2;
}

footer {
  grid-row: 3;
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  /* margin-top: 0.8em;
  margin-bottom: 0.25em;
  line-height: 1.25; */
  scroll-margin: 40px;
}

h1 {
  font: var(--type-display-1-font);
  letter-spacing: var(--type-display-1-letter-spacing);
}

h2 {
  font: var(--type-display-2-font);
  letter-spacing: var(--type-display-2-letter-spacing);
}

h3 {
  font: var(--type-display-3-font);
  letter-spacing: var(--type-display-3-letter-spacing);
}

h4 {
  font: var(--type-headline-1-font);
  letter-spacing: var(--type-headline-1-letter-spacing);
}

h5 {
  font: var(--type-headline-2-strong-font);
  letter-spacing: var(--type-headline-2-strong-letter-spacing);
}

h6 {
  font: var(--type-headline-2-default-font);
  letter-spacing: var(--type-headline-2-default-letter-spacing);
}

/* p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 1.5625em;
  margin-bottom: 1.5625em;
} */

hr {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 0;
  border-bottom: var(--shape-border-width-1) solid var(--color-neutral-300);
}

code,
pre {
  font: var(--type-body-2-default-font);
  letter-spacing: var(--type-body-2-default-letter-spacing);
  font-family: var(--type-fixed-font-family);
}

pre {
  overflow: scroll;
}

main pre {
  background-color: var(--color-neutral-300);
  padding: 1em;
  border-radius: 0.25em;
  overflow-x: auto;
  white-space: pre;
}

/* main > div {
  margin: var(--spacing-xbig) var(--spacing-small);
} */

input,
textarea,
select,
button {
  font: inherit;
}

/* form elements */
@media(max-width: 992px) {
  select,
  textarea,
  input {
    font-size: var(--spacing-sm) !important;
  }
}

/* links */
a:not(.dropin-design a) {
  color: var(--color-brand-500);
  font: var(--type-body-1-strong-font);
  letter-spacing: var(--type-body-1-strong-letter-spacing);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:not(.dropin-design a):hover {
  color: var(--color-brand-600);
  text-decoration: underline;
}

main p a:not(.button) {
  &[href] {
    text-decoration: underline;
    font: inherit;
    font-weight: var(--fw-bold);
    color: var(--theme-link-color);

    &[aria-disabled="true"],
    &.disabled {
      pointer-events: none;
      cursor: not-allowed;
      opacity: 0.5;
      text-decoration: none;
      color: var(--theme-link-disabled-color);
    }

    &:focus-visible {
      outline: 1px solid var(--theme-link-focus-color);
    }
    
    &:hover:not([aria-disabled="true"], .disabled) {
      color: var(--theme-link-hover-color);
      text-underline-offset: unset;
    }
  }
}

/* Alerts */

.dropin-in-line-alert__title {
  font: var(--para-font-sm-bld);
  letter-spacing: 0;
}

.dropin-in-line-alert__description {
  font: var(--para-font-sm);
  letter-spacing: 0;
}

.dropin-in-line-alert--error {
    background-color: var(--color-error-light);
    color: var(--color-error);
    border: 0;

    .dropin-in-line-alert__title-container svg {
      display: none;
    }

    .dropin-in-line-alert__title {
      color: var(--color-error);
      display: flex;
      align-items: center;
    }

    .dropin-in-line-alert__title::before {
      content: "";
      display: inline-block;
      width: 40px;
      height: 40px;
      margin-right: var(--spacing-medium);
      background-image: url("/icons/alerts/error.svg");
      background-repeat: no-repeat;
      background-size: contain;
      flex-shrink: 0;

      @media(max-width: 992px) {
        margin-right: var(--grid-spacing);
      }
    }
}

.dropin-in-line-alert--success {
    background-color: var(--color-alert-confirmation);
    color: var(--color-blue-dark);
    border: 0;

    .dropin-in-line-alert__title-container svg {
      display: none;
    }

    .dropin-in-line-alert__title {
      color: var(--color-soft-black);
      display: flex;
      align-items: center;
    }

    .dropin-in-line-alert__title::before {
      content: "";
      display: inline-block;
      width: 40px;
      height: 40px;
      margin-right: var(--spacing-medium);
      background-image: url("/icons/alerts/check-green.svg");
      background-repeat: no-repeat;
      background-size: contain;
      flex-shrink: 0;
    }
}

.toaster.dropin-in-line-alert--warning {
    background-color: var(--color-warning);
    color: var(--color-soft-black);
    border: 0;
}

.dropin-in-line-alert__dismiss-button {
  align-items: center;
  display: flex;
  width: unset;
  min-width: unset;
}

.dropin-in-line-alert__heading {
  gap: var(--spacing-medium);
}

.dropin-in-line-alert {
  padding: var(--spacing-sm);
  gap: unset;
}

.toaster.dropin-in-line-alert {
  gap: unset;
  padding: var(--spacing-sm);
  position: fixed;
  top: 157px;
  left: 50%;
  transform: translate(-50%);
  max-width: 600px;
  z-index: 9999;
  width: 100%;

  @media(max-width: 992px) {
    top: 88px;
    max-width: 335px;
  }
}

.dropin-in-line-alert .dropin-in-line-alert__dismiss-button {
  background: unset !important;
}

/* buttons */
body :where(main, footer) button.button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  border: var(--shape-border-width-3) solid transparent;
  padding: 0.5em 1.2em;
  font: var(--type-button-2-font);
  letter-spacing: var(--type-button-2-letter-spacing);
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body :where(main, footer) a.button:any-link:hover,
body :where(main, footer) a.button:any-link:focus,
body :where(main, footer) button.button:hover,
body :where(main, footer) button.button:focus {
  cursor: pointer;
}

body :where(main, footer) a.button.disabled,
body :where(main, footer) button.button:disabled,
body :where(main, footer) button.button:disabled:hover {
  background-color: var(--color-neutral-300);
  cursor: unset;
}

body :where(main, footer) a.button.secondary,
body :where(main, footer) button.button.secondary {
  background-color: unset;
  border: var(--shape-border-width-3) solid currentcolor;
  color: var(--color-brand-500);
}

body :where(main, footer) a.button.secondary:hover,
body :where(main, footer) button.button.secondary:hover {
  color: var(--color-brand-600);
}


main input:hover {
  border: 1px solid var(--form-field-hover);
}

main blockquote {
  font-style: italic;
  margin: 3rem;
  text-indent: -1rem;
  hanging-punctuation: first;
}

main blockquote p::before {
  content: '“';
  line-height: 0;
}

main blockquote p::after {
  content: '”';
  line-height: 0;
}

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

.icon {
  display: inline-block;
}

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

/* sections */

/* main > .section {
  margin: var(--spacing-xbig) 0;
}
*/
.section:empty {
  display: none;
}

/*
main > .section > div {
  max-width: 1200px;
  margin: auto;
  padding: 0 var(--spacing-medium);
} */

main > .section:first-of-type {
  margin-top: 0;

  &.enrichment-container {
    padding-top: 0;
  }
}

/* section metadata - styles - start */
main .section.light,
main .section.highlight {
  background-color: var(--color-neutral-100);
  margin: 0;
  padding: var(--spacing-xbig) 0;
}

/* Base Design System Tokens */
.dropin-design.dropin-design {
  --background-none: none 0 0% no-repeat padding-box;
}

.dropin-input-date__icon {
  z-index: 2;
}

/* Layout: Columns */
body.columns main {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-large) var(--spacing-small);
  box-sizing: border-box;
  gap: var(--grid-4-gutters);
  max-width: var(--site-container-width);
  padding-inline: var(--spacing-container);
}

body.columns main > .section {
  flex: 1;
  flex-basis: 100%;
  max-width: unset;
  margin: unset;
  padding: unset;
}

body.columns main > .section > div {
  max-width: unset;
  padding: unset;
}

body.columns main > .section > div:not(:last-child) {
  margin-bottom: var(--gap, unset);
}

body.columns main > .section:empty {
  display: none;
}

@media (min-width: 600px) {
  body.columns main {
    padding: var(--spacing-large) var(--spacing-big);
    padding-inline: var(--spacing-container);
  }
}

.dropin-product-item-card {
  border: unset;
}

@media (min-width: 900px) {
  body.columns main {
    flex-direction: row;
  }

  body.columns main > .section {
    flex: 1;
    flex-basis: var(--column-width, auto);
    max-width: var(--column-width, auto);
  }
}

/**
* Reset main element visibility
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden
*/
main[hidden] {
  display: none !important;
}

.chatbot-trigger {
  fill: var(--color-white);
  width: 58px;
  height: 58px;
  background: var(--color-blue-bright);
  box-shadow: none;
  right: 24px;
  bottom: 24px;
  position: fixed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;

  @media (min-width: 992px) {
    width: 75px;
    height: 75px;
    right: 30px;
    bottom: 30px;
  }
  
  /* stylelint-disable-next-line no-descending-specificity */
  svg {
    width: 24px;
    height: 24px;

    @media (min-width: 992px) {
      width: 30px;
      height: 30px;
    }
  }

  #chatbot-close {
    display: none;
  }
}

body:has([data-cognigy-webchat="true"]) {
  #chatbot-close {
    display: inline;
  }

  #chatbot-open {
    display: none;
  }
}
