/**
 * PARLEY 360 - SHORTCODES CSS
 * Versión: 2.0.0
 * Shortcodes: Tabla, Power Ranking, Resultados
 */

/* ==========================================================================
   UTILIDADES GENERALES
   ========================================================================== */

.p360-no-data {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

/* Heredamos .p360-results-container y .p360-main-title del CSS anterior */

.p360-table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fff;
}

.p360-modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.p360-modern-table thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid #e1e4e8;
}

.p360-modern-table th {
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    letter-spacing: 0.5px;
}

.p360-modern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.p360-modern-table tr:last-child td {
    border-bottom: none;
}

.p360-modern-table tr:hover {
    background-color: #fcfcfc;
}

/* Detalles de Columnas */
.txt-center { text-align: center; }
.txt-right { text-align: right; }
.font-bold { font-weight: 700; }

.p360-col-pos {
    color: #182033;
    font-weight: 600;
}

.p360-col-pct {
    background: #fdfdfd;
    font-weight: 700;
    color: #000;
}



/* Info Equipo */
.p360-team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.p360-team-logo-mini {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.p360-team-link {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: color 0.2s;
}

.p360-team-link:hover {
    color: #275F02;
}

/* Ajustes Móvil */
@media (max-width: 600px) {
    .p360-modern-table th, 
    .p360-modern-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* DIFERENCIA POSITIVA: Verde Marca */
.p360-status-pos {
    color: #275F02 !important; /* Tu color de marca */
}

/* DIFERENCIA NEGATIVA: Rojo Alerta */
.p360-status-neg {
    color: #d20505 !important;
}

/* Opcional: Un fondo muy ligero para que resalte más la columna DIF */
.p360-modern-table td:last-child {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Mantener el PCT con un peso visual neutro pero fuerte */
.p360-col-pct {
    font-family: 'Roboto', 'Arial', sans-serif;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   2. POWER RANKING
   ========================================================================== */

.p360-power-ranking-wrapper {
    margin: 30px 0;
}

.p360-power-ranking-titulo {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.p360-power-ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card */
.p360-power-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.p360-power-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Bordes especiales para top 3 */
.p360-power-card--pos-1 {
    border-left: 4px solid #fbbf24;
}

.p360-power-card--pos-2 {
    border-left: 4px solid #94a3b8;
}

.p360-power-card--pos-3 {
    border-left: 4px solid #b45309;
}

/* Header */
.p360-power-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.p360-power-card__posicion {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.p360-power-card__tendencia {
    font-size: 1.25rem;
}

.p360-power-card__tendencia--up {
    color: #10b981;
}

.p360-power-card__tendencia--down {
    color: #ef4444;
}

.p360-power-card__tendencia--stable {
    color: #94a3b8;
}

/* Equipo */
.p360-power-card__equipo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.p360-power-card__logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 4px;
}

.p360-power-card__nombre {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.p360-power-card__nombre:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* Rating */
.p360-power-card__rating {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.p360-power-card__valor {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2271b1;
    line-height: 1.2;
}

.p360-power-card__label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stats */
.p360-power-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}

.p360-power-card__stat {
    padding: 8px 4px;
    background: #ffffff;
    border-radius: 6px;
}

.p360-power-card__stat-valor {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.p360-power-card__stat-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 640px) {
    .p360-power-ranking-grid {
        grid-template-columns: 1fr;
    }
}


/* Contenedor Principal resultados */
.p360-results-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 1.2rem;
}

.p360-main-title {
    font-size: 22px;
    color: #1a1a1a;
    border-left: 4px solid #275F02; /* Color de marca */
    padding-left: 15px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Etiquetas de Fecha */
.p360-date-label {
    background: #f1f1f1;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    margin: 20px 0 15px 0;
    border-radius: 4px;
}

/* Grid de Juegos */
.p360-grid-juegos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Tarjeta de Juego (ESPN Style) */
.p360-card-juego {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.p360-card-juego:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Filas de Equipos */
.p360-row-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    color: #444;
}

.p360-team-name {
    font-size: 15px;
    font-weight: 500;
}

.p360-team-score {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
}

/* Ganador resaltado */
.is-winner .p360-team-name {
    color: #000;
    font-weight: 700;
}
.is-winner .p360-team-score {
    color: #275F02; /* Color de marca */
}

/* Footer y Badges */
.p360-card-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p360-veredicto-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
}

.v-win { background-color: #275F02; } /* Verde Marca */
.v-loss { background-color: #d20505; } /* Rojo Fallo */
.v-push { background-color: #182033; }

.p360-no-pick {
    font-size: 11px;
    color: #182033;
    text-transform: uppercase;
}

/* Responsive Móvil */
@media (max-width: 480px) {
    .p360-grid-juegos {
        grid-template-columns: 1fr;
    }
    .p360-team-name { font-size: 14px; }
    .p360-team-score { font-size: 16px; }
}

/* GRID CONFIGURATION: 4 en Desktop */
.p360-power-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fuerza 4 columnas */
    gap: 15px;
    margin-top: 10px;
}

/* ESTILO DE TARJETA SOBRIO (No bordes de colores) */
.p360-power-card-v2 {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    padding: 15px;
    border-radius: 4px; /* Menos redondeado para ser más serio */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.p360-card-top-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #888;
}

.p360-rank-num {
    color: #1a1a1a;
    font-size: 16px;
}

.p360-trend-icon.icon-up { color: #275F02; }
.p360-trend-icon.icon-down { color: #d20505; }

.p360-card-main-content {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.p360-card-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.p360-card-team-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.2;
}

.p360-card-pct {
    font-size: 11px;
    color: #666;
}

/* RATING INDEX DISPLAY */
.p360-card-rating-display {
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    margin-bottom: 10px;
    text-align: center;
}

.p360-rating-val {
    font-size: 22px;
    font-weight: 800;
    color: #333;
}

.p360-rating-tag {
    font-size: 9px;
    text-transform: uppercase;
    color: #182033;
    letter-spacing: 1px;
}

.p360-card-stats-row {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    color: #555;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .p360-power-grid-v2 {
        grid-template-columns: repeat(2, 1fr); /* 2 en tablets */
    }
}

@media (max-width: 600px) {
    .p360-power-grid-v2 {
        grid-template-columns: 1fr; /* 1 en móviles */
    }
}