.rh-replacement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-block-end: 20px;
  padding: 12px 14px;
  border: 1px solid var(--rh-line, #eae2f1);
  border-inline-start: 3px solid var(--rh-brass, #c9a17b);
  border-radius: 16px;
  background: linear-gradient(110deg, var(--rh-warm-soft, #fff7ef), #faf7fd);
}

.rh-replacement-notice {
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rh-replacement-notice p {
  margin: 0;
  color: var(--rh-ink, #303741);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rh-replacement-icon,
.rh-replacement-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 13px;
}

.rh-replacement-icon {
  background: #f6e9dc;
  color: #795236;
}

.rh-replacement-link {
  --rh-replacement-thumb-size: 64px;
  display: grid;
  flex: 1 1 320px;
  grid-template-columns: var(--rh-replacement-thumb-size) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 560px;
  padding: 7px 10px 7px 7px;
  border: 1px solid var(--rh-line, #eae2f1);
  border-radius: 12px;
  background: #fff;
  color: var(--rh-ink, #303741);
  text-decoration: none;
}

.rh-replacement-thumb {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: var(--rh-replacement-thumb-size);
  height: var(--rh-replacement-thumb-size);
  overflow: hidden;
  border: 1px solid #eee8f3;
  border-radius: 8px;
  background: #fff;
  color: var(--rh-muted, #666e78);
  font-size: 20px;
}

.rh-replacement-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rh-replacement-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rh-replacement-label {
  color: var(--rh-muted, #666e78);
  font-size: 12px;
  line-height: 1.35;
}

.rh-replacement-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.rh-replacement-arrow {
  background: #f2edf7;
  color: var(--rh-accent, #76619a);
}

.rh-replacement-link:hover,
.rh-replacement-link:focus-visible {
  border-color: var(--rh-accent, #76619a);
  color: var(--rh-ink, #303741);
}

.rh-replacement-link:is(:hover, :focus-visible) .rh-replacement-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rh-replacement-arrow:dir(rtl) i {
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .rh-replacement {
    gap: 10px;
    padding: 10px;
  }

  .rh-replacement-link {
    --rh-replacement-thumb-size: 54px;
    flex-basis: 100%;
    gap: 9px;
    max-width: none;
  }

  .rh-replacement-icon,
  .rh-replacement-arrow {
    width: 28px;
    height: 28px;
  }
}
