/**
 * ASD Main Stylesheet
 * Extracted from index.html as part of Sprint 12 modularization
 */

/* Base Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Tab Navigation */
.tab-active {
    border-bottom: 2px solid #2563eb;
    color: #2563eb;
}

/* Cards */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.device-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.device-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
    transition: all 0.2s;
    border: none;
    background: none;
    color: #cbd5e1;
    cursor: pointer;
}

.sidebar-item:hover {
    background-color: #374151;
}

.sidebar-item.active {
    background-color: #2563eb;
    color: white;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Discovery Button States */
.discovery-btn:active {
    transform: scale(0.95);
}

.discovery-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.discovery-btn.discovering {
    position: relative;
}

.discovery-btn.discovering::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    background-color: #dbeafe;
    border-radius: 9999px;
    height: 0.5rem;
}

.progress-fill {
    background-color: #2563eb;
    height: 0.5rem;
    border-radius: 9999px;
    width: 100%;
}

/* Cytoscape Graph */
#cy {
    width: 100%;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
}

.cy-node-selected {
    box-shadow: 0 0 0 3px #2563eb;
}
