/* INTERFAZ ONLINE: salas, formularios y temporizador */

.online-status {
    font-size: 11px;
    color: #c2d9cb;
    align-self: center;
    max-width: 190px;
    overflow-wrap: anywhere
}

.online-message {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: min(94vw, 750px);
    padding: 12px 18px;
    background: #efd38f;
    color: #12382e;
    border-radius: 10px;
    box-shadow: 0 5px 30px #0006;
    font-size: 14px
}

.online-message button {
    margin-left: 12px;
    background: transparent;
    color: #12382e;
    border: 1px solid #12382e;
    border-radius: 5px;
    padding: 4px
}

#lobby {
    max-width: 950px;
    margin: 20px auto;
    padding: 32px
}

#lobby h2 {
    font: 36px Georgia, serif;
    color: var(--gold)
}

.lobby-players {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0
}

.lobby-player {
    padding: 16px;
    background: #ffffff09;
    border: 1px solid #ffffff25;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.lobby-player small {
    display: block;
    color: #b9d2c4;
    margin-top: 4px
}

.lobby-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px
}

.lobby-settings {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap
}

.lobby-settings label {
    font-size: 14px
}

.lobby-settings select {
    font: inherit;
    color: var(--ink);
    background: #173e35;
    border: 1px solid #567663;
    border-radius: 8px;
    padding: 9px;
    margin-left: 6px
}

.lobby-player button {
    font-size: 12px;
    padding: 7px
}

.lobby-invite {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.lobby-invite input {
    flex: 1;
    min-width: 180px;
    background: #12382e;
    border: 1px solid #507660;
    border-radius: 6px;
    color: white;
    padding: 9px;
    font: inherit
}

.online-spectator {
    color: #efd38f
}

.opponent-connection {
    font-size: 9px;
    color: #efd38f
}

.online-note {
    font-size: 12px;
    color: #b9d2c4;
    line-height: 1.6
}

@media(max-width:900px), (pointer:coarse) and (max-height:650px) {
    .online-status {
        font-size: 10px;
        max-width: 110px
    }

    .online-message {
        font-size: 12px;
        bottom: 7px;
        padding: 9px;
        max-height: 25dvh;
        overflow: auto
    }

    #lobby {
        padding: 18px;
        margin: 8px auto
    }

    .lobby-players {
        gap: 7px
    }

    .lobby-player {
        padding: 10px
    }

    .lobby-player strong {
        overflow-wrap: anywhere
    }

    .lobby-settings {
        gap: 12px
    }

    .lobby-actions button {
        flex: 1
    }

    body.in-game .opponent-score,     body.in-game .seat-name .human-score {
        font-size: 14px;
        font-weight: 600
    }

}

.entry-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 20px
}

.entry-tabs [aria-pressed="true"] {
    background: #f0d38a;
    color: #082d25
}

.setup-copy form h3 {
    margin: 0 0 18px
}

.setup-copy form .big {
    margin-top: 18px
}

.play-turn-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 100px;
    align-items: center;
    gap: 8px;
    width: min(100%, 620px);
    align-self: flex-end;
    border: 1px solid #487060;
    background: #12382f;
    border-radius: 7px;
    padding: 5px 9px;
    margin: 0 0 6px auto;
    font-size: 12px
}

.play-turn-banner.is-mine {
    border-color: #65e69b;
    background: #143e2e;
    color: #a2ffc6
}

.play-turn-banner strong {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.play-turn-banner>span {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap
}

.play-turn-track {
    width: 100%;
    height: 4px;
    border-radius: 6px;
    overflow: hidden;
    background: #071e1c
}

.play-turn-track>div {
    height: 100%;
    background: #65e69b;
    transition: width .2s linear
}

.play-turn-banner.is-urgent .play-turn-track>div {
    background: #f0c66f
}

body.my-online-turn #humanName {
    color: #83ffaf;
    font-weight: 900
}

body.my-online-turn .human-seat .seat-name {
    color: #a2ffc6
}

.opponent.active .opponent-name {
    color: #83ffaf;
    font-weight: 900
}

@media(max-width:900px), (pointer:coarse) and (max-height:650px) {
    body.in-game .play-turn-banner {
        flex-shrink: 0;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto 64px;
        margin: 0;
        padding: 3px 7px;
        font-size: 11px
    }

    body.in-game .play-turn-banner>span {
        font-size: 13px
    }

    body.in-game .play-turn-track {
        height: 3px
    }

}

/* Temporizador fuera del flujo: no agrega altura ni desplaza la mesa. */
#game {
    position: relative
}

#playTurnBanner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(230px, 25vw, 350px);
    margin: 0;
    z-index: 5;
    grid-template-columns: minmax(0, 1fr) auto 64px;
    padding: 4px 8px;
    font-size: 11px
}

@media(max-width:1100px) {
    #playTurnBanner {
        top: 0;
        left: 50%;
        width: 240px;
        grid-template-columns: minmax(0, 1fr) auto 45px;
        font-size: 10px;
        padding: 3px 6px
    }

}

@media(max-width:900px), (pointer:coarse) and (max-height:650px) {
    body.in-game #playTurnBanner {
        top: 35px;
        left: 50%;
        width: min(250px, 85%);
        grid-template-columns: minmax(0, 1fr) auto 45px;
        margin: 0;
        padding: 3px 6px;
        font-size: 10px
    }

}

/* Celular: indicador lateral, debajo de los rivales y fuera del centro del mazo. */
@media(max-width:900px), (pointer:coarse) and (max-height:650px) {
    body.in-game #playTurnBanner {
        top: 180px;
        left: 30px;
        transform: none;
        width: 74px;
        grid-template-columns: auto 1fr;
        gap: 5px;
        padding: 4px 5px
    }

    body.in-game #playTurnLabel {
        display: none
    }

    body.in-game #playTurnSeconds {
        font-size: 12px
    }

}

@media(orientation:landscape) and (max-height:600px) and (pointer:coarse), (orientation:landscape) and (max-height:600px) and (max-width:900px) {
    body.in-game #playTurnBanner {
        top: 85px;
        left: 12px
    }

}
