/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

:host {
  display: grid;
  grid-template-areas: "label" "input" "explainer";
  grid-template-columns: minmax(0, auto) min-content;
  grid-gap: var(--space-small);
  align-items: center;
}

label {
  grid-area: label;
  display: block;
  color: var(--in-content-page-color);
  align-self: end;
}

/** input.input-field needed to override margin in themes/osx/global/in-content/common.css */
input.input-field {
  grid-area: input;
  margin: 0;
  appearance: textfield;
}

.input-field:read-only {
  all: unset;
  display: inline-block;
  text-overflow: ellipsis;
  overflow: hidden;
  appearance: textfield;
  grid-area: input;

  & + .explainer {
    display: none;
  }
}

.reveal-password-button {
  grid-area: input;
  justify-self: end;
  cursor: pointer;
}

.origin-input {
  grid-area: input;
}

.explainer {
  grid-area: explainer;
}
