:root {
    --light-blue: #7bacd5;
    --dark-blue: #015eb7;
    --red: #c01002;
    --light-red: #ef3f2f;
    --dark-red: #840a00;
    --orange: #ff9e15;
    --dark-orange: #ef8e05;
    --white: #ffffff;
    --transparent-white: rgba(255, 255, 255, 0.8);
    --more-transparent-white: rgba(255, 255, 255, 0.5);
    --body-colour: #36435a;
    --light-grey: #efefef;
    --dark-grey: #cdcdcd;
    --card-font-size: 16px;
    --action-button-background: #cacad3;
    --action-button-background-hover: var(--red);
    --action-button-color: black;
    --action-button-color-hover: white;
}

html {
    height: 100vh;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #112131;
    font-family: Helvetica, sans-serif;
}
body.admin {
    background: white;
}
body > header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--body-colour);
    border-top: 8px solid var(--dark-blue);
    border-bottom: 8px solid var(--dark-blue);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    font-size: 120%;
    transition: margin-top 300ms ease-in-out;

    &:has(.hidden-header) {
        margin-top: -10rem;

        & .toggle-header {
            position: relative;
            top: 6.8rem;
            right: -0.9rem;
        }
    }
}

.header-nav {
    display: flex;
    flex: 1;
    gap: 1rem;
    align-items: center;
    overflow: clip;

    & > span {
        flex-grow: 0;
        height: 100px;
        width: 180px;
        background: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: rotate(-4deg) translate(0, 20px);

        & img {
            transform: rotate(4deg);
        }
    }

    & > div {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex: 1;

        & > div {
            flex-grow: 0;
            display: flex;
            flex-direction: column;
        }

        & nav {
            flex: 1;

            & ul {
                list-style: none;
                padding: 0;
                margin: 0;
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 0.5rem;

                & li {
                    font-size: 100%;

                    & a {
                        display: inline-block;
                        min-width: 6rem;
                        text-decoration: none;
                        padding: 0.6rem 1rem;
                        margin: 0.75rem 0;
                        background: #4b566b;
                        color: rgba(255, 255, 255, 0.9);
                        border: 2px solid transparent;
                        border-radius: 8px;
                        text-align: center;
                        transition: background-color 300ms ease-in-out;

                        &:hover {
                            background: #222;
                            border: 2px solid var(--dark-blue);
                        }
                    }

                    &.active a {
                        background: var(--dark-blue);
                    }

                    &:first-child {
                        position: relative;

                        ul {
                            position: absolute;
                            top: 3.6rem;
                            left: -8px;
                            display: none;
                            z-index: 1000;
                            background: rgba(255, 255, 255, 0.5);
                            padding: 4px 8px;
                            border-radius: 8px;

                            li a {
                                margin: 0.2rem 0;
                            }
                        }

                        &:hover ul {
                            display: block;
                        }
                    }
                }
            }
        }

        & h1 {
            flex-grow: 0;
            font-size: 160%;
            letter-spacing: 2px;
            color: var(--white);
            margin: 0;
        }

        & h2 {
            flex-grow: 0;
            font-size: 100%;
            color: var(--light-blue);
            margin: 4px 0 1rem;

            & a {
                color: inherit;
                font-size: 100%;

                &:hover {
                    color: var(--white);
                }
            }
        }
    }
}

bst-solo-view {
    --base-font-size: calc(2rem);
    font-size: var(--base-font-size);
    grid-template-rows: 4rem 1fr 8rem;
    grid-template-columns: 8rem 1fr 8rem;
    grid-template-areas:
          "header header header"
           "prev main next"
           "footer footer footer";
    height: 100%;
    min-height: max-content;
    margin: 0 1rem;
    display: grid;
    background: #112131;
    color: white;
    place-items: center;
    @media (max-width: 1200px) {
        grid-template-areas:
          "header header header"
           "main main main"
           "footer footer footer";
    }
}

