@import "login.css";
@import "modals.css";
@import "navigation.css";
@import "./game/main.css";

body {
    margin: 0;
    padding: 0 !important;
    height: 100svh;
    font-family: sans-serif;
    --top-bar-height: 0;
    --bottom-bar-height: 0;
    --ui-top-bar-height: 4rem;
    --ui-bottom-bar-height: 5rem;
    --challenge-color: #7a0018;
    --all-low-danger: lightcoral;
}

.game {
    --top-bar-height: var(--ui-top-bar-height);
}

.runners {
    --bottom-bar-height: var(--ui-bottom-bar-height);
    --content-height: calc(100svh - var(--top-bar-height) - var(--bottom-bar-height));
}

.game > div > .content, .join .content {
    height: calc(var(--content-height) - 2rem);
    overflow-y: auto;
    padding: 1rem;
}

.join .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

mdui-fab {
    width: 100% !important;
}

.runners .content mdui-card {
    width: 100%;
    padding: 1rem;
}

mdui-list-item:has(.price) img {
    display: flex;
}

.price-line img {
    height: 20px;
}

.price-line {
    font-size: 16px;
    color: gold;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.challenge-card {
    aspect-ratio: 7 / 12;
    width: 86% !important;
    margin: 7% !important;
}

.challenges-settings, .challenge-card {
    background: var(--challenge-color) !important;
}

.challenge-card .no-challenge {
    text-align: center;
}

.challenge-card.active .no-challenge {
    display: none;
}

.challenge-card:not(.active) > *:not(.no-challenge) {
    display: none;
}

.challenge-card.active {
    animation: spin 0.5s 1;
}

.challenge-card:not(.active) {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.challenge-card mdui-button {
    width: 100%;
}

.challenge-card > h2 {
    text-align: center;
}

.challenge-card .challenge-description {
    margin-bottom: 1rem;
}

.challenge-card .penalty-value {
    font-weight: bold;
}

@keyframes spin {
    0% {
        transform: rotateY(0deg);
        transition: transform .5s;
        content-visibility: hidden;
    }

    99% {
        transform: rotateY(180deg);
        transition: transform .5s;
        content-visibility: hidden;
    }

    100% {
        transform: rotate(0deg);
        transition: none;
    }
}

.start {
    height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
    padding-inline: 2rem;
}

.create {
    height: calc(100svh - 2rem);
    padding: 1rem;
    overflow-y: auto;
}

.confirm-step, .join mdui-button {
    width: 100%;
}

.create .challenges-settings, .create .shop-settings {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.join {
    --top-bar-height: var(--ui-top-bar-height);
    --content-height: calc(100svh - var(--ui-bottom-bar-height));
}

.shop-settings {
    background: goldenrod;
}

.create .challenges-settings .description, .create .shop-settings .description {
    font-size: 12px;
    opacity: 0.6;
}

.logout-text {
    color: var(--all-low-danger) !important;
    cursor: pointer;
}

mdui-top-app-bar mdui-avatar {
    margin-right: 10px;
}
