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

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

body.appear {
  display: block;
}

header {
  min-height: var(--nav-height);
}

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;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-heading);
  scroll-margin: 40px;
}

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

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

h3 {
  font-size: var(--heading-font-size-l);
  letter-spacing: var(--heading-letter-spacing-l);
}

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

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

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

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
}

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

pre {
  padding: 16px;
  background-color: var(--color-background-soft);
  overflow-x: auto;
  white-space: pre;
}

main > div {
  margin: var(--section-spacing) var(--content-padding-mobile);
}

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

/* links */
a:any-link {
  color: var(--color-link);
  text-decoration: none;
  overflow-wrap: break-word;
}

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

/* buttons */
a.button:any-link,
button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  margin: 12px 0;
  border: 2px solid transparent;
  border-radius: 2.4em;
  padding: 0.5em 1.2em;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  background-color: var(--color-link);
  color: var(--color-background);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

button:disabled,
button:disabled:hover {
  background-color: var(--color-background-soft);
  cursor: unset;
}

a.button.secondary,
button.secondary {
  background-color: unset;
  border: 2px solid currentcolor;
  color: var(--color-text);
}

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

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

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

/* Section spacing */
main > .section {
  margin-block: var(--section-spacing);
}

main > .section:first-of-type {
  margin-block-start: var(--section-spacing);
}

/* Outer tier: layout max on every section container */
main > .section > div {
  max-width: var(--layout-max);
  margin-inline: auto;
  padding-inline: var(--content-padding-mobile);
}

@media (width >= 600px) {
  main > .section > div {
    padding-inline: var(--content-padding-tablet);
  }
}

@media (width >= 900px) {
  main > .section > div {
    padding-inline: var(--content-padding-desktop);
  }
}

/* Inner tier: reading width on default content */
main > .section > .default-content-wrapper {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 0;
}

/* Section metadata variants */
main .section.light,
main .section.highlight {
  background-color: var(--color-background-soft);
  margin: 0;
  padding: var(--section-spacing) 0;
}

/* Visually hidden, accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
