/* VM Cards Container */
.vm-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-vms-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 24px 16px;
    font-size: 14px;
    line-height: 1.5;
}

/* VM Card Base */
.vm-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.vm-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.vm-card.selected {
    border-color: var(--blue);
    background: var(--blue-light);
}

/* Compact card for non-running states */
.vm-card.compact {
    padding: 12px 16px;
}

/* Full card for running state */
.vm-card.full {
    padding: 16px;
}

/* VM Status */
.vm-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.status-indicator.running {
    background: var(--green);
    box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.2);
}

.status-indicator.starting {
    background: var(--orange);
    box-shadow: 0 0 0 2px rgba(255, 159, 10, 0.2);
    animation: pulse 2s infinite;
}

.status-indicator.stopped,
.status-indicator.error {
    background: var(--text-secondary);
    box-shadow: 0 0 0 2px rgba(134, 134, 139, 0.2);
}

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

.vm-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* VM Info - only shown in compact cards */
.vm-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.vm-info .status-text {
    font-weight: 500;
}

.vm-info .vm-port {
    font-family: 'SF Mono', Monaco, monospace;
}

/* VM Controls - only shown for running VMs */
.vm-controls {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: all 0.2s ease;
    max-height: 0;
    overflow: hidden;
}

/* Show controls for running VMs */
.vm-card.full .vm-controls {
    opacity: 1;
    max-height: 200px;
}

.vm-card.full:hover .vm-controls,
.vm-card.full.selected .vm-controls {
    opacity: 1;
}

.vm-controls-row {
    display: flex;
    gap: 6px;
}

.vm-controls-row .control-btn {
    flex: 1;
}

/* Status text styling */
.status-text.running {
    color: var(--green);
}

.status-text.starting {
    color: var(--orange);
}

.status-text.stopped,
.status-text.error {
    color: var(--text-secondary);
}


.vm-port.vnc-connected {
    color: var(--success-color, #34C759);
    font-weight: 500;
}

.vm-port.vnc-disconnected {
    color: var(--warning-color, #FF9500);
    font-style: italic;
}

.control-btn.setup-vnc-btn {
    background: var(--accent-color, #007AFF);
    color: white;
}

.control-btn.disconnect-btn {
    background: var(--warning-color, #FF9500);
    color: white;
}

.control-btn.disconnect-btn:hover {
    background: var(--warning-color-hover, #E6830E);
}