/* ================================================================
   players.css — In-game player name boxes, positioning, states
   ================================================================ */

/* --- In-Game Player Avatars --- */
.ludo-players-board-overlay {
    position: absolute;
    top: 15px; 
    left: 15px;
    right: 15px;
    bottom: 15px;
    pointer-events: none; 
}

.ludo-player-box {
    position: absolute;
    width: auto;  
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    padding: 1px 7px 2px;
}

/* Positioning */
.ludo-player-box.pos-blue { top: 29%; right: 66%; } 
.ludo-player-box.pos-green { top: 29%; left: 65%; }
.ludo-player-box.pos-red { bottom: 29%; right: 66%; } 
.ludo-player-box.pos-yellow { bottom: 29%; left: 65%; }

@media (min-width: 768px) and (max-width: 1024px) {
    .ludo-player-name {font-size: 10px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
    .ludo-player-box.pos-blue { top: -15px; left: -122px; max-width: 100px } 
    .ludo-player-box.pos-green { top: -15px; right: -122px; left: initial; max-width: 100px; }
    .ludo-player-box.pos-red { bottom: -15px; left: -122px; max-width: 100px } 
    .ludo-player-box.pos-yellow { bottom: -15px; right: -122px; left: initial; max-width: 100px }
}

@media (max-width: 768px) {
    .ludo-player-box.pos-blue { top: -75px; right: 56%; left: initial; } 
    .ludo-player-box.pos-green { top: -75px; left: 59%; right: initial; }
    .ludo-player-box.pos-red { bottom: -75px; right: 56%; left: initial; } 
    .ludo-player-box.pos-yellow { bottom: -75px; left: 59%; right: initial; }
}

/* Statuses */
.ludo-player-box.active {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}
.ludo-player-box.disconnected {
    opacity: 0.2;
    text-decoration: line-through;
}
.ludo-player-box.afk { 
    filter: grayscale(100%); 
}

/* Avatar borders */
.ludo-player-box.border-red { border: 3px solid var(--ludo-red); }
.ludo-player-box.border-green { border: 3px solid var(--ludo-green); }
.ludo-player-box.border-yellow { border: 3px solid var(--ludo-yellow); }
.ludo-player-box.border-blue { border: 3px solid var(--ludo-blue); }

/* Združen izgled za avatarje (igralec in profil) */
.ludo-player-avatar, .ludo-profile-avatar {
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--ludo-shadow-avatar);
}

.ludo-player-avatar {
    width: 25px;
    height: 25px;
    margin-right: 5px;
}

.ludo-profile-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

@media (max-width: 768px), (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
    .ludo-profile-avatar {
        width: 30px;
        height: 30px;
    }
}

.ludo-player-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--ludo-text-dark);
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.1;
}

.ludo-profile-name {
    font-size: 18px;
    font-weight: 600;
    color: #ccc;
}

@media (max-width: 1024px) {
    .ludo-profile-name {
        font-size: 14px;
    }
}

@media (max-width: 768px), (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
    .ludo-profile-name {
        font-size: 14px;
    }
}