.favorite-chip {
  position: relative;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  color: #fff;
}

.favorite-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px 4px 2px 2px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  background: linear-gradient(90deg, #7a78f6 0%, #5a6fd8 22%, #4d78d8 44%, #4b88df 62%, #4aa2ee 80%, #4ec0f7 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.favorite-chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #244b67 0%, #0f2e42 100%);
}

.favorite-icon {
  position: relative;
  z-index: 1;
  font-size: calc(20px * 1.05);
  line-height: 1;
  margin-top: 2px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.favorite-chip.is-favorite::before {
  background: linear-gradient(90deg, #7a78f6 0%, #5a6fd8 22%, #4d78d8 44%, #4b88df 62%, #4aa2ee 80%, #4ec0f7 100%);
}

.favorite-chip:focus-visible {
  outline: 2px solid #2f80ed;
  outline-offset: 2px;
}

.result-card__header {
  position: relative;
  align-items: flex-start;
  padding-right: 44px;
}

.result-card__header .favorite-chip {
  position: absolute;
  top: -20px;
  right: 0;
  margin: 0;
}

.modal-header {
  position: relative;
}

.modal-header .modal-favorite-chip {
  position: absolute;
  top: -5px;
  right: 48px;
  margin: 0;
}

.rid-modal .modal-header .modal-title,
.nioktr-modal .modal-header .modal-title {
  max-width: calc(100% - 30px);
}
