/* ========================================
   BIM Viewer Component Styles
   ======================================== */

.bim-viewer-container {
    width: 100%;
    height: 500px;
    background: var(--bg-dark);
    border-radius: var(--border-radius-md);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bim-viewer-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.bim-viewer-toolbar {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.bim-toolbar-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.bim-toolbar-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary-light);
    border-color: var(--primary);
}

.bim-toolbar-btn.active {
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary-light);
    border-color: var(--primary);
}

.bim-toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.bim-viewer-info {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.bim-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bim-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bim-info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

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

.bim-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.bim-loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.bim-fullscreen-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

/* Component Tree Panel */
.bim-component-tree {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.bim-tree-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.bim-tree-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color-subtle);
}

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

.bim-tree-item:hover {
    background: var(--bg-card-hover);
}

.bim-tree-item.selected {
    background: rgba(0, 102, 255, 0.15);
    border-left: 3px solid var(--primary);
}

.bim-tree-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
}

.bim-tree-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.bim-tree-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Property Panel */
.bim-property-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
}

.bim-property-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.bim-property-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color-subtle);
}

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

.bim-property-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.bim-property-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}
