/* Estilos para el plugin de concurso IMCUFIDE */
#concurso-imcufide-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.concurso-header {
    text-align: center;
    margin-bottom: 30px;
}

.concurso-header h2 {
    color: #d35400;
    border-bottom: 2px solid #e67e22;
    padding-bottom: 10px;
}

.ruta-seleccion {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
    font-weight: bold;
    color: #495057;
}

.instancia {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.instancia.activa {
    display: block;
}

.instancia h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
}

.botones-contenedor {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-concurso, .btn-categoria {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.btn-concurso:hover, .btn-categoria:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.btn-atras {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-atras:hover {
    background: #7f8c8d;
}

.btn-guardar {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-guardar:hover {
    background: #219a52;
}

.botones-formulario {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.grupo-formulario {
    margin-bottom: 20px;
}

.grupo-formulario label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.grupo-formulario input[type="text"],
.grupo-formulario textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.grupo-formulario input[type="text"]:focus,
.grupo-formulario textarea:focus {
    outline: none;
    border-color: #e67e22;
}

.grupo-formulario textarea {
    min-height: 120px;
    resize: vertical;
}

.indicacion {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

.mensaje-exito {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    line-height: 1.6;
}

.mensaje-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .botones-contenedor {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-concurso, .btn-categoria {
        min-width: 250px;
    }
    
    .botones-formulario {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-atras, .btn-guardar {
        width: 100%;
    }
}

.grupo-formulario h4 {
    color: #e67e22;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 8px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.grupo-formulario h4:first-child {
    margin-top: 0;
}

/* Estilos para el mensaje de éxito */
.mensaje-exito {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    color: #155724;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    line-height: 1.8;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.mensaje-exito::before {
    content: "✓";
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 120px;
    color: rgba(40, 167, 69, 0.1);
    font-weight: bold;
}

.mensaje-exito h3 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #28a745;
    padding-bottom: 10px;
    display: inline-block;
}

.mensaje-exito .numero-registro {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
    margin: 15px 0;
    display: inline-block;
}

.mensaje-exito .detalles-registro {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
    text-align: left;
}

.mensaje-exito .agradecimiento {
    font-style: italic;
    color: #0f5132;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.mensaje-exito .firma {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #28a745;
    font-weight: bold;
    color: #0f5132;
}

/* Botón Regresar */
.btn-regresar {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-regresar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #2471a3);
}

/* Animación de entrada para el mensaje de éxito */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-exito {
    animation: fadeInUp 0.6s ease-out;
}

/* Icono de éxito */
.icono-exito {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

/* Estilos para validación */
.error-validacion {
    border-color: #e74c3c !important;
    background-color: #fdf2f2;
}

.input-valido {
    border-color: #27ae60 !important;
    background-color: #f2fdf2;
}

/* Estilos para el botón de buena suerte */
.buena-suerte {
    color: #d35400;
    font-size: 18px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 8px;
    border: 1px solid #e67e22;
}

/* Mejoras para las validaciones */
.error-validacion {
    border-color: #e74c3c !important;
    background-color: #fdf2f2;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.mensaje-error-validacion {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.btn-guardar:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Estilo para campos válidos */
.input-valido {
    border-color: #27ae60 !important;
    background-color: #f2fdf2;
}

.contador-participantes {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid #dee2e6;
}

.contador-participantes.contador-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.contador-participantes.contador-ok {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}