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

/* #css_wrapper_metadata_start
 * #type=style-lit
 * #import=chrome://resources/cr_elements/cr_icons_lit.css.js
 * #import=chrome://resources/cr_elements/cr_shared_vars.css.js
 * #import=chrome://resources/cr_elements/cr_shared_style_lit.css.js
 * #import=../shared_style.css.js
 * #import=../shared_vars.css.js
 * #include=cr-icons-lit cr-shared-style-lit shared-style
 * #css_wrapper_metadata_end */

:host {
  border-top: var(--cr-separator-line);
  display: block;
  /* Unequal padding on left/right side as the cr-icon-button's width is
   * greater than the delete icon's width. */
  padding-bottom: 8px;
  padding-inline-end: 8px;
  padding-inline-start: var(--cr-section-padding);
  padding-top: 8px;
}

#activity-item-main-row {
  align-items: center;
  display: flex;
  flex-direction: row;
  /* Match separator height. */
  min-height: calc(var(--cr-section-min-height) - var(--separator-gap));
}

#activity-item-main-row .separator {
  margin: 0 calc(
      var(--cr-section-padding) + var(--cr-icon-ripple-margin));
}

#activity-item-main-row cr-expand-button {
  margin-inline-end: 6px;
}

#activity-call-and-count {
  display: flex;
  flex: 1;
  flex-direction: row;
  margin-inline-end: auto;
  max-width: var(--activity-log-call-and-count-width);
}

#activity-delete {
  margin: 0;
}

#activity-type {
  flex: 0 var(--activity-type-width);
}

#activity-key {
  flex: 1;
  margin-inline-start: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#activity-count {
  flex: 0 var(--activity-count-width);
  text-align: end;
}

.page-url {
  display: flex;
  flex-direction: row;
  margin-bottom: 10px;
  max-width: var(--activity-log-call-and-count-width);
}

.page-url-link {
  flex-grow: 1;
  margin-inline-end: 20px;
  margin-inline-start: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
