/*
 * Copyright (C) 2026  Encelade SRL
 * Copyright (C) 2026  elephantchess.io
 * Copyright (C) 2026  Benoît Vleminckx (benckx)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */

h1 {
    margin-top: 8px;
}

.flex-lobby-container {
    display: flex;
    justify-content: left;
    align-items: start;
    flex-direction: row;
    width: 90%;
    min-width: 350px;
    max-width: 1300px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.flex-lobby-element {
    min-width: 350px;
    max-width: 380px;
    margin: 25px;
}

/*noinspection CssReplaceWithShorthandSafely*/
.flex-lobby-element-inter-title {
    display: flex;
    align-items: center;
    justify-content: start;
    margin: 0;
    margin-top: 10px;
    margin-left: 25px;
}

.flex-games-to-join-list-container {
    flex: 2 1 800px;
    min-width: 400px;
    max-width: unset;
}

.flex-new-game-logo-container {
    flex: 1 1 320px;
    min-width: 350px;
    max-width: unset;
}

#games-to-join-list-container {
    width: 100%;
    height: 365px;
    overflow-y: scroll;
    background-color: #e0d2bd;
    display: flex;
    justify-content: center;
    align-items: start;
    border: 2px solid #323232;
    border-radius: 3px;
    box-shadow: rgba(67, 71, 85, 0.27) 0 0 0.25em, rgba(90, 125, 188, 0.05) 0 0.25em 1em;
}

#games-to-join-list-table-container {
    width: 100%;
    padding: 14px 16px;
}

#games-to-join-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discrete-messages {
    font-size: 14px;
    color: #434343;
}

#online-users-and-rating {
    margin-top: 7px;
}

#game-menu-container {
    width: 100%;
    margin-top: 30px;
}

.game-to-join-item {
    display: flex;
    align-items: center;
    background-color: #ece5d8;
    border: 1px solid #565656;
    border-radius: 3px;
    min-height: 64px;
    padding: 6px 10px;
    box-shadow: rgba(0, 0, 0, 0.12) 0 1px 3px, rgba(0, 0, 0, 0.2) 0 1px 2px;
}

.game-to-join-variant-pane,
.game-to-join-time-control-pane,
.game-to-join-middle-pane,
.game-to-join-right-pane,
.game-to-join-rating-pane {
    display: flex;
    align-items: center;
}

.game-to-join-variant-pane {
    width: 54px;
    justify-content: center;
}

.game-to-join-time-control-pane {
    width: 60px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.game-to-join-middle-pane {
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 10px;
}

.game-to-join-right-pane {
    justify-content: flex-end;
    margin-left: 12px;
    margin-right: 8px;
}

.game-to-join-rating-pane {
    justify-content: center;
    margin-right: 20px;
}

.game-to-join-opponent-line {
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-to-join-opponent-line .username-cell {
    max-width: 280px;
    font-size: 15px;
}

.game-to-join-opponent-line .rating-cell {
    color: #555;
    font-size: 14px;
}

.game-to-join-metadata-line {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: 4px;
    gap: 6px;
}

.game-to-join-custom-time-line {
    color: #555;
    font-size: 13px;
    margin-top: 5px;
}

.game-to-join-metadata-item {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #3a3a3a;
    font-size: 14px;
}

.game-to-join-item .join-button-cell {
    text-align: right;
}

.game-to-join-rating-mode-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #3a3a3a;
    font-size: 14px;
    text-align: center;
}

.game-to-join-rating-mode-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.game-to-join-time-icon-cell {
    display: flex;
    justify-content: center;
}

.game-to-join-item .time-control-icons {
    width: 22px;
}

.game-to-join-time-duration-cell {
    color: #3a3a3a;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.game-to-join-online-cell {
    width: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

.game-to-join-online-cell .online-status-indicator {
    margin-right: 3px;
}

.join-buttons {
    height: 34px;
    font-size: 13px;
    padding: 0 15px;
}

.no-game-to-join-message {
    display: none;
    width: 80%;
    font-style: italic;
}

.no-game-to-join-message-visible {
    display: block;
}

#kofi-logo-holder {
    margin-top: 56px;
}

img#kofi-logo {
    width: 218px;
}

#time-control-categories-container {
    text-align: left;
}

.time-control-category-name {
    font-size: 16px;
    font-weight: bold;
    font-style: italic;
    margin-top: 8px;
}

