/* ClutchMX — escudos de equipo (PNG/WebP transparentes). Sin cajas blancas en logos reales. */

.clutch-team-logo {
    --clutch-team-logo-size: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--clutch-team-logo-size);
    height: var(--clutch-team-logo-size);
    flex-shrink: 0;
    vertical-align: middle;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible;
    line-height: 1;
}

.clutch-team-logo__img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.clutch-team-logo__img.is-loaded {
    opacity: 1;
}

.clutch-team-logo--glow .clutch-team-logo__img {
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}

.clutch-team-logo--placeholder {
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92)) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.clutch-team-logo__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 800;
    font-size: calc(var(--clutch-team-logo-size) * 0.36);
    letter-spacing: 0.04em;
    color: #e2e8f0;
    user-select: none;
}

/* Tamaños (refuerzo por si el contenedor padre limita) */
.clutch-team-logo--sm { --clutch-team-logo-size: 28px; }
.hlt-logo-slot { --clutch-team-logo-size: 20px; }
.clutch-team-logo--bracket { --clutch-team-logo-size: 32px; }
.clutch-team-logo--table { --clutch-team-logo-size: 34px; }
.clutch-team-logo--card { --clutch-team-logo-size: 48px; }
.clutch-team-logo--profile { --clutch-team-logo-size: 72px; }
.clutch-team-logo--hero { --clutch-team-logo-size: 88px; }
.clutch-team-logo--lg { --clutch-team-logo-size: 100px; }

/* Legacy wrappers: quitar cajas blancas cuando contienen el componente nuevo */
.clutch-team-logo-wrap:has(.clutch-team-logo),
.team-hero-logo-wrap:has(.clutch-team-logo),
.pv-logo-wrap:has(.clutch-team-logo),
.rnk-team-logo-wrap:has(.clutch-team-logo) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.clutch-team-logo-wrap .clutch-team-logo,
.team-hero-logo-wrap .clutch-team-logo,
.pv-logo-wrap .clutch-team-logo,
.rnk-team-logo-wrap .clutch-team-logo {
    width: 100%;
    height: 100%;
}

/* Admin: previsualización sobre fondo oscuro (detectar fondos falsos) */
.clutch-team-logo-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    /* Cuadrícula de referencia: si el logo trae su propia cuadrícula o fondo blanco, se nota al instante */
    background-color: #0c1222;
    background-image:
        linear-gradient(160deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 27, 75, 0.78) 100%),
        repeating-conic-gradient(rgba(255, 255, 255, 0.07) 0% 25%, transparent 0% 50%);
    background-size: auto, 14px 14px;
    background-position: center;
}

.laq-logo-warn {
    margin: 0.35rem 0 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.35);
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.clutch-team-logo-preview-stage .clutch-team-logo--hero,
.clutch-team-logo-preview-stage .clutch-team-logo--lg {
    --clutch-team-logo-size: 96px;
}

.clutch-team-logo-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #94a3b8;
}
