/* DESKTOP VISIBILITY -------------------------------------------------- */

.mobileOnly {
    display: none;
}




/* HEADER -------------------------------------------------------------- */

body > header {
    background: #fff;
    border-bottom: 1px solid #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

body > header .header-top {
    align-content: center;
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

body > header .header-top .logo {
    align-content: center;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1em;
    padding: 1.1875rem;
}

body > header .header-top .logo img {
    width: auto;
}

body > header .header-top .logo .tool-name {
    color: var(--dark-purple);
    display: block;
    font: var(--tool-name);
}




/* MAIN NAVIGATION ----------------------------------------------------- */

body > header nav {
    background: var(--light-grey);
    margin: 0;
    padding: 0 1rem;
}

body > header nav > ul {
    display: flex;
    margin: 0;
}

body > header nav ul li {
    position: relative;
}

#mainnav a {
    color: var(--dark-purple);
    display: inline-block;
    line-height: 3.25em;
    padding: 0 1em;
    text-decoration: none;
}




/* ON-STATE ------------------------------------------------------------ */

#mainnav > ul > li.on > a {
    background: #fff;
    color: var(--dark-purple);
}




/* HOVER/FOCUS-STATE: -------------------------------------------------- */

#mainnav > ul > li > a:is(:hover, :focus-visible) {
    background: var(--dark-purple);
    color: #FFF;
}




/* ACCESSIBLE DROPDOWNS ------------------------------------------------ */

#mainnav > ul > li > button {
    background: transparent;
    border: 0;
    bottom: 0.25em;
    height: .5rem;
    padding: 0;
    pointer-events: none;
    position: absolute;
    right: 50%;
    transform: translate(50%, -50%);
    width: 1.25rem;
}

#mainnav > ul > li > button:before {
    background: url('/images/chevron-down.svg') no-repeat center / contain;
    content: '';
    height: .75rem;
    left: 0;
    opacity: 0.5;
    position: absolute;
    right: 0;
    top: calc(50% - 6px);
}

#mainnav > ul > li > a:is(:hover, :focus) + button:before {
    filter: invert(1);
    opacity: 1;
}




/* DROP-DOWN MENU ------------------------------------------------------ */

#mainnav li > div {
    background: var(--dark-purple);
    height: auto !important;
    left: 0;
    opacity: 0;
    padding: 1em 0;
    position: absolute;
    top: -200vh;
    visibility: hidden;
    width: 200px;
}




/* FADE OUT ------------------------------------------------------------ */

#mainnav li:not(.expand) > div {
    transition: opacity .2s ease-out 0.25s, visibility .2s ease-out 0.25s, top 0s linear 0.7s;
}

#mainnav li:hover > div,
#mainnav > ul > li.tapped > div,
#mainnav > ul > li > a:focus + div,
#mainnav > ul > li.expand > div {
    opacity: 1;
    top: 100%;
    visibility: visible;
}




/* FADE IN ------------------------------------------------------------- */

#mainnav > ul > li:is(:hover, .expand) > div {
    transition: opacity .2s ease-in .3s, visibility .2s ease-in 0s, top 0s linear .3s;
}




/* DROPDOWN DISMISSED WITH ESC (WCAG 1.4.13) --------------------------- */

#mainnav > ul > li.dismissed > div,
#mainnav > ul > li.dismissed > a + div {
    opacity: 0;
    top: -200vh;
    transition: none;
    visibility: hidden;
}

#mainnav > ul > li:last-child > div {
    right: 0;
}

#mainnav li ul li {
    display: block;
    width: 100%;
}

#mainnav ul li ul li a {
    background: none;
    color: #FFF;
}

#mainnav li ul li a {
    display: block;
    font-size: .9em;
    line-height: 1.1em;
    padding: .3em 1rem;
    text-align: left;
    width: 100%;
}

#mainnav li ul li a:is(:hover, :focus) {
    background: #FFF;
    color: var(--dark-purple);
}

#mainnav li ul ul {
    display: none;
}




/* FLEX OPTIONS -------------------------------------------------------- */

.flex.flex-column {
    flex-direction: column;
}

.flex {
    display: flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    width: 100%;
}

.flex.width-auto {
    width: auto;
}

.flex .bigger {
    flex: 1 1 auto;
}

.flex.center-horizontally {
    align-content: center;
    align-items: center;
}

.flex.center-bottom {
    align-content: flex-end;
    align-items: flex-end;
}




/* ALIGN SELF - CAN BE APPLIED INDIVIDUAL ITEMS WITHIN A FLEX CONTAINER - */

.align-self-auto {
    align-self: auto;
}

.align-self-baseline {
    align-self: baseline;
}

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

