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

.root {
  color: var(--sys-color-on-surface);
  width: 100%;
}

.tree-title {
  font-weight: 700;
  display: flex;
  align-items: center;

  & > [aria-controls="form-container"] {
    margin-left: var(--sys-size-2);
    padding-right: var(--sys-size-3);

    & > [name="triangle-right"],
    & > [name="triangle-down"] {
      vertical-align: bottom;
    }

    &[aria-expanded="true"] > [name="triangle-right"] {
      display: none;
    }

    &[aria-expanded="false"] > [name="triangle-down"] {
      display: none;
    }
  }
}

.form-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 0 10px;
}

.full-row {
  grid-column: 1 / 5;
}

.form-factors-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
}

.form-factor-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

hr.section-separator {
  grid-column: 1 / 5; /* Ensures the separator spans all columns */
  border: none;
  margin-top: 1px;
}

.half-row {
  grid-column: span 2;
}

.mobile-checkbox-container {
  display: flex;
}

.device-model-input {
  grid-column: 1 / 4;
}

.input-field {
  color: var(--sys-color-on-surface);
  padding: 3px 6px;
  border-radius: 2px;
  border: 1px solid var(--sys-color-neutral-outline);
  background-color: var(--sys-color-cdt-base-container);
  font-size: inherit;
  height: 18px;
}

.input-field::placeholder {
    color: var(--sys-color-on-surface-subtle);
}

.input-field:focus {
  border: 1px solid var(--sys-color-state-focus-ring);
  outline-width: 0;
}

.add-container {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-icon {
  margin-right: 5px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.brand-row > input {
  width: 100%;
}

.info-icon {
  margin-left: 5px;
  margin-right: 1px;
  height: var(--sys-size-8);
  width: var(--sys-size-8);
}

.link,
.devtools-link {
  color: var(--sys-color-primary);
  text-decoration: underline;
  cursor: pointer;
  outline-offset: 2px;
  font-weight: 400;
}

devtools-icon + .link {
  margin-inline-start: 2px;
}

.hide-container {
  display: none;
}

.input-field-label-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (forced-colors: active) {
  .input-field {
    border: 1px solid;
  }

  .tree-title[aria-disabled="true"] {
    color: GrayText;
  }
}