.card-display-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 1rem 1.7rem;
    gap: 1rem;
    button {
        margin: 0;
        padding: 0.4rem 0.8rem;
        background: var(--red);
        border: none;
        border-radius: 8px;
        color: white;
        font-size: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: background-color 150ms ease-in-out;
        position: relative;
        &:hover {
            cursor: pointer;
            background: var(--dark-red);
        }
        &::after {
            content: "";
            position: absolute;
            inset: -4px;
            background: var(--red);
            border-radius: 12px;
            z-index: -1;
        }
        &:hover:after {
            background: var(--dark-red);
        }
    }

    @property --angle {
        syntax: "<angle>";
        initial-value: 0deg;
        inherits: false;
    }

    button[disabled] {
        &::after {
            background: conic-gradient(
                    from var(--angle),
                    var(--dark-blue),
                    var(--light-blue),
                    var(--dark-blue)
            );
            animation: spin 1.5s linear infinite;
        }
    }

    @keyframes spin {
        from {
            --angle: 0deg;
        }
        to {
            --angle: 360deg;
        }
    }

}
.card-display-controls > span {
    display: flex;
    gap: 1rem;
}
.card-display-controls > span:nth-child(1) {
    justify-content: flex-start;
}
.card-display-controls > span:nth-child(2) {
    justify-content: center;
}
.card-display-controls > span:nth-child(3) {
    justify-content: flex-end;
}

.card-display {
    --min-card-width: 400px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--min-card-width), 100%), 1fr));
    gap: 8px;
    margin: 1rem 1.5rem 80px;
}

.card-display-wrapper {
    overflow: scroll;
    height: 100%;
}

.card-display-wrapper > .btn {
    margin: 1rem auto 0;
}

.solo-controls {
    grid-area: header;
}

.card-nav svg {
    width: 1em;
    height: 1em;
    fill: white;
    border: 2px solid white;
    border-radius: 50%;
    padding: 1rem;
}

.prev-card {
    grid-area: prev;
    @media (max-width: 1200px) {
        display: none;
    }
}

.card-cell {
    grid-area: main;
    width: 100%;
    height: 100%;
}

.next-card {
    grid-area: next;
    @media (max-width: 1200px) {
        display: none;
    }
}

.solo-footer {
    grid-area: footer;
    height: 8rem;
    display: grid;
    place-content: center;
}

.card {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    min-height: 400px;
    border-radius: 1rem;
    display: grid;
    grid-template-rows: min-content 1fr min-content;
    margin: 0 auto;
    font-family: "Helvetica Neue", sans-serif;
    button {
        opacity: 0.7;
        &:hover {
            opacity: 1;
            cursor: pointer;
        }
    }
}
.card-header {
    background: #015fb7;
    border-radius: 1rem 1rem 0 0;
    display: grid;
    grid-template-columns: 3em 1fr 3em;
    place-items: center;
    font-size: 1em;
    color: white;
    padding: 0.5rem;
    h3 {
        margin: 0;
        text-align: center;
        line-height: 1.2;
        font-weight: normal;
    }
    svg {
        fill: white;
        height: 1em;
        width: 1em;
    }
}
.card-main {
    background-image: linear-gradient(200deg,#36435a 0%,#7bacd5 0%,#015eb7 100%);
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    font-size: 2rem;
    line-height: 1.2;
    display: grid;
}
.card-main-image {
    grid-column: 1/-1;
    grid-row: 1/-1;
}
.card-main-backdrop {
    grid-column: 1/-1;
    grid-row: 1/-1;
    background: black;
    opacity: 0.5;
    z-index: 1;
}
.card-main-text {
    box-sizing: border-box;
    grid-column: 1/-1;
    grid-row: 1/-1;
    padding: 1rem 2rem;
    display: grid;
    height: 100%;
    width: 100%;
    z-index: 2;
    justify-content: center;
    align-content: center;
    gap: 1rem;
}
.card-text-1, .card-text-2 {
    padding: 0.5rem 1rem;
    background: white;
    color: #112131;
    border-radius: 1rem;
}
.card-footer {
    background: #eee;
    border-radius: 0 0 1rem 1rem;
    display: grid;
    grid-template-columns: 3em 1fr 3em;
    place-items: center;
    font-size: 1em;
    padding: 0.5rem;
    .icon-button {
        color: #112131;
        border-color: #112131;
        svg {
            fill: #112131;
        }
    }
}
.icon-button {
    height: 2em;
    width: 2em;
    font: inherit;
    font-size: 1em;
    background: none;
    color: white;
    border: 1px solid white;
    border-radius: 1em;
    display: grid;
    place-items: center;
}
.icon-button:first-child {
    justify-self: start;
}
.icon-button:last-child {
    justify-self: end;
}
.card-control-buttons button {
    font-size: 1em;
    padding: 0.2rem 0.5rem;
    background: none;
    border: 1px solid #112131;
    border-radius: 0.5rem;
}

.invisible {
    visibility: hidden;
}
.visually-hidden {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.login {
    margin: 2rem;
    padding: 2rem;
}
.login label {
    color: white;
    display: block;
    margin-top: 1rem;
}
