/*
 * Persona cards on the Personas page (1.3.0): the whole card opens the
 * persona. The persona's own words lead; its portrait sits in a corner
 * tinted with its colour (--bdk-persona-tint and --bdk-persona-mark, set on
 * each card from PersonaOverview::cardFace). Everything else stays in Build
 * Digital's ink, and the action in its magenta.
 */
.bdk-demo-card.bdk-demo-card--persona {
  position: relative;
  overflow: hidden;
  /* Cards in a row end together, so their actions line up. */
  align-self: stretch;
  min-height: 17.5rem;
  gap: 0.875rem;
  padding: 1.625rem 1.625rem 1.375rem;
  border: 1px solid var(--bdk-color-border-warm);
  border-radius: 0.25rem;
  background: var(--bdk-color-white);
  color: #57534F;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.bdk-demo-card--persona:hover {
  box-shadow: 0 0.5rem 1.375rem rgba(45, 41, 38, 0.1);
  transform: translateY(-2px);
}

/* The title and quote wrap around the tinted corner's curve, and widen
   below it. The corner floats into the card's top-right corner. */
.bdk-persona-card__head {
  display: flow-root;
}

.bdk-persona-card__corner {
  float: right;
  width: 9.25rem;
  height: 9.25rem;
  margin: -1.625rem -1.625rem 0 0.25rem;
  border-bottom-left-radius: 100%;
  background: var(--bdk-persona-tint, #F2EFEC);
  shape-margin: 0.625rem;
  shape-outside: circle(9.25rem at 100% 0) border-box;
  transform-origin: top right;
  transition: transform 0.2s ease;
}

.bdk-demo-card--persona:hover .bdk-persona-card__corner {
  transform: scale(1.06);
}

.bdk-persona-card__portrait {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 7rem;
  height: 7rem;
  pointer-events: none;
}

.bdk-client-demo--rbs .bdk-demo-card--persona .bdk-persona-card__title {
  margin: 0;
  color: var(--bdk-color-ink);
  font-family: var(--bdk-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.bdk-client-demo--rbs .bdk-persona-card__link,
.bdk-client-demo--rbs .bdk-persona-card__link:visited,
.bdk-client-demo--rbs .bdk-persona-card__link:hover {
  color: inherit;
  text-decoration: none;
}

/* One link, the whole card: its layer covers the card, so a click anywhere
   opens the persona while screen readers hear only the title. */
.bdk-persona-card__link::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
}

.bdk-persona-card__link:focus {
  outline: none;
}

.bdk-persona-card__link:focus-visible::after {
  outline: 3px solid var(--bdk-color-magenta);
  outline-offset: -3px;
}

.bdk-persona-card__quote {
  margin: 0.75rem 0 0;
  color: #3F3B38;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
}

.bdk-persona-card__mark {
  margin-right: 0.2rem;
  color: var(--bdk-persona-mark, var(--bdk-color-muted));
  font-family: var(--bdk-font-heading);
  font-size: 1.875rem;
  font-style: normal;
  line-height: 0;
  vertical-align: -0.6rem;
}

.bdk-persona-card__scenario {
  margin: 0;
  color: var(--bdk-color-meta);
  font-size: 0.875rem;
  line-height: 1.5;
}

.bdk-persona-card__tags {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
}

.bdk-persona-card__tags li {
  margin: 0;
  padding: 0.1875rem 0.5625rem;
  border: 1px solid var(--bdk-color-border);
  border-radius: 999px;
  color: #4F4B48;
  font-size: 0.75rem;
  line-height: 1.125rem;
}

.bdk-persona-card__action {
  display: inline-flex;
  margin-top: auto;
  align-self: flex-start;
  align-items: center;
  gap: 0.375rem;
  color: var(--bdk-color-magenta);
  font-size: 0.875rem;
  font-weight: 500;
}

.bdk-persona-card__action svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 0.15s ease;
}

.bdk-demo-card--persona:hover .bdk-persona-card__action {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.bdk-demo-card--persona:hover .bdk-persona-card__action svg {
  transform: translateX(3px);
}

@media (max-width: 40rem) {
  .bdk-demo-card.bdk-demo-card--persona {
    min-height: 0;
    padding: 1.25rem 1.25rem 1.125rem;
  }

  .bdk-persona-card__corner {
    width: 7.25rem;
    height: 7.25rem;
    margin: -1.25rem -1.25rem 0 0.25rem;
    shape-outside: circle(7.25rem at 100% 0) border-box;
  }

  .bdk-persona-card__portrait {
    top: 0.5rem;
    right: 0.5rem;
    width: 5.5rem;
    height: 5.5rem;
  }

  .bdk-client-demo--rbs .bdk-demo-card--persona .bdk-persona-card__title {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bdk-demo-card.bdk-demo-card--persona,
  .bdk-persona-card__corner,
  .bdk-persona-card__action svg {
    transition: none;
  }

  .bdk-demo-card--persona:hover {
    transform: none;
  }
}
