/* Entity Details Panel - Matching App Theme */
.node-details-panel {
  position: relative;
  width: 100%;
  max-height: 60vh;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid #374151;
  border-radius: 6px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.node-details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid #374151;
}

.node-details-name {
  margin: 0 !important;
  color: #f3f4f6;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.3 !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  flex: 1;
  margin-right: 8px;
}

.close-node-details {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.close-node-details:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.node-details-content {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  background: transparent;
}

/* Entity Details View Styles */
.entity-details-view { 
  max-height: 400px; 
  overflow-y: auto; 
  padding: 8px 0 20px 0;
}

.entity-details-content { 
  background: #1f2937; 
  border-radius: 6px; 
  padding: 12px; 
  margin-top: 8px;
}

.entity-detail-main h3 { 
  margin: 0 0 4px 0; 
  color: #f3f4f6; 
  font-size: 16px; 
}

.entity-detail-meta { 
  color: #9ca3af; 
  font-size: 12px; 
  margin-bottom: 8px; 
}

.entity-detail-summary { 
  color: #d1d5db; 
  font-size: 13px; 
  line-height: 1.4; 
  margin-bottom: 12px; 
}

/* Simple Section Design */
.entity-detail-section { 
  margin-bottom: 12px;
}

.entity-detail-section h4 { 
  margin: 0 0 6px 0;
  color: #60a5fa; 
  font-size: 11px; 
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #374151;
  padding-bottom: 2px;
}

/* Simple Detail Items */
.detail-item {
  display: flex;
  margin-bottom: 3px;
  font-size: 9px;
}

.detail-label {
  color: #9ca3af;
  font-size: 7px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  min-width: 70px;
  margin-right: 6px;
  flex-shrink: 0;
}

.detail-value {
  color: #e5e7eb;
  font-size: 9px;
  word-break: break-word;
  font-weight: 400;
  flex: 1;
}

/* Simple Connections */
.connections-list {
  /* Remove max-height and overflow to prevent nested scrolling */
}

.connection-item {
  display: flex;
  margin-bottom: 2px;
  font-size: 8px;
  align-items: center;
}

.connection-label {
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 7px;
  letter-spacing: 0.2px;
  min-width: 45px;
  margin-right: 4px;
  flex-shrink: 0;
}

.connection-entity {
  color: #e5e7eb;
  font-weight: 400;
  word-break: break-word;
  font-size: 8px;
  flex: 1;
  margin-right: 4px;
}

.connection-meta {
  color: #6b7280;
  font-size: 7px;
  background: rgba(55, 65, 81, 0.4);
  padding: 1px 3px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Simple Statements */
.statements-list {
  /* Remove max-height and overflow to prevent nested scrolling */
}

.statement-group {
  margin-bottom: 6px;
}

.statement-prop {
  color: #60a5fa;
  font-size: 8px;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  border-bottom: 1px solid #374151;
  padding-bottom: 1px;
}

.statement-item {
  display: flex;
  margin-bottom: 1px;
  font-size: 8px;
  align-items: center;
}

.statement-value {
  color: #e5e7eb;
  font-weight: 400;
  word-break: break-word;
  flex: 1;
  margin-right: 4px;
}

.statement-dataset {
  color: #9ca3af;
  font-size: 6px;
  background: rgba(55, 65, 81, 0.4);
  padding: 1px 2px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Compact Property Groups */
.property-group {
  margin-bottom: 8px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid #374151;
  border-radius: 3px;
}

.property-group-title {
  color: #f3f4f6;
  font-size: 9px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 2px;
  border-bottom: 1px solid #374151;
}

/* Compact Datasets */
.datasets-list { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 3px; 
  margin-top: 6px;
}

.dataset-tag { 
  background: #3b82f6;
  color: white; 
  padding: 2px 4px; 
  border-radius: 3px; 
  font-size: 8px; 
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.relations-list { 
  /* Remove max-height and overflow to prevent nested scrolling */
  padding-bottom: 10px;
}

.relation-item { 
  padding: 4px 0; 
  border-bottom: 1px solid #374151; 
  font-size: 12px; 
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

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

.relation-label { 
  color: #9ca3af; 
  font-style: italic; 
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.relation-entity { 
  color: #f3f4f6; 
  font-weight: 500; 
  margin: 0 4px; 
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.relation-meta { 
  color: #6b7280; 
  font-size: 11px; 
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.relation-more { 
  color: #9ca3af; 
  font-style: italic; 
  font-size: 11px; 
  text-align: center; 
  padding: 4px 0; 
}

.entity-detail-actions { 
  margin-top: 12px; 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.btn-primary { 
  background: #3b82f6; 
  color: white; 
  border: 1px solid #2563eb; 
}

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

.btn-secondary { 
  background: #6b7280; 
  color: white; 
  border: 1px solid #4b5563; 
}

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

/* Node Details Panel Styles */
.node-details-panel {
  background: linear-gradient(135deg, #0b1220 0%, #1e293b 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  margin: 16px 0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slideInFromRight 0.3s ease-out;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.node-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(55, 65, 81, 0.3);
  border-bottom: 1px solid #374151;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.node-details-name {
  color: #ffffff;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
  margin-right: 12px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
  max-width: calc(100% - 60px);
}

.close-node-details {
  background: rgba(55, 65, 81, 0.6);
  border: 1px solid #374151;
  color: #e5e7eb;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.close-node-details:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
  color: #60a5fa;
  transform: scale(1.1);
}

.node-details-content {
  padding: 20px 20px 60px 20px;
  color: white;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(90vh - 120px);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.node-details-section {
  margin-bottom: 24px;
}

.node-details-section:last-child {
  margin-bottom: 40px;
  padding-bottom: 20px;
}

.node-details-section h4 {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 6px;
}

.node-details-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.node-details-item:last-child {
  border-bottom: none;
}

.node-details-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.node-details-value {
  color: white;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  font-size: 14px;
}

.node-details-connections {
  display: grid;
  gap: 8px;
  overflow-x: hidden;
  word-wrap: break-word;
  padding-bottom: 20px;
}

.node-details-connection {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  overflow-x: hidden;
}

.node-details-connection-name {
  font-weight: 600;
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.node-details-connection-type {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.node-details-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-details-alias {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Details Panel Styles */
.detail-item {
  margin-bottom: 12px;
  padding: 8px;
  background: #1f2937;
  border-radius: 4px;
  border: 1px solid #374151;
}

.detail-label {
  font-weight: 600;
  color: #60a5fa;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.no-details {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  padding: 20px;
}
