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

@media (width >=900px) {
    :root {
        /* body sizes */
        --body-font-size-m: 18px;
        --body-font-size-s: 16px;
        --body-font-size-xs: 14px;

        /* heading sizes */
        --heading-font-size-xxl: 45px;
        --heading-font-size-xl: 36px;
        --heading-font-size-l: 28px;
        --heading-font-size-m: 22px;
        --heading-font-size-s: 20px;
        --heading-font-size-xs: 18px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    display: none;
    margin: 0;
    background-color: var(--color-body-background);
    color: var(--color-neutral-550);
    font-family: var(--font-family-heading);
    font-size: var(--font-size-body-default);
    font-style: normal;
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-body-default);
}

body.appear {
    display: block;
}

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

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

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

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

pre {
    padding: 16px;
    border-radius: 8px;
    background-color: var(--color-neutral-100);
    overflow-x: auto;
    white-space: pre;
}

input,
textarea,
select {
    font: inherit;
}

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

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

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 {
    background-color: var(--color-white);
}

@media (width >=1024px) {
    main {
        max-width: 1366px;
        margin-inline: auto;
        padding-right: calc(min(1366px, 100vw) * 0.25);
        position: relative;
    }

    body {
        position: relative;
    }
}

/* text styles */

:where(p:not(.rex-text-content p)) {
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family-body);
    font-size: var(--font-size-body-default);
    line-height: var(--line-height-body-default);
    color: var(--color-neutral-550);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-neutral-500);
    font-weight: var(--font-weight-book);
    font-family: var(--font-family-heading);
    font-style: normal;
}

h1 {
    font-size: var(--font-size-heading-jumbo);
    line-height: var(--line-height-heading-jumbo);
}

h2 {
    font-size: var(--font-size-heading-h1);
    line-height: var(--line-height-heading-h1);
}

h3 {
    font-size: var(--font-size-heading-h2);
    line-height: var(--line-height-heading-h2);
}

h4 {
    font-size: var(--font-size-heading-h3);
    line-height: var(--line-height-heading-h3);
}

h5 {
    font-size: var(--font-size-heading-h4);
    line-height: var(--line-height-heading-h4);
}

h6 {
    font-size: var(--font-size-heading-h5);
    line-height: var(--line-height-heading-h5);
}

main .section {
    margin-inline: var(--spacing-35, 35px) var(--spacing-24);

    @media (width < 1200px) {
        margin-inline: var(--spacing-16);
    }
}

/* section background variants */
.section.background-none {
    background: none;
    border-radius: 0;
}

.section.bg-color-background {
    background-color: var(--color-background-color);
}

.section.bg-color-gray {
    background-color: var(--color-gray-color);
}

.section.rounded {
    border-radius: var(--radius-24);
}

.section.center {
    text-align: center;
}

.section.margin-none {
    margin-inline: 0;
}

main .section.margin-small {
    margin: var(--spacing-40) var(--spacing-40) var(--spacing-44);
}

main .section.margin-small:first-child {
    margin: var(--spacing-36) var(--spacing-40) var(--spacing-20);
}

main .section.margin-small:last-child {
    margin: var(--spacing-40) var(--spacing-40) var(--spacing-40);
}

main.error .section {
    margin-inline: 0;
}

main .section.in-page-dropdown-container,
main .section.in-page-dropdown-container+.section,
main .section.in-page-dropdown-container+.section h1,
main .section.in-page-dropdown-container+.section h2,
main .section.in-page-dropdown-container+.section h6,
main .section.in-page-dropdown-container+.section.margin-small {
    margin-top: 0 !important;
}

main .section.in-page-dropdown-container.margin-small {
    margin-block: 0 !important;
}

