/**
 * Project Meta Component
 * Sidebar metadata panel: stacked label/value rows + optional tag chips.
 * Typically rendered inside the hero_banner aside.
 */

.doghouse-project-meta {
  container-type: inline-size;
  container-name: projectmeta;
  --pm-accent: var(--dh-accent, var(--site-color-red));
  background: var(--site-color-bg-surface-card);
  border: 1px solid var(--site-color-border-subtle);
  border-radius: var(--site-radius-lg);
  padding: var(--site-space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--site-space-lg);
}

/* Rows — Drupal wraps field items in an extra div, so target that wrapper.
 * Default (narrow): stacked column with hairline dividers between rows. */
.doghouse-project-meta__rows > div {
  display: flex;
  flex-direction: column;
}

.doghouse-project-meta__rows > div > div + div {
  border-top: 1px solid var(--site-color-border-subtle);
}

/* Container-width breakpoints — switch to grid when the panel is wide enough
 * (e.g. placed full-width under the hero, or as a standalone component).
 * Stays single-column in the hero right-rail (340px max). */
@container projectmeta (min-width: 440px) {
  .doghouse-project-meta__rows > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--site-space-lg) var(--site-space-xl);
  }
  .doghouse-project-meta__rows > div > div + div {
    border-top: 0;
  }
}

@container projectmeta (min-width: 720px) {
  .doghouse-project-meta__rows > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Scoped overrides for project_detail_row rendered inside this panel.
 * The row itself is display:contents (so label/value can participate in
 * two_column_story's grid), which means spacing has to live on the field
 * item wrapper and directly on the label/value here. */
.doghouse-project-meta__rows > div > div {
  padding: var(--site-space-base) 0;
}

.doghouse-project-meta .doghouse-project-detail-row__label {
  color: var(--pm-accent);
  margin-bottom: var(--site-space-xs);
}

.doghouse-project-meta .doghouse-project-detail-row__value {
  text-align: left;
  font-size: 1rem;
  font-weight: var(--site-fw-regular);
  color: var(--site-color-text-white);
}

/* Tags — pill/chip pattern (mirrors paragraph--card-grid.css service variant)
 * but scoped to this panel so the accent token can drive the colour. */
.doghouse-project-meta__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--site-space-xs);
  list-style: none;
  margin: 0;
  padding: var(--site-space-base) 0 0;
  border-top: 1px solid var(--site-color-border-subtle);
}

.doghouse-project-meta__tag {
  display: inline-block;
  margin-bottom: 0;
  padding: 0.35rem 0.65rem;
  font-family: var(--site-font-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--pm-accent);
  background: color-mix(in srgb, var(--pm-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--pm-accent) 35%, transparent);
  border-radius: 4px;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .doghouse-project-meta {
    padding: var(--site-space-lg);
  }
}
