/* ========================================
   BMC Monitor - Component Styles
   ======================================== */

/* Device Control Panel */
.device-control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.control-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.control-card.active {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.control-card.cip-active {
    border-color: #2196F3;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    animation: pulse 2s infinite;
}

.control-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.control-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.control-status {
    font-size: 14px;
    color: #666;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Device Cards */
.device-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.device-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

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

.status-online {
    background-color: #28a745;
    animation: pulse 2s ease-in-out infinite;
}

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

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

/* Error Management */
.error-card {
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 10px 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.error-code {
    font-weight: 700;
    font-size: 16px;
    color: #dc3545;
}

.error-severity {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.error-severity-critical {
    background-color: #dc3545;
    color: white;
}

.error-severity-warning {
    background-color: #ffc107;
    color: #333;
}

.error-severity-info {
    background-color: #17a2b8;
    color: white;
}

.error-message {
    color: #666;
    margin-bottom: 10px;
}

.error-timestamp {
    font-size: 12px;
    color: #999;
}

/* Telemetry Charts */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .device-control-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .device-card {
        margin: 8px 0;
        padding: 15px;
    }
    
    .sidebar {
        display: none;
    }
    
    .control-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .device-card {
        margin: 5px 0;
        padding: 10px;
        font-size: 14px;
    }
    
    .error-card {
        padding: 10px;
        font-size: 13px;
    }
    
    body {
        font-size: 14px;
    }
    
    .device-title {
        font-size: 18px;
    }
    
    .control-icon {
        font-size: 36px;
    }
    
    .control-label {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .device-card {
        font-size: 13px;
        padding: 8px;
    }
    
    .error-card {
        font-size: 12px;
        padding: 8px;
    }
    
    body {
        font-size: 13px;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .device-control-panel {
        gap: 15px;
    }
    
    .control-card {
        padding: 15px;
    }
    
    .control-icon {
        font-size: 32px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.p-3 {
    padding: 1rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}
