/*
 * Copyright 2026 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

:host {
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.ads-view-container {
  display: flex;
  flex-direction: column;
  flex: auto;
}

.metrics-container {
  flex: 0 0 auto;
  margin: 0 0 24px;
  border: 1px solid var(--sys-color-divider);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--sys-color-divider);
}

.metric-box {
  background-color: var(--sys-color-surface);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.metric-title {
  font-size: 12px;
  color: var(--sys-color-on-surface-subtle);
  margin: 0 0 4px;
}

.metric-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--sys-color-on-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  gap: 2px;
}

.metric-average {
  font-size: 12px;
  font-weight: normal;
  color: var(--sys-color-on-surface-subtle);
}

.metrics-title,
.ad-frames-title,
.settings-title {
  color: var(--sys-color-on-surface);
  flex: 0 0 auto;
  font-weight: bold;
  margin-bottom: 8px;
}

.ad-frames-data-grid {
  flex: auto;
}

.ad-frames-container {
  border: 1px solid var(--sys-color-divider);
  display: flex;
  flex: auto;
  flex-direction: column;
  margin-bottom: 24px;
  height: 300px;
  min-height: 150px;
  position: relative;
  resize: vertical;
  overflow: hidden;
}

devtools-checkbox.setting-container {
  /*
   * Apply negative margins here to offset the default devtools-checkbox style
   * to align this component with the rest of the Ads panel layout.
   */
  margin: 0 0 -6px -6px;
}

.setting-text-container {
  display: flex;
  flex-direction: column;
}

.setting-explanation {
  color: var(--sys-color-token-subtle);
  white-space: break-spaces;
  margin-top: 0;
}
