/**
 * Distributed Processing Plugin Styles
 */

.distributed-processing-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
}

.distributed-processing-badge.gpu {
    background: #28a745;
}

.distributed-processing-badge.priority-high {
    background: #dc3545;
}

.distributed-processing-badge.priority-medium {
    background: #ffc107;
    color: #333;
}

.distributed-processing-badge.priority-low {
    background: #6c757d;
}

.dp-node-selector {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.dp-node-selector h4 {
    margin-top: 0;
    color: #333;
    font-size: 14px;
}

.dp-node-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.dp-node-list li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-node-list li:last-child {
    border-bottom: none;
}

.dp-node-info {
    flex: 1;
}

.dp-node-name {
    font-weight: bold;
    color: #333;
}

.dp-node-stats {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.dp-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.dp-loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
}

.dp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
}

/* Resource Gauge Styles */
.resource-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 8;
}

.gauge-progress {
    fill: none;
    stroke: #3498db;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.gauge-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.gauge-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Node Monitor Card Styles */
.node-monitor-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.node-monitor-card .node-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.node-monitor-card .node-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.node-monitor-card .node-badges {
    display: flex;
    gap: 6px;
}

.node-monitor-card .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.node-monitor-card .badge-success {
    background: #28a745;
    color: white;
}

.node-monitor-card .badge-info {
    background: #17a2b8;
    color: white;
}

.node-monitor-card .badge-primary {
    background: #007bff;
    color: white;
}

.node-gauges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.gauge-wrapper {
    text-align: center;
}

.gauge-gpu-label {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    font-weight: 500;
}

.gauge-gpu-temp {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.gauge-gpu-power {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    font-weight: 500;
}

.node-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.node-tasks {
    margin-top: 15px;
}

.node-tasks strong {
    font-size: 13px;
    color: #333;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.task-list li {
    padding: 6px 10px;
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    margin-bottom: 6px;
    border-radius: 3px;
    font-size: 12px;
}

.task-name {
    color: #333;
    font-weight: 500;
}

.task-status {
    float: right;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.task-status.status-queued {
    background: #6c757d;
    color: white;
}

.task-status.status-running {
    background: #ffc107;
    color: #333;
}

.task-status.status-uploading {
    background: #17a2b8;
    color: white;
}

.node-offline-msg {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* Monitoring container grid */
.node-monitors-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .node-gauges {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .node-monitors-container {
        grid-template-columns: 1fr;
    }
}

/* Unified Tabbed Node Card Styles */
.unified-node-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.unified-node-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unified-node-card .node-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.unified-node-card .node-header h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.unified-node-card .node-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tab Navigation */
.node-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #f8f9fa;
}

.tab-btn i {
    font-size: 16px;
}

/* Tab Contents */
.tab-contents {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Node field styles in settings tab */
.tab-content .node-field {
    margin-bottom: 15px;
}

.tab-content .node-field label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.tab-content .node-field select,
.tab-content .node-field input[type="number"],
.tab-content .node-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.tab-content .node-field select:focus,
.tab-content .node-field input:focus,
.tab-content .node-field textarea:focus {
    outline: none;
    border-color: #007bff;
}

.tab-content .node-field textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.tab-content .checkbox-field {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tab-content .checkbox-field input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.tab-content .checkbox-field label {
    font-size: 14px;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.tab-content .btn-save {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-content .btn-save:hover {
    background: #0056b3;
}

.tab-content .btn-save:active {
    transform: scale(0.98);
}

/* Empty state styling */
.tab-content .text-muted {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}
