/* ============================================================
   ELHASSANE STUDIO - AI Construction Manager
   الملف: public/css/bim.css - أنماط BIM
   ============================================================ */

.bim-viewer-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: #0F172A;
  border-radius: 12px;
  overflow: hidden;
}

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

.bim-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  padding: 8px 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
}

.bim-controls button {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.bim-controls button:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.bim-element-info {
  position: absolute;
  bottom: 80px;
  left: 20px;
  background: rgba(15, 23, 42, 0.9);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  max-width: 300px;
  color: #e2e8f0;
  font-size: 13px;
  display: none;
  z-index: 10;
}

.bim-element-info.visible {
  display: block;
}

.bim-element-info .title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #60a5fa;
}

.bim-element-info .detail {
  color: #94a3b8;
  font-size: 12px;
}

/* ============================================================
   منطقة رفع ملفات BIM (متوافقة مع صفحة bim.html المستقلة)
   ============================================================ */

.drawings-upload {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s;
}

.dark .drawings-upload {
  border-color: #374151;
  background: #1a1a2e;
}

.drawings-upload:hover {
  border-color: #3b82f6;
  background: #f0f4ff;
}

.dark .drawings-upload:hover {
  border-color: #3b82f6;
  background: #1a1a3e;
}

.drawings-upload .upload-icon {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.drawings-upload .upload-text {
  font-size: 16px;
  color: #4a5568;
}

.dark .drawings-upload .upload-text {
  color: #c0c0d0;
}

.drawings-upload .upload-sub {
  font-size: 12px;
  color: #94a3b8;
}

/* ============================================================
   عارض داخل تطبيق SPA
   ============================================================ */

#bimViewerContainer {
  position: relative;
}

#bimViewer {
  width: 100%;
  height: 100%;
  min-height: 480px;
}

/* ============================================================
   أزرار التحكم (حالة نشطة للتدوير التلقائي)
   ============================================================ */

.bim-controls button.active {
  background: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

/* ============================================================
   تعليقات العناصر
   ============================================================ */

.bim-annotations {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.dark .bim-annotations {
  border-top-color: #374151;
}

.bim-annotations-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.dark .bim-annotations-title {
  color: #94a3b8;
}

.bim-annotations-empty {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.bim-annotations-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  max-height: 160px;
  overflow-y: auto;
}

.bim-annotations-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 6px;
}

.dark .bim-annotations-list li {
  background: #1a1a2e;
  border-color: #374151;
  color: #c0c0d0;
}

.bim-annotation-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.bim-annotation-del:hover {
  color: #ef4444;
}

.bim-annotations-form {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.bim-annotations-form .input-field {
  flex: 1;
  font-size: 13px;
}

.bim-annotations-form .btn-primary {
  font-size: 13px;
  padding: 8px 12px;
  white-space: nowrap;
}