/**
 * Estilos para el modal de creación de pronósticos - VERSIÓN ANCHO MÁXIMO (1100px)
 */

/* --- 1. Estilos del Overlay y Modal Principal --- */
.clubpro-prediction-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    /* Aumentar padding para que el modal tenga más margen en pantallas muy grandes */
    padding: 30px; 
}

.clubpro-prediction-modal {
    background: linear-gradient(135deg, #1a2035 0%, #0a0f1a 100%);
    border-radius: 20px;
    width: 100%;
    /* 💥 CAMBIO CLAVE: ANCHO AUMENTADO a 1100px (o el que se asemeje a la imagen) */
    max-width: 1100px; 
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: clubproModalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

@keyframes clubproModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- 2. Header y Botón de Cierre --- */
.clubpro-prediction-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    flex-shrink: 0;
}

.clubpro-prediction-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
}

.clubpro-prediction-modal-header h3 i {
    color: var(--wp-cbl-primary, #0f8af5);
    margin-right: 10px;
}

.clubpro-prediction-modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clubpro-prediction-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* --- 3. Body y Contenido del Evento --- */
.clubpro-prediction-modal-body {
    padding: 30px;
    flex-grow: 1;
    overflow-y: visible;
}

/* Información del evento */
.clubpro-event-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.clubpro-event-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.clubpro-team-home,
.clubpro-team-away {
    font-weight: 700;
    color: white;
    font-size: 1.1em;
}

.clubpro-vs {
    color: var(--wp-cbl-primary, #0f8af5);
    font-weight: 600;
    font-size: 0.9em;
}

.clubpro-event-name {
    color: #94a3b8;
    font-size: 0.9em;
}

/* --- 4. Progreso de Pasos (Paginación) --- */
.clubpro-form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.clubpro-form-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.clubpro-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.clubpro-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.clubpro-progress-step.active .clubpro-step-number {
    background: var(--wp-cbl-primary, #0f8af5);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.clubpro-step-label {
    color: #94a3b8;
    font-size: 0.8em;
    font-weight: 500;
    text-align: center;
}

.clubpro-progress-step.active .clubpro-step-label {
    color: white;
}

/* --- 5. Formulario y Pasos --- */
.clubpro-form-step {
    display: none;
    animation: clubproStepFadeIn 0.4s ease;
    min-height: 250px;
}

@keyframes clubproStepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.clubpro-form-step.active {
    display: block;
}

.clubpro-form-group {
    margin-bottom: 25px;
}

.clubpro-form-group label {
    display: block;
    margin-bottom: 10px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95em;
}

.clubpro-form-group label i {
    color: var(--wp-cbl-primary, #0f8af5);
    margin-right: 8px;
    width: 16px;
}

/* Estilos de ancho y apariencia de Inputs y Textareas */
.clubpro-form-group input[type="text"],
.clubpro-form-group textarea,
.clubpro-custom-select {
    width: 100%;
    box-sizing: border-box; 
}

.clubpro-form-group input[type="text"],
.clubpro-form-group textarea {
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #1a2035;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Estados focus para todos los inputs */
.clubpro-form-group input[type="text"]:focus,
.clubpro-custom-select .clubpro-select-selected.active,
.clubpro-form-group textarea:focus {
    outline: none;
    border-color: var(--wp-cbl-primary, #0f8af5);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 138, 245, 0.2);
}

.clubpro-form-group input[type="text"]::placeholder,
.clubpro-form-group textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.clubpro-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.clubpro-file-input {
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.clubpro-form-group small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.8em;
}

/* Errores de campo */
.clubpro-field-error {
    color: var(--wp-cbl-danger, #ff3d57);
    font-size: 0.8em;
    margin-top: 5px;
    font-weight: 500;
}

.clubpro-form-group input.error,
.clubpro-custom-select.error .clubpro-select-selected,
.clubpro-form-group textarea.error {
    border-color: var(--wp-cbl-danger, #ff3d57);
}

/* --- 6. Resumen --- */
.clubpro-summary {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clubpro-summary h4 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

.clubpro-summary-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.clubpro-summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.clubpro-summary-item strong {
    color: white;
    font-weight: 600;
}

/* --- 7. Footer y Botones --- */
.clubpro-prediction-modal-footer {
    padding: 25px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.clubpro-btn-primary,
.clubpro-btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    min-width: 120px;
}

.clubpro-btn-primary {
    background: linear-gradient(135deg, var(--wp-cbl-primary, #0f8af5) 0%, #0a6dc9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(15, 138, 245, 0.3);
}

.clubpro-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d7ae0 0%, #095bb0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 138, 245, 0.4);
}

.clubpro-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clubpro-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.clubpro-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Control de orden de botones en el footer */
#clubpro-prediction-prev { order: 1; }
#clubpro-prediction-cancel { order: 2; }
#clubpro-prediction-next, #clubpro-prediction-submit { order: 3; }

/* --- 8. Alertas --- */
.clubpro-alert {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 18px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: clubproAlertSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid transparent;
}

@keyframes clubproAlertSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.clubpro-alert-success {
    background: linear-gradient(135deg, var(--wp-cbl-success, #00c853) 0%, #00a844 100%);
    border-left-color: #00e85a;
}

.clubpro-alert-error {
    background: linear-gradient(135deg, var(--wp-cbl-danger, #ff3d57) 0%, #e0354d 100%);
    border-left-color: #ff6b7f;
}

/* --- 9. Badges de Configuración de Usuario --- */
.clubpro-user-config-badge {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.clubpro-currency-badge,
.clubpro-odds-badge {
    background: rgba(15, 138, 245, 0.2);
    color: #0f8af5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7em;
    font-weight: 600;
    border: 1px solid rgba(15, 138, 245, 0.3);
}

.clubpro-currency-indicator,
.clubpro-odds-indicator {
    color: #94a3b8;
    font-size: 0.8em;
    font-weight: 400;
    margin-left: 5px;
}

/* --- 10. Responsive --- */
@media (max-width: 1200px) {
    /* Ajustar el ancho máximo para pantallas grandes si no se necesita el 1100px completo */
    .clubpro-prediction-modal {
        max-width: 900px; 
    }
}

@media (max-width: 768px) {
    /* En pantallas medianas, el modal vuelve a ser más pequeño */
    .clubpro-prediction-modal {
        max-width: 600px; 
        max-height: 95vh;
    }
    
    .clubpro-prediction-modal-overlay {
        padding: 10px;
    }
    
    .clubpro-prediction-modal-header,
    .clubpro-prediction-modal-body,
    .clubpro-prediction-modal-footer {
        padding: 20px;
    }
    
    .clubpro-prediction-modal-footer {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .clubpro-btn-primary,
    .clubpro-btn-secondary {
        min-width: calc(50% - 6px);
        padding: 12px 20px;
    }

    #clubpro-prediction-next, #clubpro-prediction-submit { 
        order: 3; 
        width: 100%;
        min-width: unset;
        margin-top: 10px;
    }
    
    .clubpro-event-teams {
        flex-direction: column;
        gap: 8px;
    }
    
    .clubpro-form-progress::before {
        left: 15%;
        right: 15%;
    }
}

@media (max-width: 480px) {
    .clubpro-prediction-modal-header h3 {
        font-size: 1.3em;
    }
    
    .clubpro-prediction-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Apilamiento de botones en móvil */
    .clubpro-btn-primary,
    .clubpro-btn-secondary,
    #clubpro-prediction-next, 
    #clubpro-prediction-submit,
    #clubpro-prediction-prev, 
    #clubpro-prediction-cancel {
        min-width: 100% !important;
        width: 100% !important;
        margin: 5px 0 !important;
        order: unset !important; 
    }
    
    #clubpro-prediction-cancel { order: 1; }
    #clubpro-prediction-prev { order: 2; }
    #clubpro-prediction-next, #clubpro-prediction-submit { order: 3; }
}

/* --- 11. SELECTS PERSONALIZADOS (Estructura de DIVs) --- */

.clubpro-custom-select {
    position: relative;
    width: 100%;
}

.clubpro-select-selected {
    padding: 15px 18px;
    background: #2d3748;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-sizing: border-box; 
}

.clubpro-select-selected:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.clubpro-select-selected.active {
    border-color: #0f8af5;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 0 2px rgba(15, 138, 245, 0.2);
    transform: translateY(-2px);
}

.clubpro-select-text {
    flex: 1;
}

.clubpro-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #0f8af5;
    border-radius: 10px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.clubpro-select-options.active {
    display: block;
}

.clubpro-select-option {
    padding: 12px 15px;
    color: #000000;
    background: #ffffff;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.clubpro-select-option:hover {
    background: #0f8af5;
    color: #ffffff;
}

.clubpro-select-option:last-child {
    border-bottom: none;
}

.clubpro-select-option.selected {
    background: #0f8af5;
    color: #ffffff;
    font-weight: 600;
}

/* Flecha animada */
.clubpro-select-selected i {
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.clubpro-select-selected.active i {
    transform: rotate(180deg);
}