main:has(> .section[class*="col-"]) {
    display: flex;
    column-gap: var(--spacing-24);
    flex-wrap: wrap;
    max-width: 1366px;
    margin-inline: auto;
    justify-content: space-between;

    .section.margin-small {
        margin: var(--spacing-40) var(--spacing-40) var(--spacing-20);
    }

    .section.margin-small:first-child {
        margin: var(--spacing-36) var(--spacing-40) var(--spacing-20);
    }

    .section.margin-small:last-child {
        margin: var(--spacing-40) var(--spacing-40) var(--spacing-40);
    }
}

main:has(> .section[class*="col-"]) .section:not([class*="col-"]) {
    width: 100%;
}

main>.section[class*="col-"] {
    margin-inline: 0 !important;
    min-width: 0;
}

.col-62 {
    flex: 0 1 calc(62.4% - var(--spacing-24) * 1 / 2);
}

.col-50 {
    flex: 0 1 calc(50% - var(--spacing-24) / 2);
}

.col-37 {
    flex: 0 1 calc(37.6% - var(--spacing-24) * 1 / 2);
}

.col-33 {
    flex: 0 1 calc(33.3% - var(--spacing-24) * 3 / 4);
}

@media (width < 768px) {
    main>.section[class*="col-"] {
        flex: 0 0 100%;
    }
}

/* Reset for editor containers */
[data-aue-resource] {
    margin-bottom: 1.5rem;
}

:where(h1, h2, h3, h4, h5, h6, p) {
    margin-block: 0;
}

:where(p:has(+ p)) {
    margin-bottom: 0.5em;
}

html {
    overflow-x: hidden;
}

/* Text alignment utilities (used by rex-text, heading blocks) */
.text-left {
    text-align: left;
}

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

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

sub,
sup {
    line-height: 0;
    position: relative;
    font-size: 60%;
    vertical-align: unset;
}

sup {
    top: -0.75em;

    &.sub-asterix {
        top: 0;
        font-size: 100%;
    }
}

sub {
    bottom: -0.5em;
}

/* error page styles starts */
/* stylelint-disable-next-line no-descending-specificity */
main.error main {
    @media (width >=992px) {
        padding-inline: 2.1875rem 1.875rem !important;
        padding-top: 1.875rem;
        padding-right: 1.875rem !important;
    }

    @media (width < 1024px) and (width >=768px) {
        max-width: 720px !important;
    }

    @media (width < 768px) {
        padding-inline: 15px !important;
    }
}


main.error main div.section:nth-child(1) .default-content-wrapper h1 {
    font-family: var(--font-family-whitney);
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-sage-base);
    margin-bottom: 0.5rem;
    text-align: left;

    @media (width >=992px) {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    @media (width >=1024px) {
        margin-top: 8px;

    }

    @media (width < 1024px) {
        margin-top: 24px;
    }

}

main.error main div.section:nth-child(1) .default-content-wrapper p {
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #414042;
    margin-bottom: 1.875rem;
    font-weight: 400;
    font-family: var(--font-family-whitney);
}

main.error main div.section:nth-child(1) .default-content-wrapper p strong::before {
    @media (width < 768px) {
        content: "\A";
        white-space: pre;
    }
}

main.error main a.rex-button {
    margin-bottom: 10px;
    margin-top: 0;
    margin-inline: 4px;
    font-family: var(--font-family-whitney);
    font-weight: 700;
    font-size: 15px;
    line-height: 21px;
    padding-block: 8px;
    display: flex;
    width: calc(100% - 8px);
    max-width: none;
    max-height: none;
    overflow: visible;
    text-overflow: initial;
    white-space: normal;

    @media (width < 1024px) {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        min-height: 50px;
        margin-bottom: 30px;
    }

    @media (width >=1024px) {
        padding-left: 0.9375rem;
        padding-right: 0.9375rem;
        min-height: 40px;
    }
}

main.error main .section.col-33 {
    @media(width < 1024px) {
        flex: auto;
    }
}

main.error main .section.isiinfo-container {
    @media(width >=992px) {
        margin-top: 302px;
        margin-bottom: 40px;
    }
}

/* error page ends */