/* Sistema de Cámaras SecurOS Web - Estilos */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
}

#connection-status {
    color: #dc3545;
    font-weight: bold;
}

#connection-status.connected {
    color: #28a745;
}

.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    min-height: 400px;
}

.camera-view {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.camera-view:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.camera-header {
    background: #343a40;
    color: white;
    padding: 10px 15px;
    border-bottom: 1px solid #495057;
}

.camera-header h6 {
    margin: 0;
    font-weight: 600;
}

.camera-header small {
    opacity: 0.8;
}

.camera-video {
    position: relative;
    background: #000;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    text-align: center;
    color: #6c757d;
}

.video-placeholder i {
    margin-bottom: 10px;
}

.no-cameras {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.camera-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.camera-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.camera-item .badge {
    font-size: 0.75em;
}

/* Drag and Drop */
.camera-view.drag-over {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.camera-view.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Responsive */
@media (max-width: 768px) {
    .camera-grid {
        grid-template-columns: 1fr;
    }
    
    .container-fluid {
        padding: 10px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-connected {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-disconnected {
    background-color: #dc3545;
}

.status-error {
    background-color: #ffc107;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Network scan results */
.scan-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    background: #f8f9fa;
}

.scan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.scan-item:last-child {
    border-bottom: none;
}

.scan-item .btn-sm {
    padding: 2px 8px;
    font-size: 0.75em;
}

/* Log viewer */
.log-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 15px;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.log-entry {
    margin-bottom: 5px;
}

.log-debug { color: #569cd6; }
.log-info { color: #4ec9b0; }
.log-warn { color: #dcdcaa; }
.log-error { color: #f44747; }
.log-fatal { color: #f44747; font-weight: bold; }
