/**
 * Estilos para el sistema de aleatorización pública
 * 
 * @since 1.3.0
 */

/* Contenedor principal del shortcode */
.eipsi-randomization-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Notice de instrucciones */
.randomization-notice {
    background: #e3f2fd !important;
    border-left: 4px solid #2196F3 !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.randomization-notice p {
    margin: 0 !important;
    color: #0d47a1 !important;
    font-weight: 500 !important;
    line-height: 1.5;
}

.randomization-notice p:last-child {
    margin: 0.5rem 0 0 0 !important;
    color: #1565c0 !important;
    font-size: 0.9rem !important;
    font-weight: normal !important;
}

/* Spinner de carga */
#randomization-loading {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#randomization-loading .eipsi-spin {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    animation: eipsi-spin 1s linear infinite;
}

@keyframes eipsi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#randomization-loading p {
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
}

/* Errores */
.randomization-error {
    background: #ffebee !important;
    border-left: 4px solid #f44336 !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.1);
}

.randomization-error p {
    margin: 0 !important;
    color: #c62828 !important;
    font-weight: 500 !important;
}

.randomization-error p:last-child {
    margin: 0.5rem 0 0 0 !important;
    color: #c62828 !important;
    font-size: 0.9rem !important;
    font-weight: normal !important;
}

/* Warning/Info */
.randomization-warning {
    background: #fff3e0 !important;
    border-left: 4px solid #ff9800 !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
}

.randomization-warning p {
    margin: 0 !important;
    color: #ef6c00 !important;
    font-weight: 500 !important;
}

/* Contenedor del formulario */
#randomized-form-container {
    min-height: 200px;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .eipsi-randomization-wrapper {
        margin: 0 10px;
    }
    
    .randomization-notice,
    .randomization-error,
    .randomization-warning {
        padding: 0.75rem !important;
        margin: 0.75rem 0 !important;
    }
    
    #randomization-loading {
        padding: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .randomization-notice {
        background: #1e3a5f !important;
        border-left-color: #64b5f6 !important;
    }
    
    .randomization-notice p {
        color: #bbdefb !important;
    }
    
    .randomization-notice p:last-child {
        color: #90caf9 !important;
    }
    
    #randomization-loading {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    #randomization-loading p {
        color: #a0aec0;
    }
    
    .randomization-error {
        background: #2d1b1b !important;
        border-left-color: #ef5350 !important;
    }
    
    .randomization-error p {
        color: #ef9a9a !important;
    }
    
    .randomization-warning {
        background: #2d1f0f !important;
        border-left-color: #ffa726 !important;
    }
    
    .randomization-warning p {
        color: #ffcc02 !important;
    }
}