/* Custom styles for enterprise network monitor */

.form-checkbox {
    appearance: none;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    width: 1rem;
    height: 1rem;
    position: relative;
    cursor: pointer;
}

.form-checkbox:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.form-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Pulse animation for device status indicators */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-critical {
    animation: pulse 2s infinite;
}

/* Enterprise-style scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Monospace fonts for technical data */
.font-mono {
    font-family: 'Courier New', Courier, monospace;
}

/* Smooth transitions for interactive elements */
.transition-opacity {
    transition: opacity 0.2s ease-in-out;
}

/* Custom button hover effects */
button:hover {
    transform: translateY(-1px);
    transition: transform 0.1s ease-in-out;
}

/* Network topology SVG styling */
svg text {
    user-select: none;
    pointer-events: none;
}

svg g {
    transition: transform 0.1s ease-in-out;
}

/* Alert styling */
.alert-item {
    border-left: 4px solid;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.alert-critical {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.alert-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
}

.alert-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Device tree styling */
.device-tree-item {
    transition: background-color 0.15s ease-in-out;
}

.device-tree-item:hover {
    background-color: #f8fafc;
}

.device-tree-item.selected {
    background-color: #dbeafe;
    border-color: #3b82f6;
}

/* Progress bar animations */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

.progress-bar {
    animation: progressFill 0.8s ease-out;
}

/* Status indicators */
.status-up {
    color: #10b981;
}

.status-down {
    color: #ef4444;
}

.status-warning {
    color: #f59e0b;
}

/* Network connection lines animation */
@keyframes dataFlow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 20;
    }
}

.data-flow {
    stroke-dasharray: 5, 5;
    animation: dataFlow 2s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .right-panel {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        z-index: 10;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .right-panel {
        display: none;
    }
}