/* Shared iOS web app shell, including the login page. */
.home-app {
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.home-public {
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
}

.home-app > .navbar {
    padding-top: calc(.5rem + env(safe-area-inset-top, 0px));
}

.home-user {
    min-width: 0;
    max-width: 12rem;
}

#botcPlayers .badge {
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

#botcPlayers .badge > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

#botcPlayers .botc-player-delete {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    padding: .375rem;
    font-size: .625rem;
    opacity: .85;
}

@media (max-width: 767.98px) {
    .home-app input.form-control,
    .home-app select.form-select,
    .home-app textarea.form-control {
        font-size: 16px;
    }

    .home-app .navbar-collapse {
        max-height: 70vh;
        max-height: 70dvh;
        overflow-y: auto;
    }

    #botcPlayerForm .form-control {
        min-width: 0;
        min-height: 44px;
    }

    #botcPlayerForm .btn {
        min-height: 44px;
        padding-inline: 1rem;
    }

    /* Keep room for additional homepage sections while allowing long player lists. */
    #botcPlayers {
        max-height: 40vh;
        max-height: 40svh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding: .25rem;
        scroll-padding: .25rem;
    }
}

#botc:not(.botc-editing) .botc-player-delete {
    display: none;
}

@media (max-width: 767.98px) {
    #botcEditToggle {
        min-height: 44px;
        padding-inline: 1rem;
    }
}

.botc-section-toggle {
    font-size: inherit;
    min-height: 44px;
}

.botc-section-toggle .fa-chevron-down {
    transition: transform .15s ease;
}

.botc-section-toggle:not(.collapsed) .fa-chevron-down {
    transform: rotate(180deg);
}

.botc-game-player {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .375rem 0;
}

.botc-game-player + .botc-game-player {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.botc-game-player-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.botc-game-role-input {
    flex: 1;
    min-width: 0;
    width: 50%;
}

.botc-game-player .form-check-input {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0 .25rem;
}

.botc-game-player.is-dead .botc-game-player-info {
    opacity: .65;
}

.botc-game-script {
    min-width: 0;
    overflow-wrap: anywhere;
}

.botc-game-history {
    max-height: 16rem;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.botc-game-history .list-group-item {
    overflow-wrap: anywhere;
    min-height: 44px;
}

@media (max-width: 767.98px) {
    .botc-touch-button,
    #botcGameForm .form-control,
    .botc-game-role-input {
        min-height: 44px;
    }

    .botc-game-player-list {
        max-height: 55vh;
        max-height: 55svh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding: .25rem;
        scroll-padding: .25rem;
    }
}
