/* Estilos para el modal de reconexión personalizado */
.reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.reconnect-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.reconnect-icon {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.reconnect-message h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.reconnect-message p {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 16px;
}

.reconnect-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
}

.reconnect-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    animation: progress 2s infinite;
    border-radius: 3px;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Estilos para móviles */
@media (max-width: 768px) {
    .reconnect-content {
        padding: 25px 20px;
        margin: 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .reconnect-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .reconnect-message h4 {
        font-size: 20px;
    }
    
    .reconnect-message p {
        font-size: 14px;
    }
    
    .reconnect-progress {
        height: 8px;
    }
}

/* Estilos para el modal de reconexión por defecto de Blazor (ocultarlo) */
#components-reconnect-modal {
    display: none !important;
}

/* Mostrar nuestro modal personalizado cuando Blazor esté reconectando */
.blazor-reconnect-modal {
    display: flex !important;
}

/* Estilos para el indicador de estado de conexión */
.connection-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.connection-status.disconnected {
    transform: translateY(0);
}

.connection-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.connection-message i {
    font-size: 16px;
    animation: pulse 1.5s infinite;
}

.connection-progress {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 10px;
}

.connection-progress .progress-bar {
    height: 100%;
    background: #28a745;
    width: 0%;
    animation: progress 2s infinite;
}

/* Mejoras para móviles en el indicador de conexión */
@media (max-width: 768px) {
    .connection-status {
        padding: 15px;
        font-size: 16px;
    }
    
    .connection-message {
        flex-direction: column;
        gap: 8px;
    }
    
    .connection-progress {
        width: 150px;
        height: 6px;
    }
}
