/* =========================================================
 * Pastor Prováveis — Campinho Interativo v1.0.0
 * ======================================================= */

/* ── Wrapper geral ────────────────────────────────────── */
.pp-campinho-wrap {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    max-width: 380px;
    background: #1a2035;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

/* Grid de múltiplos campinhos */
.pp-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}
.pp-grid--1col { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
.pp-grid--2col { grid-template-columns: repeat(2, 1fr); }
.pp-grid--3col { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 780px) {
    .pp-grid--2col,
    .pp-grid--3col { grid-template-columns: 1fr; }
}

/* ── Cabeçalho do time ────────────────────────────────── */
.pp-team-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #151c2e;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.pp-team-shield {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}

.pp-team-info {
    flex: 1;
    min-width: 0;
}
.pp-team-nome {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pp-formacao-badge {
    display: inline-block;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.7);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    margin-top: 2px;
    font-weight: 600;
}
.pp-atualizado {
    font-size: 10px;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Campo ────────────────────────────────────────────── */
.pp-campo {
    position: relative;
    width: 100%;
    aspect-ratio: 100 / 155;
    overflow: visible;
}

.pp-campo-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Jogador ──────────────────────────────────────────── */
.pp-jogador {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    z-index: 2;
    /* Sem pointer-events nos filhos para não interferir */
}

/* ── Foto do jogador ──────────────────────────────────── */
.pp-jogador__foto-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.pp-jogador__foto {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.85);
    display: block;
    background: #1a2d5a;
    transition: border-color .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.pp-jogador__foto--placeholder {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.6);
    background: #1a2d5a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.pp-jogador:hover .pp-jogador__foto,
.pp-jogador:hover .pp-jogador__foto--placeholder {
    border-color: #f39c12;
    transform: scale(1.1);
}

/* Jogadores com status especial */
.pp-jogador--lesionado .pp-jogador__foto,
.pp-jogador--lesionado .pp-jogador__foto--placeholder {
    border-color: #e74c3c;
    opacity: .75;
}
.pp-jogador--suspenso .pp-jogador__foto,
.pp-jogador--suspenso .pp-jogador__foto--placeholder {
    border-color: #e67e22;
    opacity: .75;
}
.pp-jogador--duvida .pp-jogador__foto,
.pp-jogador--duvida .pp-jogador__foto--placeholder {
    border-color: #f1c40f;
}

/* ── Ícones de scout sobre a foto ─────────────────────── */
.pp-scout-icons {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1px;
    white-space: nowrap;
    pointer-events: none;
}
.pp-icon {
    font-size: 11px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.8));
}

/* ── Badge de status ──────────────────────────────────── */
.pp-status-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 12px;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

/* ── Pontuação ────────────────────────────────────────── */
.pp-pontos-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #f39c12;
    color: #1a0000;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 8px;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Nome do jogador ──────────────────────────────────── */
.pp-jogador__nome {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.7);
    white-space: nowrap;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1;
    pointer-events: none;
    background: rgba(0,0,0,.45);
    padding: 2px 5px;
    border-radius: 6px;
}

/* ── TOOLTIP ──────────────────────────────────────────── */
.pp-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 170px;
    background: #1a2035;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 100;
    color: #fff;
}

.pp-jogador:hover .pp-tooltip,
.pp-jogador.is-active .pp-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ajuste para jogadores nas bordas */
.pp-jogador[style*="left:8"],
.pp-jogador[style*="left:9"],
.pp-jogador[style*="left:10"] {
    --tooltip-align: left;
}

.pp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(255,255,255,.15);
}

.pp-tooltip__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.pp-tooltip__pos {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.7);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    letter-spacing: .05em;
}
.pp-tooltip__nome {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex: 1;
}
.pp-tooltip__pontos {
    background: #f39c12;
    color: #1a0000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}

.pp-tooltip__scouts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pp-tooltip__scout-item {
    background: rgba(255,255,255,.08);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    color: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pp-tooltip__scout-item em {
    font-style: normal;
    font-weight: 700;
    font-size: 10px;
    color: rgba(255,255,255,.5);
}
.pp-tooltip__scout-item--g  { background: rgba(46,213,115,.18); color: #2ed573; }
.pp-tooltip__scout-item--a  { background: rgba(29,209,161,.18); color: #1dd1a1; }
.pp-tooltip__scout-item--ca { background: rgba(255,193,7,.18);  color: #ffc107; }
.pp-tooltip__scout-item--cv { background: rgba(231,76,60,.18);  color: #e74c3c; }
.pp-tooltip__scout-item--sg { background: rgba(72,126,239,.18); color: #487eef; }
.pp-tooltip__no-scout {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    font-style: italic;
}

/* ── Campinho na seção admin preview ──────────────────── */
.pp-empty {
    color: #999;
    font-style: italic;
    padding: 12px;
    text-align: center;
}

/* ── Responsividade dos campinhos ─────────────────────── */
@media (max-width: 600px) {
    .pp-campinho-wrap {
        max-width: 100%;
    }
    .pp-jogador__foto,
    .pp-jogador__foto--placeholder {
        width: 38px;
        height: 38px;
    }
    .pp-jogador__foto-wrap {
        width: 38px;
        height: 38px;
    }
    .pp-jogador__nome {
        font-size: 9px;
        max-width: 58px;
    }
}

/* ── Seção header de prováveis ────────────────────────── */
.pp-section-header {
    text-align: center;
    margin-bottom: 20px;
}
.pp-section-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a2d5a;
    margin: 0;
}