.align-self-flex-start {
    align-self: flex-start;
}

.align-self-flex-end {
    align-self: flex-end;
}




/* ALIGN ITEMS --------------------------------------------------------- */

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

.align-items-stretch {
    align-items: stretch;
}

.align-items-flex-start {
    align-items: flex-start;
}

.align-items-flex-end {
    align-items: flex-end;
}




/* ALIGN CONTENT ------------------------------------------------------- */

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

.align-content-stretch {
    align-content: stretch;
}

.align-content-flex-start {
    align-content: flex-start;
}

.align-content-flex-end {
    align-content: flex-end;
}




/* JUSTIFY CONTENT WITHIN A FLEX CONTAINER ----------------------------- */

.space-around {
    justify-content: space-around;
}

.flex.space-between,
.space-between {
    justify-content: space-between;
}

.space-evenly {
    justify-content: space-evenly;
}

.flex-center {
    justify-content: center;
}

.flex-start {
    justify-content: flex-start;
}

.flex-end {
    justify-content: flex-end;
}




/* WRAP ---------------------------------------------------------------- */

.flex.flex-wrap,
.flex-wrap {
    flex-wrap: wrap;
}

.no-wrap {
    flex-wrap: nowrap;
}




/* EQUAL-WIDTH COLUMNS ------------------------------------------------- */

.two-columns > * {
    width: 50%;
}

.three-columns > * {
    width: 33.333%;
}

.four-columns > * {
    width: 20%;
}




/* SPACING UTILITIES --------------------------------------------------- */

.gap-4 {
    gap: 0.25em;
}

.gap-8 {
    gap: 0.5em;
}

.gap-14 {
    gap: 0.875em;
}

.gap-2em {
    gap: 2em;
}




/* FLEX ITEM WIDTHS ---------------------------------------------------- */

.flex .full-width {
    width: 100%;
}

.flex .quarter {
    width: calc(25% - 0.75em);
}

.flex .third {
    width: calc(33.333% - 0.6875em);
}

.flex .half {
    width: calc(50% - 0.5em);
}

.flex .two-thirds {
    width: calc(66.666% - 0.3125em);
}

.flex .three-quarters {
    width: calc(75% - 0.25em);
}




/* GAP-AWARE COLUMN WIDTHS --------------------------------------------- */

.gap-5 {
    gap: 0.3125em;
}

.gap-5 > .quarter {
    width: calc(25% - 0.25em);
}

.gap-5 > .third {
    width: calc(33.333% - 0.25em);
}

.gap-5 > .half {
    width: calc(50% - 0.1875em);
}

.gap-5 > .two-thirds {
    width: calc(66.666% - 0.0625em);
}

.gap-5 > .three-quarters {
    width: calc(75% - 0.0625em);
}

.gap-10 {
    gap: 0.625em;
}

.gap-10 > .quarter {
    width: calc(25% - 0.5em);
}

.gap-10 > .third {
    width: calc(33.333% - 0.4375em);
}

.gap-10 > .half {
    width: calc(50% - 0.3125em);
}

.gap-10 > .two-thirds {
    width: calc(66.666% - 0.1875em);
}

.gap-10 > .three-quarters {
    width: calc(75% - 0.125em);
}

.gap-15 {
    gap: 0.9375em;
}

.gap-15 > .quarter {
    width: calc(25% - 0.75em);
}

.gap-15 > .third {
    width: calc(33.333% - 0.625em);
}

.gap-15 > .half {
    width: calc(50% - 0.5em);
}

.gap-15 > .two-thirds {
    width: calc(66.666% - 0.3125em);
}

.gap-15 > .three-quarters {
    width: calc(75% - 0.1875em);
}

.gap-20 {
    gap: 1.43em;
}

.gap-20 > .quarter {
    width: calc(25% - 1.125em);
}

.gap-20 > .third {
    width: calc(33.333% - 1em);
}

.gap-20 > .half {
    width: calc(50% - 0.75em);
}

.gap-20 > .two-thirds {
    width: calc(66.666% - 0.4375em);
}

.gap-20 > .three-quarters {
    width: calc(75% - 0.3125em);
}

.gap-30 {
    gap: 1.875em;
}

.gap-30 > .quarter {
    width: calc(25% - 1.4375em);
}

.gap-30 > .third {
    width: calc(33.333% - 1.25em);
}

.gap-30 > .half {
    width: calc(50% - 0.9375em);
}

.gap-30 > .two-thirds {
    width: calc(66.666% - 0.625em);
}

.gap-30 > .three-quarters {
    width: calc(75% - 0.4375em);
}

.gap-40 {
    gap: 2.5em;
}

