/* Similar tools + Featured rail (adf-listing-related.php).
   Desktop (>= 48em, the HivePress sm breakpoint): the sidebar copy shows.
   Phone: the copy under the Visit button shows. Never both. */
.adf-rail {
  margin: 0 0 1rem;
  padding: .85rem .85rem .6rem;
  border: 1px solid var(--adf-hairline, rgba(162, 189, 216, .16));
  border-radius: 12px;
  background: var(--adf-surface, rgba(255, 255, 255, .03));
  color: var(--adf-page-fg, #e8eef5);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.adf-rail--side { display: none; }
@media (min-width: 48em) {
  .adf-rail--side { display: block; }
  .adf-rail--main { display: none; }
}

.adf-rail .adf-rail__title,
.adf-rail .adf-rail__subtitle {
  margin: 0 0 .4rem;
  padding: 0;
  /* ai-background.css paints every heading with !important. */
  color: var(--adf-ink-muted, #95a8bd) !important;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.adf-rail .adf-rail__title::before,
.adf-rail .adf-rail__subtitle::before { display: none; }
.adf-rail__featured {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--adf-hairline, rgba(162, 189, 216, .16));
}
.adf-rail__featured:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.adf-rail .adf-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.adf-rail .adf-rail__list > li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.adf-rail .adf-rail__list > li::before,
.adf-rail .adf-rail__list > li::marker { content: none; }

/* The sponsored row reuses .adf-ad-unit for ROI tracking; drop the banner box. */
.adf-rail .adf-ad-unit.adf-rail__ad {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.adf-rail .adf-rail__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 52px;
  margin: 0 -.4rem;
  padding: .4rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  position: relative;
  min-width: 0;
}
.adf-rail .adf-rail__item:hover,
.adf-rail .adf-rail__item:focus-visible {
  background: var(--adf-neutral-wash-06, rgba(255, 255, 255, .06));
  text-decoration: none;
}
.adf-rail .adf-rail__item:focus-visible {
  outline: 2px solid var(--adf-cyan, #22d3ee);
  outline-offset: 1px;
}

.adf-rail .adf-rail__logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}
.adf-rail .adf-rail__logo--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--adf-surface-raised, #1c2a3b);
  color: var(--adf-cyan, #22d3ee);
  font-weight: 700;
  font-size: 1.05rem;
}

.adf-rail .adf-rail__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.adf-rail .adf-rail__top {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  min-width: 0;
}
.adf-rail .adf-rail__name {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  color: var(--adf-ink-strong, #f2f6fa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.adf-rail .adf-rail__price {
  flex: none;
  color: var(--adf-cyan, #22d3ee);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.adf-rail .adf-rail__desc {
  color: var(--adf-ink-body, #c3cfdc);
  font-size: .8rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.adf-rail .adf-rail__badge {
  flex: none;
  align-self: flex-start;
  padding: .1rem .4rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}
.adf-rail .adf-rail__badge--sponsored {
  border: 1px solid rgba(14, 165, 233, .45);
  color: var(--adf-ink-muted, #95a8bd);
}
.adf-rail .adf-rail__badge--tested {
  border: 1px solid var(--adf-state-ok, #34d399);
  color: var(--adf-state-ok, #34d399);
}

/* Sidebar: the column is narrow, so the section heading ("Sponsored" /
   "Tested by us") carries the label and the per-row badge is dropped. */
.adf-rail--side .adf-rail__badge { display: none; }
.adf-rail .adf-rail__featured--sponsored .adf-rail__subtitle { color: var(--adf-link, #7dd3fc) !important; }
.adf-rail .adf-rail__featured--tested .adf-rail__subtitle { color: var(--adf-state-ok, #34d399) !important; }

/* Phone: three similar tools keep the rail short; the Visit button stays above. */
@media (max-width: 47.99em) {
  .adf-rail--main { margin: .75rem 0 1rem; }
  .adf-rail--main .adf-rail__list > li:nth-child(n+4) { display: none; }
  .adf-rail--main .adf-rail__item { min-height: 56px; }
}
