/* 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/. */

@import url("chrome://global/skin/design-system/text-and-typography.css");

.profile-card {
  height: 185px;
  width: 200px;

  color: var(--button-text-color);
  border: var(--button-border);
  border-radius: var(--border-radius-medium);
  background-color: var(--button-background-color);
  box-shadow: var(--box-shadow-10);

  /* The profile card acts like a button but we don't want the hover styles to
   * apply to the card when we are hovering the child button elements. */
  &:hover:not(:has(moz-button:hover)) {
    background-color: var(--button-background-color-hover);
    border-color: var(--button-border-color-hover);
    color: var(--button-text-color-hover);
  }

  /* The profile card acts like a button but we don't want the active styles to
   * apply to the card when we are active on the child button elements. */
  &:hover:active:not(:has(moz-button:hover:active)) {
    background-color: var(--button-background-color-active);
    border-color: var(--button-border-color-active);
    color: var(--button-text-color-active);
  }

  &:focus-visible {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
  }
}

.new-profile-card.profile-card {
  border: var(--border-width) dashed currentColor !important;

  .profile-background-image {
    background-size: 33%;
  }

  .profile-details {
    border-top: var(--border-width) dashed currentColor;;
  }
}

.profile-background-container {
  width: 200px;
  height: 136px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-background-image {
  width: 100%;
  height: 100%;
  background-image: url("chrome://global/skin/icons/plus.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  -moz-context-properties: fill, stroke;
  fill: currentColor;

  border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0;
}

.profile-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 49px;
  padding: 0 var(--space-large);
}