.gap-40 > .quarter {
    width: calc(25% - 1.875em);
}

.gap-40 > .third {
    width: calc(33.333% - 1.6875em);
}

.gap-40 > .half {
    width: calc(50% - 1.25em);
}

.gap-40 > .two-thirds {
    width: calc(66.666% - 0.8125em);
}

.gap-40 > .three-quarters {
    width: calc(75% - 0.625em);
}

.gap-50 {
    gap: 3.125em;
}

.gap-50 > .quarter {
    width: calc(25% - 2.375em);
}

.gap-50 > .third {
    width: calc(33.333% - 2.125em);
}

.gap-50 > .half {
    width: calc(50% - 1.5625em);
}

.gap-50 > .two-thirds {
    width: calc(66.666% - 1em);
}

.gap-50 > .three-quarters {
    width: calc(75% - 0.75em);
}




/* FORM COLUMN WIDTHS -------------------------------------------------- */

.form-flex .half {
    width: calc(50% - .5em);

    /* Full on mobile */
}

.form-flex .third {
    width: calc(33.33% - .5em);

    /* Full on mobile */
}

.form-flex .quarter {
    width: calc(25% - .5em);

    /* Half on mobile */
}




/* DESKTOP STYLES ------------------------------------------------------ */

main .two-columns .white-box + .white-box {
    margin-top: 0;
}

main .dashboardList li > strong {
    display: inline-block;
    min-width: 200px;
}

.white-box {
    background: #fff;
    padding: 2em;
}

output#list > div {
    display: flex;
    gap: 8px;
    width: 100%;
}

.repeater {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.repeater label {
    width: calc(50% - 0.5em);
}

#loginBlocks > * {
    max-width: 21.875em;
}




/* COACH MATCH DETAILS ------------------------------------------------- */
@media screen and (min-width: 1100px) {
    .coach-match-summary {
        grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    }
}

/* RESPONSIVE TABLES --------------------------------------------------- */

.table-wrap::before {
    left: 0;
}

.table-wrap::after {
    right: 0;
}




/* SITE ADAPTATIONS ---------------------------------------------------- */

/* Keep the sticky header from covering in-page targets such as #main. */
html {
    scroll-padding-top: var(--header-height, 8.5rem);
}

body > header .header-top .account-links {
    align-items: center;
}

/* Submenu toggles sit beside their parent link and remain clickable. */
#mainnav > ul > li.menu-item-has-children > a {
    padding-right: 2.25em;
}

#mainnav > ul > li > button {
    border-radius: 3px;
    bottom: auto;
    cursor: pointer;
    height: 1.5rem;
    pointer-events: auto;
    right: 0.375em;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
}

#mainnav > ul > li > button:before {
    height: 0.75rem;
    top: calc(50% - 0.375rem);
}

#mainnav > ul > li:is(:hover, .expand) > a {
    background: var(--dark-purple);
    color: #FFF;
}

#mainnav > ul > li:is(:hover, .expand) > button:before,
#mainnav > ul > li > button:is(:hover, :focus-visible):before {
    filter: invert(1);
    opacity: 1;
}

#mainnav > ul > li > button:focus-visible {
    outline-color: #FFF;
    outline-offset: -2px;
}

#mainnav > ul > li.on > a {
    box-shadow: inset 0 -3px 0 var(--bright-purple);
}

#mainnav > ul > li.on:is(:hover, .expand) > a {
    background: var(--dark-purple);
    color: #FFF;
}

#mainnav li ul li.on > a {
    background: var(--bright-purple);
    color: #FFF;
}

/* Right-aligned notice item (pending flex requests). */
#mainnav > ul > li.nav-notice {
    margin-left: auto;
}

#mainnav > ul > li.nav-notice > a {
    font-style: italic;
}

/* Login sections side by side. */
#login-blocks > .half {
    max-width: 21.875em;
    width: calc(50% - .9375em);
}

#login-blocks {
    justify-content: center;
}

.form-flex .half {
    width: calc(50% - .5em);
}

.form-flex .third {
    width: calc(33.333% - .5em);
}

.form-flex .quarter {
    width: calc(25% - .5em);
}

.justify-content-center {
    justify-content: center;
}

.flex.mobile-column {
    flex-direction: row;
}

.flex.mobile-column.flex-column {
    flex-direction: column;
}

.referral-columns {
    flex-wrap: nowrap;
}

/* The submenu toggle sits between the parent link and its dropdown. */
#mainnav > ul > li > a:focus ~ div {
    opacity: 1;
    top: 100%;
    visibility: visible;
}

#mainnav > ul > li.dismissed > a ~ div {
    opacity: 0;
    top: -200vh;
    transition: none;
    visibility: hidden;
}
