/*
  BRK Link / Information Card
  Public class: .brk-link-card
  Legacy alias: .tools-link-card

  Default art: hud_location_bg2.png
  Selected art: brk_selected_bg.jpg, alpha-masked to the default panel shape.
*/

:is(.brk-link-card, .tools-link-card) {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: var(--brk-link-card-height, 156px);
  padding: var(--brk-link-card-padding, 20px);
  flex-direction: column;
  gap: 10px;
  color: #eadfca;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

:is(.brk-link-card, .tools-link-card)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../../assets/ui/hud_location_bg2.png') center / 100% 100% no-repeat;
  opacity: .92;
}

:is(.brk-link-card, .tools-link-card):is(:hover, :focus-visible, :active, .is-focused) {
  filter: brightness(1.16);
  transform: translateY(-2px);
  outline: none;
}

:is(.brk-link-card, .tools-link-card):is(:hover, :focus-visible, :active, .is-focused)::before {
  background-image: url('../../assets/ui/brk_selected_bg.jpg');
  background-position: center var(--brk-link-card-focus-y, 42%);
  background-size: 100% auto;
  -webkit-mask-image: url('../../assets/ui/hud_location_bg2.png');
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: url('../../assets/ui/hud_location_bg2.png');
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

:is(.brk-link-card, .tools-link-card) strong {
  color: #f2e8d0;
  font-family: var(--font-title);
  font-size: 1.05rem;
}

:is(.brk-link-card, .tools-link-card) span {
  color: rgba(242, 232, 208, .72);
  line-height: 1.55;
}

:is(.brk-link-card, .tools-link-card) small {
  margin-top: auto;
  color: rgba(213, 75, 60, .92);
  letter-spacing: .04em;
}

.brk-link-card.compact {
  --brk-link-card-height: 126px;
  --brk-link-card-padding: 16px 18px;
}

.brk-link-card.wide {
  --brk-link-card-height: 174px;
  --brk-link-card-padding: 24px;
}

/* Documentation actions keep their footer text neutral instead of using the
   directory card's muted-red external-link treatment. */
:is(.doc-config-checker-action, .doc-support-action, .doc-integration-action, .doc-useful-link-action) small {
  color: rgba(235, 226, 207, .82);
}

/* Integration cards state availability and cost, so their footer takes the
   same gold the dependency badges use. Same specificity as the rule above, so
   it has to stay after it. */
.doc-integration-action small {
  color: rgba(229, 190, 112, .94);
}
