/* Block Metadata Styling */

/* Metadata badges container */
.metadata-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-left: 0.5rem;
}

/* Compact metadata badge (icon only) */
.metadata-badge-compact {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  border-radius: 0.25rem;
  transition: transform 0.2s, opacity 0.2s;
}

.metadata-badge-compact:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Full metadata badge (icon + label) */
.metadata-badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 0.25rem;
  transition: transform 0.2s, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.metadata-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Label badge styling */
.label-badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 0.25rem;
}

/* Metadata section in expanded view */
.metadata-section {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  border-left: 3px solid #6c757d;
}

.metadata-section h6 {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6c757d;
}

/* Metadata list */
.metadata-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual metadata item */
.metadata-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.metadata-icon {
  font-size: 1.2rem;
  line-height: 1;
  min-width: 1.5rem;
  text-align: center;
}

.metadata-content {
  flex: 1;
}

.metadata-label {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-value {
  font-size: 0.875rem;
  color: #212529;
  word-break: break-word;
}

.metadata-value a {
  color: #0d6efd;
}

.metadata-value a:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Labels list */
.labels-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Metadata editor modal styling */
.metadata-editor .metadata-entry,
.metadata-editor .label-entry {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  transition: box-shadow 0.2s;
}

.metadata-editor .metadata-entry:hover,
.metadata-editor .label-entry:hover {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.metadata-editor .form-label {
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: #495057;
}

.metadata-editor .form-control-sm {
  font-size: 0.875rem;
}

/* Quick add integration buttons */
.metadata-editor .btn-outline-secondary {
  border-color: #dee2e6;
}

.metadata-editor .btn-outline-secondary:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metadata-badges {
    margin-left: 0;
    margin-top: 0.25rem;
    width: 100%;
  }

  .metadata-badge,
  .metadata-badge-compact {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }

  .metadata-section {
    padding: 0.5rem;
  }

  .metadata-item {
    flex-direction: column;
  }

  .metadata-icon {
    font-size: 1rem;
  }
}

/* Animation for newly added metadata */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metadata-badge.new,
.label-badge.new {
  animation: slideIn 0.3s ease-out;
}

/* Hover tooltip for compact badges */
.metadata-badge-compact[title],
.label-badge[title] {
  cursor: help;
}

/* Color picker styling */
.form-control-color {
  width: 3rem;
  height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem;
}