.time-control-category-name-first {
    margin-top: 0;
}

.greyed-out {
    color: #a0a0a0;
}

#logo-holder {
    width: 100%;
    margin-top: 40px;
}

#logo-holder img {
    width: 300px;
    opacity: 82%;
}

#create-new-game-button {
    width: 250px;
    height: 45px;
    margin-top: 50px;
    margin-bottom: 25px;
}

img#discord-logo {
    width: 90px;
    opacity: 80%;
    margin-top: 14px;
}

img#discord-logo:hover {
    opacity: 90%;
}

.logo-holder {
    margin-top: 30px;
}

.monthly-supporters,
.one-time-supporters {
    font-size: 16px;
}

#upcoming-events {
    display: none;
}

.upcoming-event {
    margin-bottom: 16px;
}

.upcoming-event div {
    margin-bottom: 4px;
}

.upcoming-event .dates {
    font-weight: bold;
}

.upcoming-event .description {
    font-style: italic;
    font-size: 15px;
}

iframe {
    width: 340px;
    aspect-ratio: 1.777;
}

.browse-more-link-container {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
}

@media (max-width: 1000px) {
    .flex-lobby-element,
    .flex-games-to-join-list-container,
    .flex-new-game-logo-container {
        max-width: 100%;
    }

    .flex-lobby-container,
    .flex-lobby-element,
    .flex-new-game-logo-container,
    .flex-games-to-join-list-container {
        width: 100%;
    }

    #games-to-join-list-table-container {
        padding: 0;
    }

    #games-to-join-list {
        gap: 0;
    }

    .flex-lobby-element {
        margin-bottom: 56px;
        margin-left: 30px;
        margin-right: 30px;
    }

    .monthly-supporters,
    .one-time-supporters {
        font-size: 36px;
    }

    #logo-holder {
        display: none;
    }

    #game-menu-container {
        margin-top: 0;
    }

    .logo-holder {
        margin-top: 44px;
    }

    #create-new-game-button {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        width: 380px;
        height: 90px;
    }

    #no-game-to-join-message {
        font-size: 30px;
    }

    img#kofi-logo {
        width: 440px;
    }

    img#discord-logo {
        width: 150px;
        margin-top: 0;
    }

    iframe {
        width: 700px;
    }

    .discrete-messages {
        font-size: 26px;
    }

    .game-to-join-item .time-control-icons {
        width: 48px;
    }

    .game-to-join-variant-pane {
        width: 90px;
    }

    .game-to-join-variant-pane .variant-symbol {
        font-size: 48px;
    }

    .game-to-join-variant-pane .variant-name {
        font-size: 20px;
    }

    #games-to-join-list-container {
        height: 642px;
    }

    .game-to-join-item {
        border-radius: 0;
        min-height: 140px;
        padding: 10px 12px;
    }

    .game-to-join-time-control-pane {
        width: 114px;
    }

    .game-to-join-middle-pane {
        margin-left: 10px;
    }

    .game-to-join-right-pane {
        margin-left: 12px;
        margin-right: 8px;
    }

    .game-to-join-rating-pane {
        width: 84px;
        margin-left: 6px;
    }

    .game-to-join-opponent-line {
        min-width: 0;
    }

    .game-to-join-opponent-line .username-cell {
        max-width: unset;
        font-size: 28px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .game-to-join-opponent-line .rating-cell {
        flex: 0 0 auto;
        font-size: 24px;
    }

    .game-to-join-metadata-item {
        font-size: 28px;
    }

    .game-to-join-custom-time-line {
        font-size: 30px;
    }

    .game-to-join-time-duration-cell {
        font-size: 28px;
    }

    .game-to-join-rating-mode-cell {
        font-size: 30px;
    }

    .game-to-join-rating-mode-icon {
        width: 36px;
        height: 36px;
    }

    #online-users-and-rating {
        margin-top: 9px;
        font-size: 28px;
    }

    .join-buttons {
        min-width: 110px !important;
        max-width: 120px !important;
        height: 80px;
        font-size: 25px;
        padding: 0 !important;
        margin: 0;
        box-sizing: border-box;
    }

    .game-to-join-item .online-status-indicator {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        flex: 0 0 16px;
        border-radius: 50%;
        margin-right: 6px;
    }

    .upcoming-event .description {
        font-size: 32px;
    }
}
