/****************************
Global
****************************/

:root {
    --black: #231F20;
    --disabled: #989898;
    --primary: #16457A;
    --muted: #5B6470;
    --grey: #E3E6EA;
    --offWhite: #F6F7F9;
}

*,
::before,
::after {
    box-sizing: border-box;
    font-feature-settings: "lnum" 1;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */
}

body {
    background-color: var(--offWhite);
    color: var(--black);
    display: flex;
    flex-direction: column;
    font-family: "Open Sans", sans-serif;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.noScroll {
    overflow: hidden;
}

/* the footer sits at the bottom of short pages instead of halfway up the screen */
#main {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
}

button {
    cursor: pointer;
}

textarea {
    resize: none;
}

img,
picture,
video {
    display: block;
    height: auto;
    width: 100%;
}

/****************************
Page
****************************/

#page {
    padding: 50px;
}

#pageWrap {
    margin: 0 auto;
    max-width: 800px;
}

#pageTitle {
    font-size: 50px;
    font-weight: 700;
    text-align: center;
}

#pageSubtitle {
    color: var(--muted);
    margin-top: 12px;
    text-align: center;
}

#pageBody {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 40px;
}

@media (max-width: 800px) {
    #page {
        padding: 30px 16px;
    }

    #pageTitle {
        font-size: 32px;
    }
}

/****************************
Card
****************************/

.card {
    background-color: white;
    border: 1px solid var(--grey);
    border-radius: 12px;
    padding: 24px 28px;
}

.cardTitle {
    font-size: 20px;
    font-weight: 700;
}

.cardBody {
    margin-top: 12px;
}

@media (max-width: 800px) {
    .card {
        padding: 20px;
    }
}

/****************************
Button
****************************/

.button {
    appearance: none;
    background-color: var(--black);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: block;
    font-size: 18px;
    font-weight: 700;
    max-width: 265px;
    padding: 15px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: .3s ease;
    width: 100%;
}

.button:disabled {
    background-color: var(--disabled);
}

.button:hover {
    background-color: var(--primary);
    border: none;
}

.button.center {
    margin: auto;
}

.button.loading {
    color: transparent;
    pointer-events: none;
    position: relative;
}

.button.loading::after {
    animation: loading 1s ease infinite;
    border: 4px solid transparent;
    border-radius: 50%;
    border-top-color: #FFF;
    bottom: 0;
    content: "";
    height: 22px;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
    width: 22px;
}

@keyframes loading {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

@media (max-width: 800px) {
    .button {
        max-width: none;
    }
}

/******************************
Inputs
 *****************************/

.formInput {
    background-color: white;
    border: 1px solid lightgray;
    display: block;
    margin: 0;
    padding: 10px;
    text-align: left;
    width: 100%;
}

/****************************
Rich Text Editor (RTE)
****************************/

.rte {
    line-height: 1.7;
}

.rte h1,
.rte h2,
.rte h3,
.rte h4,
.rte h5,
.rte h6,
.rte p {
    font-size: revert;
    font-weight: revert;
    margin: revert;
}

.rte h3 {
    font-size: 17px;
    margin: 24px 0 8px;
}

.rte a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: underline;
}

.rte strong {
    font-weight: 700;
}

.rte code {
    background-color: var(--offWhite);
    border: 1px solid var(--grey);
    border-radius: 4px;
    font-size: 13px;
    padding: 1px 5px;
    white-space: nowrap;
}

.rte ul,
.rte ol {
    padding-left: 22px;
}

.rte li {
    margin-bottom: 8px;
}

.rte table {
    border-collapse: collapse;
    display: block;
    margin: 10px auto 0;
    overflow-x: auto;
    width: 100%;
}

.rte td,
.rte th {
    border: 1px solid lightgray;
    min-width: 120px;
    padding: 8px;
    text-align: left;
    word-wrap: break-word;
}

.rte th {
    background-color: var(--offWhite);
}
