.metadata-container {
  font-family: 'Source Sans Pro', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  width: 400px;
  min-width: 300px;
  max-width: calc(100vw / 3);
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 20px;
  top: 20%;
  z-index: 999;
  transition: width 0.0s ease-out, height 0.3s ease, opacity 0.3s ease;
  user-select: none;
  resize: none; /* Disable default resize */
}

.metadata-container-collapsed {
  cursor: pointer;
  display: flex;
  padding: 10px;
  justify-content: center;
  align-items: center;
  width: 100px;
  background: #00447E;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 20px;
  top: 20%;
  z-index: 999;
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  user-select: none;
}

.metadata-container-collapsed:hover {
  transform: scale(1.05);
}

/* Enhanced resize handle with circle and symbol */
.resize-handle {
  position: absolute;
  top: 50%;
  right: -12px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  cursor: col-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00447E;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: white;
  font-weight: bold;
  font-size: 12px;
  transition: all 0.2s ease;
}

.resize-handle:hover {
  background: #005a9e;
  transform: translateY(-50%) scale(1.1);
}

.resize-handle::after {
  content: "↔";
  display: block;
}

.collapsed-icon {
  width: 50px;
  margin-right: 5px;
}

.collapsed-name {
  color: white;
  font-size: 13px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: #00447E;
  color: #ffffff;
  padding: 10px;
  font-size: 1.2em;
  font-weight: bold;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.content {
  padding: 12px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  max-height: 60vh;
}

.scrollable-description {
  max-height: 70px;
  overflow-y: auto;
  padding-right: 5px;
}

.data-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  /* Fixed width for labels, flexible width for values */
  align-items: start;
  gap: 8px;
  margin-bottom: 8px;
}

.label {
  font-weight: bold;
  color: #333;
  text-align: left;
}

.value {
  color: #666;
  text-align: left;
}

.load-dataset-button {
  display: block;
  width: 100%;
  background-color: #00447E;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  margin-top: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.load-dataset-button:hover {
  background-color: #005a9e;
  transform: scale(1.02);
}

.load-dataset-button:active {
  transform: scale(0.98);
}

/* Optimizations for smaller screens */
@media (max-height: 700px) {
  .metadata-container {
    top: 15%;
  }
}

@media (max-width: 768px) {
  .metadata-container {
    width: 90% !important;
    max-width: 90% !important;
    left: 5% !important;
    padding-right: 12px; /* Add space for the handle */
  }

  .metadata-container-collapsed {
    width: auto !important;
  }
}

.collapse-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.collapse-icon:hover {
  transform: scale(1.2);
  cursor: pointer;
}
