/*
 * Styles of the public A/B testing calculator (/tools/ab-testing/, GWT module com.adalysis.gwt.abtesting).
 *
 * A port of the React app in iwmib/freetools/ab-testing: its src/index.css, src/App.css and the components'
 * style.scss files, flattened by hand and in the same order. The class names are the React ones, and the comments
 * name the component each block comes from, so the two can be compared rule for rule. The only colour change is
 * the old blue #2A4BC2 (hover #2442AB), now adalysis.com's #3A56BC (hover #282C8B).
 *
 * Isolation from the main app, both ways:
 *  - only the calculator's host page links this file, and that page links none of the main app's stylesheets;
 *  - every selector starts with :where(.abt), the calculator's root element. :where() adds no specificity, so
 *    each rule keeps the specificity the React app gave it and the cascade resolves as it did there, while
 *    nothing - not even the broad * and input rules - can reach outside the calculator;
 *  - the two exceptions are @font-face, global by nature, and the modal's scroll lock on <body>, which is gated
 *    on a class only this module sets.
 */

/* ---- Fonts (index.css) --------------------------------------------------------------------------------- */

@font-face {
    font-family: 'NeutrifPro-Regular';
    src: local('NeutrifPro-Regular'), url(../tools/ab-testing/fonts/NeutrifPro-Regular.ttf) format('truetype');
}

@font-face {
    font-family: 'NeutrifPro-Medium';
    src: local('NeutrifPro-Medium'), url(../tools/ab-testing/fonts/NeutrifPro-Medium.ttf) format('truetype');
}

@font-face {
    font-family: 'NeutrifPro-SemiBold';
    src: local('NeutrifPro-SemiBold'), url(../tools/ab-testing/fonts/NeutrifPro-SemiBold.ttf) format('truetype');
}

@font-face {
    font-family: 'NeutrifPro-Bold';
    src: local('NeutrifPro-Bold'), url(../tools/ab-testing/fonts/NeutrifPro-Bold.ttf) format('truetype');
}

@font-face {
    font-family: 'NeutrifPro-RegularItalic';
    src: local('NeutrifPro-RegularItalic'), url(../tools/ab-testing/fonts/NeutrifPro-RegularItalic.ttf) format('truetype');
}

/* ---- Page (index.css body and *, App.css .App) --------------------------------------------------------- */

:where(.abt) {
    font-family: NeutrifPro-Regular, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
    color: #182B49;
    text-align: center;
}

:where(.abt) * {
    margin: 0;
    padding: 0;
}

/* Calculation/Modal: React put .modal__open on <body> while the modal is open. */
body.abt-modal-open {
    overflow: hidden;
}

/* ---- Header -------------------------------------------------------------------------------------------- */

:where(.abt) .header__wrapper {
    background: #fff;
    color: #fff;
    font-size: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #d9e1eb;
}

:where(.abt) .header__content {
    width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Calculation/Modal --------------------------------------------------------------------------------- */

:where(.abt) .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(14, 18, 27, 0.55);
}

