/* Data tab hierarchy */
#view-data .card {
  padding: 18px;
}

#view-data .panel-title {
  margin-bottom: 10px;
}

.data-tree-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.data-tree-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8ea;
  color: #4a5410;
  font-size: 12px;
  font-weight: 850;
}

.data-tree-wrap {
  max-height: calc(100vh - 260px);
  min-height: 360px;
  border-radius: 14px;
}

.data-tree-table {
  font-size: 12px;
  min-width: 1280px;
}

.data-tree-table th,
.data-tree-table td {
  padding: 8px 9px;
  vertical-align: top;
  white-space: nowrap;
}

.data-tree-table th:first-child,
.data-tree-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 360px;
  min-width: 360px;
  max-width: 420px;
  white-space: normal;
}

.data-tree-table th:first-child {
  z-index: 7;
}

.data-entity {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.data-level-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2cf;
  color: #596600;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.data-entity-name {
  color: #172033;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.data-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 5px;
  color: #637087;
  font-size: 11px;
  line-height: 1.25;
}

.data-level-campaign td {
  background: #fbfcf2;
  font-weight: 850;
}

.data-level-adset td:first-child {
  padding-left: 24px;
  background: #fff;
}

.data-level-ad td:first-child {
  padding-left: 48px;
  background: #fff;
}

.data-level-ad .data-level-badge {
  background: #f5f6ea;
  color: #6b7280;
}

.data-synthetic-row td {
  color: #667085;
  background: #fdfdf7;
}

.data-synthetic-row .data-entity-name::after {
  content: " grup";
  color: #8a9462;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .data-tree-wrap {
    max-height: 68vh;
  }

  .data-tree-table th:first-child,
  .data-tree-table td:first-child {
    width: 260px;
    min-width: 260px;
  }

  .data-entity {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .data-level-adset td:first-child {
    padding-left: 16px;
  }

  .data-level-ad td:first-child {
    padding-left: 30px;
  }
}
