.meta-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 5px;

  flex: 1;
}

.meta-bar-wrapper {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px 10px;
  margin-top: 20px;
  margin-bottom: 10px;

  display: flex;
  align-items: flex-start;
}

.visual-box {
  width: 250px;
  max-height: 250px;
  margin-left: 1rem;
  flex-shrink: 0;
  flex-direction: column;
  border: "1px solid #ccc";
  margin-left: "1rem";
  overflow: "hidden";
}

.visual-viewer {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.visual-tabs {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid #ccc;
  background: #f9f9f9;
  scrollbar-width: none;   /* Firefox */
}
.visual-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.visual-tabs::before,
.visual-tabs::after {
  content: "";
  position: sticky;
  top: 0;
  width: 20px;
  pointer-events: none;
  z-index: 1;
}
.visual-tabs::before {
  left: 0;
  background: linear-gradient(to right, #f9f9f9, transparent);
}
.visual-tabs::after {
  right: 0;
  background: linear-gradient(to left, #f9f9f9, transparent);
}

.visual-tab {
  display: inline-block;  /* make each tab size itself */
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;    /* prevent line breaks */
  flex-shrink: 0;         /* don’t shrink below text width */
}

.meta-item {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.meta-label {
  font-size: 0.75em;
  color: #666;
  margin-bottom: 2px;
}

.meta-value {
  font-weight: bold;
  font-size: 0.95em;
  color: #222;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 5px 0 15px;
}

.pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  white-space: nowrap;
}

.tags {
  background: #f0f0f0;
  color: #333;
}

.location {
  background: #e8ecff;
  color: #223;
}

.chip_selected {
  background: #d0d050;
}

.clickable {
  text-decoration: underline;
}

.related-group {
  border: 1px solid #aaa;
  border-radius: 7px;
  margin-bottom: 12px;
  padding: 0.5em;
}

.related-group strong {
  font-size: larger;
}


.related-group ul {
  padding-left: 1.2em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.related-group li {
  margin-top: 4pt;
  /* tight spacing between list items */
  clear: both;
}

.description-block {
  margin-bottom: 1em;
}

.related-group .description-block {
  margin-top: 2px;
  margin-bottom: 2px;
}

.description-block p {
  margin-top: 3pt;
  margin-bottom: 2px;
  /* eliminate paragraph spacing */
}

.related-group .description-block p {
  margin-top: 2px;
  margin-bottom: 2px;
}


#recommendation-panel h2 {
  margin-top: 0px;
}

.recommendation-box {
  border: 1px solid #aaa;
  border-radius: 7px;
  background: #fff;
  margin-bottom: 12px;
  padding: 8px 12px;
}

.recommendation-checkbox {
  margin-right: 10px;
}

.recommendation-title {
  flex: 1 1 auto;
  padding: 2px 0;
  transition: color 0.2s;
}

/* Default: indeterminate (handled last for specificity) */
.recommendation-checkbox~.recommendation-title {
  color: black;
  text-decoration: none;
}

/* Checked: green */
.recommendation-checkbox:checked~.recommendation-title {
  font-weight: bold;
  text-decoration: none;
}

/* Unchecked: dark red + strike-through */
.recommendation-checkbox:not(:checked):not(:indeterminate)~.recommendation-title {
  font-style: italic;
  text-decoration: line-through;
}

/* Indeterminate: black (reset strike-through) */
.recommendation-checkbox:indeterminate~.recommendation-title {
  text-decoration: none;
}


.relation-chip {
  display: inline-block;
  min-width: 3.2em;
  max-width: 3.2em;
  padding: 0.13em 0.7em;
  margin-right: 9px;
  border-radius: 1.2em;
  background: #1976d2;
  color: #fff;
  font-size: 0.96em;
  font-weight: bold;
  letter-spacing: 0.02em;
}

/* Tree view styles */
.tree-node {
  margin-left: 0.5em;
  padding: 0.25em 0;
}

.tree-header {
  display: flex;
  align-items: center;
}

.tree-toggle {
  cursor: pointer;
  color: darkgrey;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  /* fixed square box */
  height: 1em;
  line-height: 1em;
  margin-right: 0.3em;
  font-size: 0.9em;
  /* normalize ▼ vs ▶ */
}

.tree-title {
  cursor: pointer;
  flex: 1;
}

.tree-children {
  margin-left: 0.4em;
  /* dotted line aligns below toggle */
  border-left: 1px dotted #aaa;
  padding-left: 0.4em;
}

/* =========================
   PROPERTIES GRID (View Mode)
   ========================= */
.properties-grid {
  margin-top: 16px;
  clear: both;
}

.properties-grid>h3 {
  margin: 0 0 8px 0;
  font-size: 1.2em;
}

.properties-grid-table {
  display: grid;
  row-gap: 2px;
  /* compact spacing */
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.properties-row {
  display: grid;
  grid-template-columns: 2fr 2fr 3fr;
  column-gap: 8px;
  align-items: start;
  padding: 4px 6px;
}

.properties-header {
  background: #f3f4f6;
  font-size: 0.85em;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.properties-row .cell {
  font-size: 0.95em;
  color: #222;
  white-space: pre-wrap;
}

.image-pin {
  text-shadow: 0 0 4px black;
}