/* Direct Mapping Detail page styles */

/* Back link styling for direct mapping detail header */
.ab-page-header .ab-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1976D2;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.ab-page-header .ab-back-link:hover {
  color: #1565C0;
  text-decoration: none;
}

/* Duplicate highlight styles */
.ab-dup-input { border-color:#dc3545 !important; box-shadow:0 0 0 .15rem rgba(220,53,69,.1); }
.ab-dup-msg { color:#dc3545; }
.ab-changes-pill { font-size:.78rem; color:#0f172a; background:#eef5ff; border:1px solid #dbe4fd; padding:.2rem .5rem; border-radius:999px; display:none; }
.ab-changes-pill.show { display:inline-flex; align-items:center; gap:.35rem; }
.ab-row-actions { white-space:nowrap; }
.ab-icon-btn { border:none; background:transparent; color:#6b7280; padding:4px; border-radius:6px; }
.ab-icon-btn:hover { background:#f1f5f9; color:#111827; }

/* Dataset dropdown styles */
.dropdown { position:relative; }
.dropdown-menu { 
  display:none; 
  position:absolute; 
  top:100%; 
  left:0; 
  margin-top:4px; 
  background:#fff; 
  border:1px solid #dbe4fd; 
  border-radius:8px; 
  padding:6px 0; 
  min-width:200px; 
  max-height:250px; 
  overflow-y:auto; 
  box-shadow:0 4px 12px rgba(0,0,0,.1); 
  z-index:1000; 
}
.dropdown-item { 
  display:block; 
  width:100%; 
  padding:8px 12px; 
  clear:both; 
  font-weight:400; 
  color:#212529; 
  text-align:inherit; 
  text-decoration:none; 
  white-space:nowrap; 
  background-color:transparent; 
  border:0; 
  cursor:pointer; 
}
.dropdown-item:hover { 
  background-color:#f8f9fa; 
  color:#1e2125; 
}

/* Version History Panel */
.ab-version-panel {
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
  border-radius: 0 0 12px 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.ab-version-panel.show {
  max-height: 400px;
  overflow-y: auto;
}
.ab-version-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: #6b7280;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.ab-version-toggle:hover {
  color: #1976D2;
  background: #eef5ff;
}
.ab-version-toggle .bi { transition: transform .2s; }
.ab-version-toggle.open .bi-clock-history { color: #1976D2; }
.ab-version-list {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
}
.ab-version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .82rem;
  transition: background .12s;
}
.ab-version-item:hover {
  background: #eef5ff;
}
.ab-version-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ab-version-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}
.ab-version-item-meta {
  font-size: .75rem;
  color: #9ca3af;
}
.ab-version-item-desc {
  font-size: .75rem;
  color: #6b7280;
  font-style: italic;
}
.ab-version-restore-btn {
  flex-shrink: 0;
  font-size: .75rem;
  padding: 3px 10px;
  border: 1px solid #dbe4fd;
  background: #fff;
  color: #1976D2;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.ab-version-restore-btn:hover {
  background: #eef5ff;
  border-color: #1976D2;
}
.ab-version-restore-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.ab-version-badge {
  font-size: .7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 500;
}
.ab-version-empty {
  text-align: center;
  color: #9ca3af;
  font-size: .82rem;
  padding: 16px;
}
