/**
 * Retype [!ref] cards — keep long URL paths from blowing out layout on mobile.
 * Targets the reference-link block pattern (overlay anchor + path column).
 */

#retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) {
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  overflow: hidden;
}

#retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) > .flex.items-center.text-base-500 {
  min-width: 0;
  flex: 1 1 auto;
}

#retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) > .flex.items-center.text-base-500 .font-medium {
  overflow-wrap: anywhere;
}

#retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) > .text-xs {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

#retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) > .text-xs span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  #retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  #retype-content .mb-6.px-5.py-4.flex.justify-between.relative:has(> a.absolute.inset-0) > .text-xs {
    display: none;
  }
}
