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

@font-face {
    font-display: swap;
    font-family: "Mulish";
    font-style: normal;
    font-weight: 400 800;
    src: url("/assets/fonts/mulish-latin.woff2") format("woff2");
}

/* brand colours from the musclemat.com theme */
:root {
    --navy: #2C365A;
    --navy-dark: #1F2745;
    --sand: #EADACB;
    --sand-light: #F3EADF;
    --cream: #FFFAF5;
    --charcoal: #333333;
    --muted: #6B645E;
    --border: #DCCFC1;
    --input-border: #8A8178;
    --error: #A0412D;
    --disabled: #B3A698;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--cream);
    color: var(--charcoal);
    font-family: "Mulish", sans-serif;
    line-height: 1.5;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

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

button {
    cursor: pointer;
}

img,
svg {
    display: block;
}

:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

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

.button {
    appearance: none;
    background-color: var(--navy);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: block;
    font-size: 17px;
    font-weight: 800;
    min-height: 50px;
    padding: 13px 32px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: var(--navy-dark);
}

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

.button.loading {
    background-color: var(--navy);
    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: white;
    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 {
        width: 100%;
    }
}

/********************* Form Fields *********************/

.formField {
    margin-bottom: 18px;
}

.formLabel {
    color: var(--charcoal);
    display: block;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}

.formLabel.light {
    color: var(--muted);
    font-weight: 400;
}

.formLabelOptional {
    color: var(--muted);
    font-weight: 400;
}

.formHint {
    color: var(--muted);
    font-size: 14px;
    margin: -2px 0 8px;
}

.formInput {
    appearance: none;
    background-color: white;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--charcoal);
    display: block;
    font-size: 16px;
    height: 48px;
    padding: 10px 14px;
    width: 100%;
}

select.formInput {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 12px 8px;
    padding-right: 38px;
}

.formInput[aria-invalid="true"] {
    border: 2px solid var(--error);
}

.formError {
    color: var(--error);
    font-size: 14px;
    font-weight: 700;
    margin-top: 6px;
}

.formError:empty {
    display: none;
}
