/* Custom Blazor Reconnection UI Styles */

.custom-reconnect-ui {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #27aae1 0%, #1e8ab8 100%);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reconnect-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.reconnect-spinner {
    flex-shrink: 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reconnect-text {
    flex: 1;
    text-align: left;
}

.reconnect-message {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reconnect-message i {
    font-size: 20px;
}

.reconnect-details {
    font-size: 13px;
    opacity: 0.9;
}

.reconnect-reload-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.reconnect-reload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

.reconnect-reload-btn:active {
    transform: scale(0.98);
}

.reconnect-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    border-radius: 3px;
    overflow: hidden;
}

.reconnect-progress {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 3px;
}

/* Failed state */
.custom-reconnect-ui.reconnect-failed {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.custom-reconnect-ui.reconnect-failed .spinner {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .custom-reconnect-ui {
        padding: 12px 16px;
    }
    
    .reconnect-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .reconnect-text {
        text-align: center;
    }
    
    .reconnect-message {
        font-size: 15px;
        justify-content: center;
    }
    
    .reconnect-details {
        font-size: 12px;
    }
    
    .reconnect-reload-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .spinner {
        width: 28px;
        height: 28px;
    }
}

/* Hide default Blazor reconnection UI */
#components-reconnect-modal {
    display: none !important;
}