:where(.abt) .modal__content {
    position: relative;
    width: 454px;
    height: 244px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

:where(.abt) .modal__content h2 {
    font-family: "NeutrifPro-SemiBold";
    font-size: 20px;
    line-height: 26px;
    color: #001738;
    margin-bottom: 2rem;
}

:where(.abt) .modal__content button {
    display: block;
    font-size: 13px;
    font-family: "NeutrifPro-SemiBold";
    cursor: pointer;
    color: #fff;
    background: #3a56bc;
    border: none;
    border-radius: 8px;
    padding: 15px 15px;
    width: 50%;
}

/* ---- Calculation/Row ----------------------------------------------------------------------------------- */

:where(.abt) .row {
    display: flex;
    align-items: center;
}

:where(.abt) .row h2 {
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 23px;
    color: #001738;
    margin-right: 22px;
}

:where(.abt) .row__box {
    width: 630px;
    display: flex;
    align-items: center;
    padding: 19px 75px 19px 35px;
    border: 1px solid #d9e1eb;
    border-radius: 8px;
    background: #ffffff;
}

:where(.abt) .row__box input {
    width: 154px;
    padding: 0 20px;
    height: 60px;
    border: 1px solid #d9e1eb;
    outline: none;
    border-radius: 8px;
    background: #f7f7f9;
    font-size: 18px;
    letter-spacing: 0;
    line-height: 23px;
    text-align: center;
    color: #3c4858;
}

:where(.abt) .row__box input:first-child {
    margin-right: 31px;
}

:where(.abt) .row__arrow {
    margin-left: 47px;
}

:where(.abt) .row__rate {
    color: #3c4858;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 42px;
    margin-left: auto;
}

:where(.abt) .winner {
    background: #30bd69;
}

:where(.abt) .winner .row__rate {
    color: #FFFFFF;
}

:where(.abt) .winner svg {
    color: #FFFFFF;
}

:where(.abt) input::-webkit-outer-spin-button,
:where(.abt) input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- Calculation --------------------------------------------------------------------------------------- */
/* (React's .calculation { font-family: "Neutrif Pro" } matched no element, so it is left out.) */

:where(.abt) .calculation__wrapper {
    background: #f4f9ff;
    padding: 120px 0 160px;
}

:where(.abt) .calculation__container {
    width: 100%;
    max-width: 1178px;
    margin: auto;
    text-align: center;
}

:where(.abt) .calculation__title {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

:where(.abt) .calculation__title p {
    color: #3a56bc;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 34px;
    margin-left: 9px;
}

:where(.abt) .calculation__subtitle {
    color: #001737;
    font-size: 40px;
    font-weight: bold;
    letter-spacing: 0;
    line-height: 52px;
}

:where(.abt) .calculation__headers {
    width: 545px;
    display: flex;
    margin: 60px 0 10px 127px;
}

:where(.abt) .calculation__headers h3 {
    color: #001738;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 23px;
}

:where(.abt) .calculation__headers p {
    color: #3c4858;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 21px;
}

:where(.abt) .calculation__headers > div:first-child {
    margin-right: 140px;
}

:where(.abt) .calculation__headers > div:last-child {
    margin-left: auto;
}

:where(.abt) .calculation__main {
    display: flex;
}

:where(.abt) .calculation__rows {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

:where(.abt) .calculation__result {
    width: 348px;
    height: 168px;
    margin-left: 31px;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #d9e1eb;
    border-radius: 8px;
}

:where(.abt) .calculation__result-header {
    text-align: left;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 37px;
    color: #001737;
}

:where(.abt) .calculation__result-winner {
    color: #30bd69;
    display: flex;
    align-items: center;
}

:where(.abt) .calculation__result-winner-img {
    width: 32px;
    height: 32px;
    background: #30bd69;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

:where(.abt) .calculation__result-text {
    margin-top: 11px;
    text-align: left;
    color: #182b49;
    font-size: 24px;
    letter-spacing: 0;
    line-height: 38px;
}

:where(.abt) .calculation__result-text span {
    font-weight: bold;
}

:where(.abt) .calculation__btn {
    cursor: pointer;
    display: block;
    padding: 20px 78px;
    margin: 30px 0 0 36px;
    border-radius: 8px;
    background: #3a56bc;
    border: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    color: #ffffff;
}

/* ---- StartTrial ---------------------------------------------------------------------------------------- */

:where(.abt) .startTrial {
    background: #3a56bc;
    color: #fff;
    height: 463px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

:where(.abt) .startTrial__content {
    text-align: center;
    width: 50%;
}

:where(.abt) .startTrial__content h1 {
    font-size: 40px;
    margin-bottom: 1rem;
}

:where(.abt) .startTrial__btn {
    height: 61px;
    width: 238px;
    border: 1px solid #3a56bc;
    border-radius: 8px;
    background-color: #ffffff;
    color: #3a56bc;
    font-family: "NeutrifPro-SemiBold";
    margin-bottom: 10px;
    cursor: pointer;
}

/* ---- QuickDemo ----------------------------------------------------------------------------------------- */

:where(.abt) .quickDemo {
    padding: 110px 0 100px;
}

:where(.abt) .quickDemo__content {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

:where(.abt) .quickDemo__title {
    text-align: center;
    margin-bottom: 60px;
}

:where(.abt) .quickDemo__title h1 {
    font-size: 56px;
    line-height: 72px;
    color: #001737;
    margin-bottom: 10px;
}

:where(.abt) .quickDemo__title p {
    line-height: 1.6;
    color: #001737;
    margin-bottom: 0;
    font-size: 24px;
}

:where(.abt) .quickDemo__info {
    display: block;
}

:where(.abt) .quickDemo__info-item {
    text-align: center;
    margin-bottom: 30px;
    flex-shrink: 0;
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

:where(.abt) .quickDemo__info-item h6 {
    font-weight: 500;
    color: #001737;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.45;
    margin-top: 0;
}

:where(.abt) .quickDemo__info-icon {
    width: 72px;
    margin: 0 auto 25px;
}

:where(.abt) .quickDemo__row {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    margin: 0 -15px;
}

:where(.abt) .quickDemo__buttons {
    display: flex;
    align-items: center;
    justify-content: center;
}

:where(.abt) .quickDemo__buttons .adal-btn {
    font-family: "NeutrifPro-Medium";
    margin-right: 15px;
    margin-left: 0;
    padding: 19px 50px !important;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    text-align: center;
    box-sizing: border-box;
    font-size: 16px;
}

:where(.abt) .quickDemo__buttons .adal-btn-blue {
    color: #fff;
    line-height: 20px;
    padding: 12px 28px;
    border-radius: 8px;
    background-color: #3a56bc;
    border: 1px solid #3a56bc;
}

:where(.abt) .quickDemo__buttons .adal-btn-blue:hover {
    background-color: #282c8b;
}

:where(.abt) .quickDemo__buttons .adal-btn-border {
    color: #3a56bc;
    line-height: 20px;
    padding: 13px 28px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #3a56bc;
}

:where(.abt) .quickDemo__buttons .adal-btn-border:hover {
    background-color: #3a56bc;
    color: #fff;
}

/* ---- Footer -------------------------------------------------------------------------------------------- */

:where(.abt) .footer {
    background-color: #001737;
    padding: 120px 0 40px;
    display: block;
}

:where(.abt) .footer__container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

:where(.abt) .footer__wrapper {
    display: flex;
    align-items: flex-start;
    text-align: left;
}

:where(.abt) .footer__wrapper h3 {
    font-family: "NeutrifPro-SemiBold", sans-serif;
    font-weight: 600;
    color: #fff;
    margin: 0 0 23px;
    font-size: 20px;
    line-height: 1.35;
}

:where(.abt) .footer__col1 {
    width: 30%;
    flex-shrink: 0;
}

:where(.abt) .footer__col1 p {
    line-height: 26px;
    color: #fff;
    opacity: 0.7;
    font-size: 16px;
}

:where(.abt) .footer__col2 {
    flex-grow: 1;
}

:where(.abt) .footer__col3 {
    flex-shrink: 0;
}

:where(.abt) .footer__logo {
    display: block;
    width: 150px;
    cursor: pointer;
    margin-bottom: 35px;
}

:where(.abt) .footer__menu {
    list-style: none;
    display: block;
    padding: 0;
    margin: 0;
}

:where(.abt) .footer__menu li {
    margin-bottom: 24px;
}

:where(.abt) .footer__menu li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.25s;
    font-size: 16px;
    line-height: 1.45;
}

:where(.abt) .footer__social {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

:where(.abt) .footer__social li {
    margin-right: 10px;
    flex-shrink: 0;
}

:where(.abt) .footer__social li a {
    display: block;
    height: 44px;
    width: 44px;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.07);
    position: relative;
    transition: all 0.25s;
}

:where(.abt) .footer__social li a:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

:where(.abt) .footer__social li a span {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

:where(.abt) .footer__social li a span svg {
    color: #fff;
    font-size: 20px;
}

:where(.abt) .footer__line {
    margin-top: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 35px 0;
    border-top: 1px solid #122745;
}

:where(.abt) .footer__line p {
    color: #fff;
    opacity: 0.7;
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
}

:where(.abt) .footer__line ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

:where(.abt) .footer__line ul li:first-of-type {
    margin-right: 40px;
}

:where(.abt) .footer__line ul li a {
    color: #fff;
    opacity: 0.7;
    text-decoration: none;
    transition: all 0.25s;
    font-size: 16px;
    line-height: 1.45;
}

/* ---- Footer icons: the parts of Font Awesome's injected stylesheet that the three brand icons use -------- */

:where(.abt) .svg-inline--fa {
    display: inline-block;
    height: 1em;
    overflow: visible;
    vertical-align: -0.125em;
    box-sizing: content-box;
}
