/* Formation Pitch Component Styles */

.pitch-container {
    position: relative;
    width: 80%;
    max-width: 480px;
    margin: 0 auto;
    padding-top: 108%; /* 20% reduction from standard vertical pitch */
    border-radius: 8px;
    overflow: hidden;
}

.pitch-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 0;
}

.pitch-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 16px;
    z-index: 1;
}

.pitch-player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
    transform: translate(-50%, -50%);
}

.pitch-player:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.player-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--text-primary, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary, #000);
    position: relative;
}

/* Home team color - matches cyan from stats bars */
.player-dot.team-home {
    background: linear-gradient(135deg, #1FF8FA, #026BDA);
    border-color: #026BDA;
    color: white;
}

/* Away team color - matches orange from stats bars */
.player-dot.team-away {
    background: linear-gradient(135deg, #FBB630, #E86E25);
    border-color: #E86E25;
    color: white;
}

.player-dot.has-event::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success, #10b981);
    border: 1px solid white;
}

.player-label {
    font-size: 9px;
    font-weight: 700;
    color: #000;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1px 2px;
    border-radius: 3px;
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .player-label {
        display: none;
    }

    .player-dot {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .pitch-container {
        max-width: 100%;
    }
}
