/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.player-profile-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ============================================================
   TARJETA BLANCA
   ============================================================ */
.player-profile-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 35px 25px;
    color: #222222;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    font-family: 'Proza Libre', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   HEADER: FOTO + NOMBRE + EQUIPO
   ============================================================ */
.player-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px; /* Reducido para más compacto */
}

.player-avatar {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #00cec9;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(0,206,201,0.2);
}
.player-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.player-avatar-placeholder {
    font-size: 48px;
    font-weight: 700;
    color: #e5e523;
    text-transform: uppercase;
}

.player-title {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
}
.player-name {
    display: inline;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0;
    letter-spacing: -0.5px;
}
.player-shirt-number {
    display: inline-block;
    background: #e5e523;
    color: #0a0a0a;
    font-size: 1rem;
    font-weight: 800;
    padding: 2px 12px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 0;
}
.player-team {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
}
.team-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #d500b3;
    text-transform: uppercase;
}
.team-link {
    color: #00cec9 !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1.1rem;
}
.team-link:hover {
    text-decoration: underline !important;
    color: #00b3a9 !important;
}
.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0a0a0a;
}

/* ============================================================
   ESCUDO DEL EQUIPO - SIN BORDES NI FONDOS
   ============================================================ */
.team-badge-wrapper {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 0;
}
.team-badge-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none !important;
    box-shadow: none !important;
}

/* ============================================================
   DETALLES EN DOS COLUMNAS - UNA LÍNEA Y COMPACTO
   ============================================================ */
.player-details-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 30px; /* Reducido gap vertical */
    text-align: left;
    margin-top: 12px;
}
.player-details-col-left,
.player-details-col-right {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Espacio mínimo entre filas */
}

.detail-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
}

.detail-label {
    flex: 0 0 auto !important;
    font-weight: 700 !important;
    color: #d500b3 !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
}

.detail-value {
    flex: 1 !important;
    font-weight: 400 !important;
    color: #222 !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
}

.detail-value a.po-instagram-link {
    color: #e5e523;
    text-decoration: none;
    transition: color 0.2s;
}
.detail-value a.po-instagram-link:hover {
    color: #00cec9;
    text-decoration: underline;
}

/* Bandera en los detalles */
.player-flag {
    display: inline-block;
    width: 20px !important;
    height: 15px !important;
    object-fit: contain;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Nacionalidad: múltiples países separados por coma */
.nacionalidad-item {
    display: inline-block;
    white-space: nowrap;
}
.nacionalidad-item img.player-flag {
    vertical-align: middle;
    margin-right: 4px;
}

/* ============================================================
   EDITAR
   ============================================================ */
.edit-link {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.edit-link a {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(229,229,35,0.15);
    color: #e5e523;
    border: 1px solid rgba(229,229,35,0.3);
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: 0.2s;
}
.edit-link a:hover {
    background: #e5e523;
    color: #0a0a0a;
}

/* ============================================================
   SELECTOR DE JUGADORES (si se usa)
   ============================================================ */
.player-selector-wrapper {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}
.player-selector-wrapper select {
    padding: 6px 32px 6px 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #0a0a0a !important;
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: all 0.2s !important;
    min-width: 180px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%230a0a0a" stroke-width="1.5" fill="none"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
}
.player-selector-wrapper select:hover {
    background-color: #eef0f3 !important;
    border-color: #bbb !important;
}
.player-selector-wrapper select:focus {
    outline: none !important;
    border-color: #e5e523 !important;
    box-shadow: 0 0 0 3px rgba(229, 229, 35, 0.2) !important;
}
.player-selector-wrapper select option {
    padding: 6px !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .player-profile-card {
        padding: 20px;
    }
    .player-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    .player-avatar {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }
    .player-name {
        font-size: 1.6rem;
        text-align: center;
    }
    .player-team {
        justify-content: center;
    }
    .player-title {
        justify-content: center;
    }
    .player-details-two-columns {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .player-details-col-left,
    .player-details-col-right {
        gap: 4px;
    }
    .detail-label {
        font-size: 0.6rem !important;
        min-width: 110px !important;
    }
    .detail-value {
        font-size: 0.85rem !important;
    }
    .player-selector-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        margin-top: 12px !important;
    }
    .player-selector-wrapper select {
        width: 100% !important;
        min-width: unset !important;
    }
}

@media (max-width: 480px) {
    .player-avatar {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    .player-name {
        font-size: 1.3rem;
    }
    .player-shirt-number {
        font-size: 0.8rem;
        padding: 1px 10px;
    }
    .player-profile-card {
        padding: 16px;
    }
}

/* Contenedor de las dos columnas */
.player-details-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px; /* reducimos el espacio vertical y horizontal */
    text-align: left;
    width: 100%;
}

/* Cada columna */
.player-details-col-left,
.player-details-col-right {
    display: flex;
    flex-direction: column;
    gap: 4px; /* espacio mínimo entre filas */
    width: 100%;
}

/* Cada ítem (fila) */
.detail-item {
    display: flex !important;
    flex-direction: row !important; /* en línea */
    align-items: baseline !important;
    gap: 4px !important; /* espacio justo entre label y value */
    flex-wrap: nowrap !important; /* que no se rompa a otra línea */
    padding: 2px 0;
    width: 100%;
}

/* Etiqueta */
.detail-label {
    flex: 0 0 auto !important;
    min-width: 100px !important; /* ancho fijo para alinear verticalmente */
    max-width: 140px !important;
    font-weight: 700 !important;
    color: #d500b3 !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

/* Valor */
.detail-value {
    flex: 1 !important;
    font-weight: 400 !important;
    color: #222 !important;
    font-size: 0.95rem !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* En móvil, si no cabe, permitimos wrap */
@media (max-width: 768px) {
    .detail-item {
        flex-wrap: wrap !important;
        gap: 2px !important;
    }
    .detail-label {
        min-width: 80px !important;
        font-size: 0.6rem !important;
    }
    .detail-value {
        font-size: 0.85rem !important;
        white-space: normal !important;
    }
}

/* ============================================================
   PESTAÑAS DE LA PÁGINA DE JUGADOR (con contenedor blanco y verde)
   ============================================================ */

/* Contenedor blanco para las pestañas */
.single-sp_player .sp-tab-menu-wrapper {
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 16px 20px 12px 20px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    margin: 22px 0 18px 0 !important;
}

/* Lista de pestañas (flex) */
.single-sp_player .sp-tab-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Cada pestaña */
.single-sp_player .sp-tab-menu-item a {
    display: block !important;
    padding: 10px 18px !important;
    border-radius: 10px !important;
    background: #eef0f3 !important;
    color: #16161c !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

/* Hover: verde claro */
.single-sp_player .sp-tab-menu-item a:hover {
    background: rgba(0, 206, 201, 0.15) !important; /* verde muy suave */
    color: #0a0a0a !important;
}

/* Pestaña activa: verde sólido */
.single-sp_player .sp-tab-menu-item-active a {
    background: #00cec9 !important;
    color: #ffffff !important;
}

/* Ajuste responsive */
@media (max-width: 768px) {
    .single-sp_player .sp-tab-menu-wrapper {
        padding: 12px 14px !important;
        margin: 16px 0 12px 0 !important;
    }
    .single-sp_player .sp-tab-menu-item a {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
}