/* Estilos de la tarjeta de jugador de Bateo (BateoPlayerCard.razor).
   Movidos aqui desde el <style> de BateoPlayerDialog para no duplicarlos al renderizar
   muchas tarjetas (album de Facebook). Las variables --team-* las pone el componente
   en el div raiz segun el tema del equipo. */

/* === Body de la tarjeta: contenedor relativo para soportar watermark === */
.pl-dialog-body { position: relative; }

/* === Variante con watermark (Rojos): solo header rojo + marca de agua === */
.pl-with-watermark { /* Sin background — fondo blanco default */ }
.pl-with-watermark .pl-data-wrap { position: relative; }
.pl-with-watermark .pl-data-wrap > *:not(.pl-watermark-full) {
    position: relative;
    z-index: 1;
}
.pl-watermark-full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.13;
    pointer-events: none;
    z-index: 0;
    filter: saturate(1.1);
    /* Logo.jpg tiene fondo blanco; multiply lo elimina sobre el fondo blanco del card. */
    mix-blend-mode: multiply;
}

.pl-with-watermark .pl-head-themed .pl-logo-bg { display: none !important; }
.pl-with-watermark .pl-equipo-logo {
    background: transparent;
    mix-blend-mode: multiply;
}

/* === Stat cards translucidas para que la marca de agua se note debajo (solo Rojos) === */
.pl-with-watermark .pm-stat {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.pl-with-watermark .pm-stat:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* === Header tematizado por equipo === */
.pm-section-title-top { margin: 0 0 0.4rem 0 !important; }

.pl-head-themed {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 14px;
    margin: 0 -8px 0 -8px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--team-dark, #1e293b) 0%, var(--team-light, #334155) 100%);
    color: #ffffff;
    overflow: hidden;
}
.pl-logo-bg {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    width: 70px; height: 70px;
    object-fit: contain;
    opacity: 0.22;
    filter: brightness(1.5);
    pointer-events: none;
    z-index: 0;
}
.pl-head-themed > * { position: relative; z-index: 1; }

.pl-foto-wrap { position: relative; flex-shrink: 0; }
.pl-foto-circle {
    width: 96px; height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--team-light, #475569), var(--team-dark, #1e293b));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--team-border, #0f172a);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.pl-foto {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.1);
}
.pl-foto-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.pl-info { display: flex; flex-direction: column; min-width: 0; }
.pl-nombre {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.pl-equipo {
    color: rgba(255,255,255,0.92);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 6px;
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}
.pl-equipo-num {
    display: inline-block;
    background: #ffffff;
    color: #d32f2f;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.pl-equipo-logo {
    width: 22px; height: 22px;
    object-fit: contain;
    background: rgba(255,255,255,0.92);
    border-radius: 4px;
    padding: 1px;
}

/* === Datos personales: chips compactos === */
.pl-chips {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-top: 7px;
}
.pl-chip {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 7px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    white-space: nowrap;
}
.pl-chip i { font-size: 0.8rem; opacity: 0.92; line-height: 1; }
.pl-chip-wide { white-space: normal; }
.pl-chip .hand-mirror { display: inline-block; transform: scaleX(-1); }

/* === Placeholders publicitarios === */
.pl-ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.pl-ad-card {
    padding: 0.35rem 0.4rem;
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    background: #fffbeb;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    gap: 1px;
}
.pl-ad-logo { max-height: 36px; max-width: 60%; opacity: 0.35; filter: grayscale(100%); }
.pl-ad-title { font-size: 0.7rem; font-weight: 800; color: #b91c1c; line-height: 1.2; }
.pl-ad-sub { font-size: 0.65rem; font-style: italic; color: #78350f; }
.pl-ad-whats {
    font-size: 0.7rem; font-weight: 800; color: #15803d; margin-top: 2px;
    display: flex; flex-direction: column; align-items: center; line-height: 1.25;
}
.pl-ad-num { white-space: nowrap; }
@media (min-width: 768px) {
    .pl-ad-title { font-size: 0.82rem; }
    .pl-ad-sub { font-size: 0.78rem; }
    .pl-ad-whats { font-size: 0.85rem; }
    .pl-ad-logo { max-height: 48px; }
}

/* === Estilos del grid de stats (.pm-*) === */
.pm-section-title {
    margin: 0 0 0.6rem 0;
    padding-left: 0.6rem;
    border-left: 3px solid var(--team-light, #1e293b);
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex; align-items: center; gap: 0.45rem;
}
.pm-section-title i { color: var(--team-light, #475569); font-size: 1rem; }

.pm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.22rem;
}
.pm-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 0.5rem 0.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.pm-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}
.pm-stat-val {
    font-size: 1.3rem; font-weight: 800;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}
.pm-stat-lbl {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 0.1rem;
    line-height: 1;
}
.pm-stats-grid > .pm-stat:nth-last-child(-n+4) .pm-stat-val {
    font-size: 1.1rem;
}
@media (min-width: 600px) {
    .pm-stats-grid { gap: 0.3rem; }
    .pm-stat { padding: 0.55rem 0.45rem; }
    .pm-stat-val { font-size: 1.4rem; }
    .pm-stats-grid > .pm-stat:nth-last-child(-n+4) .pm-stat-val { font-size: 1.2rem; }
    .pm-stat-lbl { font-size: 0.85rem; letter-spacing: 0.5px; }
}
@media (min-width: 960px) {
    .pm-stats-grid { grid-template-columns: repeat(6, 1fr); gap: 0.4rem; }
    .pm-stat { padding: 0.6rem 0.5rem; }
    .pm-stat-val { font-size: 1.5rem; }
    .pm-stats-grid > .pm-stat:nth-last-child(-n+4) .pm-stat-val { font-size: 1.3rem; }
}
@media (min-width: 1280px) {
    .pm-stats-grid { gap: 0.5rem; }
    .pm-stat-val { font-size: 1.6rem; }
    .pm-stats-grid > .pm-stat:nth-last-child(-n+4) .pm-stat-val { font-size: 1.4rem; }
    .pm-stat-lbl { font-size: 0.88rem; }
}
