/* Estilos Base Estructurales encapsulados de Academia Avanza */
#pm-stadium-box {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    max-width: 580px; 
    margin: 20px auto; 
    padding: 22px; 
    background: #1a1a1a; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    color: #ffffff;
    box-sizing: border-box;
}

#pm-teams-grid {
    min-width: 100%;
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 12px; 
    padding: 10px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

.pm-team-column {
    text-align: center; 
    width: 35%;
}

.pm-flag {
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-radius: 4px;
    display: block;
    margin: 0 auto 5px auto;
}

/* Manejo estético de Inputs Numéricos e Incrementadores */
.pm-counter-inputs {
    display: table;
    margin: 0 auto;
    text-align: center;
    width: 35%;
}



.pm-counter-inputs input[type="number"] {
    display: inline-block;
    vertical-align: middle;
    width: 52px; 
    height: 50px; 
    text-align: center; 
    font-size: 24px; 
    font-weight: bold; 
    background: #222; 
    border: 2px solid #444; 
    color: #fff; 
    border-radius: 8px; 
    outline: none;
    margin: 0 4px;
}
.pm-counter-inputs input::-webkit-outer-spin-button,
.pm-counter-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pm-manual-controls {
    display: block;
    text-align: center;
    margin-top: 8px;
    clear: both;
}

.pm-control-group {
    display: inline-block;
    vertical-align: top;
    width: 45px;
    margin: 0 4px;
}
.pm-arrow-btn {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    font-size: 10px;
    padding: 3px 0;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    width: 100%;
    margin-bottom: 2px;
    display: block;
    box-sizing: border-box;
    transition: all 0.2s;
}
.pm-arrow-btn:hover {
    background: #e5b123;
    color: #111;
    border-color: #e5b123;
}

/* Monitor de disponibilidad en tiempo real */
#pm-live-monitor {
    background: rgba(229, 177, 35, 0.06); 
    border: 1px dashed rgba(229, 177, 35, 0.3); 
    border-radius: 8px; 
    padding: 12px; 
    margin-bottom: 25px; 
    text-align: center; 
    font-size: 13px;
}

#pm-status-badge {
    font-weight: bold;
}
.badge-online { color: #52c41a; }
.badge-offline { color: #ff4d4d; }

/* Botones de disparo de acción */
#pm-trigger-modal-btn {
    width: 100%; 
    padding: 14px; 
    background: linear-gradient(135deg, #e5b123 0%, #c9921a 100%); 
    border: none; 
    border-radius: 8px; 
    color: #111; 
    font-size: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    box-shadow: 0 4px 12px rgba(229,177,35,0.2); 
    transition: transform 0.2s, opacity 0.2s;
}
#pm-trigger-modal-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* SISTEMA POPUP INTERACTIVO Y CSS SEGURO */
#pm-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

#pm-modal-box {
    background: #1e1e1e;
    border: 2px solid #e5b123;
    border-radius: 12px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    font-family: sans-serif;
    color: #fff;
}

.pm-form-group {
    margin-bottom: 15px;
}
.pm-form-group label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: bold;
}
.pm-form-group input {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.pm-form-group input:focus {
    border-color: #e5b123;
}

#pm-modal-error-log {
    color: #ff4d4d;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.pm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.pm-modal-actions button {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
}
#pm-btn-close-modal { background: #444; color: #fff; }
#pm-btn-submit-final { background: #e5b123; color: #111; }
#pm-btn-submit-final:disabled { background: #666; color: #aaa; cursor: not-allowed; }


@media screen and (max-width: 480px) {
   
  #pm-stadium-box {
        min-width: 100%;    
        margin: 0px;
        padding: 8px;
        border-radius: 12px;
    }
    
  #pm-teams-grid {
    min-width: 100%;
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 12px; 
    padding: 6px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

    .pm-team-column {
        width: 22%;
    }

    .pm-team-column div {
        font-size: 11px !important; /* Optimiza el tamaño del texto de los países */
    }

    .pm-flag {
        max-width: 40px !important;
        
    }

    .pm-counter-inputs {
        width: 100%;
    }

    .pm-counter-inputs input[type="number"] {
        width: 42px;
        height: 34px;
        font-size: 16px;
    }

    .pm-manual-controls {
        gap: 10px; /* Estrecha las flechas en móviles */
        margin-top: 6px;
    }

    .pm-control-group {
        width: 35px;
    }

    .pm-arrow-btn {
        font-size: 8px;
        padding: 2px 0;
    }
    
    #pm-stadium-box h2 {
        font-size: 16px !important;
    }
    
    #pm-stadium-box p {
        font-size: 14px !important;
    }
    .p-text {
    font-size: 26px;
    color: #ffffff;
    font-weight: 600;
    }
}