/**
 * Tier Rating badge (#1813) — port of toolkit assets/css/tier-rating.css.
 * Same class names and `--hrtk-tier-*` theming API so a site's toolkit
 * overrides carry over. Inherits the host typography on purpose. Per-tier
 * tints arrive as inline custom properties on the badge root
 * (common/property-card/tier-rating.ts tierTintStyle).
 */

.hrtk-tier {
  display: inline-flex;
  max-width: 100%;
  margin: 6px 0 2px;
  vertical-align: middle;
  line-height: 1;
}

.hrtk-tier__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0;
  padding: 4px 10px 4px 9px;
  border: 1px solid var(--hrtk-tier-border, rgba(0, 0, 0, 0.14));
  border-radius: var(--hrtk-tier-radius, 999px);
  background: var(--hrtk-tier-bg, #f6f4ef);
  color: var(--hrtk-tier-fg, #1f1f1f);
  font: inherit;
  font-size: var(--hrtk-tier-font-size, 13px);
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

/* ── Disclosure trigger (popover on, #1821) ────────────────────── */

button.hrtk-tier__badge {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

button.hrtk-tier__badge:hover,
button.hrtk-tier__badge[aria-expanded="true"] {
  border-color: var(--hrtk-tier-fg, #1f1f1f);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

button.hrtk-tier__badge:focus {
  outline: none;
}

button.hrtk-tier__badge:focus-visible {
  outline: 2px solid var(--hrtk-tier-focus, #1f1f1f);
  outline-offset: 2px;
}

.hrtk-tier__info {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
}

.hrtk-tier__image {
  display: block;
  width: var(--hrtk-tier-image-size, 18px);
  height: var(--hrtk-tier-image-size, 18px);
  object-fit: contain;
}

.hrtk-tier__stars {
  display: inline-flex;
  gap: 1px;
  color: var(--hrtk-tier-star, #c9a227);
  font-size: 0.92em;
  line-height: 1;
  letter-spacing: 0;
}

.hrtk-tier__star {
  display: inline-block;
}

.hrtk-tier__label {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.hrtk-tier__label--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Image as the badge (display "image") ──────────────────────── */

/* The art carries the tier name: no pill, no border, just the image. */
.hrtk-tier--show-image .hrtk-tier__badge {
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.hrtk-tier--show-image button.hrtk-tier__badge:hover,
.hrtk-tier--show-image button.hrtk-tier__badge[aria-expanded="true"] {
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.hrtk-tier--show-image button.hrtk-tier__badge:focus-visible {
  outline: 2px solid var(--hrtk-tier-focus, #fff);
  outline-offset: 3px;
  border-radius: 4px;
}

.hrtk-tier--show-image .hrtk-tier__image {
  width: auto;
  height: var(--hrtk-tier-image-badge-size, 64px);
  max-width: 100%;
}

/* ── Over the photo (placement "media") ────────────────────────── */

/* Top-left over the photo, the toolkit's spot (.hfse-property-groups:
   top/left 6px). The slideshow (legacy card) and the media frame (shared
   templates) are the positioned ancestors. Decorative: never steals the
   click from the card link. On the shared templates the favorites heart
   owns the top-left 32px, so the badge drops below it. The disclosure
   button (#1821) is the one thing inside it that takes the pointer: it
   never navigates (TierPopover.tsx onClick). */
.hrtk-tier--media {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  margin: 0;
  pointer-events: none;
}

.hrtk-tier--media button.hrtk-tier__badge {
  pointer-events: auto;
}

/* Inside the legacy card's labels row the badge flows as its first item
   (toolkit: .hfse-property-groups > .hrtk-tier--media). */
.hfse-property-groups > .hrtk-tier--media {
  position: static;
  margin: 0 5px 5px 0;
  vertical-align: top;
}

.hr-property-card .hr-pc-media > .hrtk-tier--media {
  z-index: 2;
}

.hr-property-card .hr-pc-card:has(.hr-pc-fav) .hr-pc-media > .hrtk-tier--media {
  top: 50px;
  left: 10px;
}

/* The larger size is for the art-only badge; a pill keeps its 18px image. */
.hrtk-tier--media.hrtk-tier--show-image .hrtk-tier__image {
  height: var(--hrtk-tier-image-badge-size, 72px);
}

@media (max-width: 480px) {
  .hrtk-tier--media.hrtk-tier--show-image .hrtk-tier__image {
    height: var(--hrtk-tier-image-badge-size-mobile, 56px);
  }
}

/* ── Under the title ───────────────────────────────────────────── */

.hfse-property-body > .hrtk-tier,
.hr-pc-body > .hrtk-tier {
  display: inline-flex;
}

/* ── Popover (#1821, body-portaled; port of the toolkit popover) ─── */

/* Lives in widget-core's elevated shadow root at <body> (or at <body>
   itself on a shadow-less mount), never inside the card: position:fixed
   against the viewport, placed by TierPopover.tsx. */
.hrtk-tier-popover {
  position: fixed;
  z-index: 100000;
  box-sizing: border-box;
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow: auto;
  margin: 0;
  padding: 14px 16px 15px;
  border: 1px solid var(--hrtk-tier-popover-border, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
  background: var(--hrtk-tier-popover-bg, #fff);
  color: var(--hrtk-tier-popover-fg, #1f1f1f);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  box-shadow: var(--hrtk-tier-popover-shadow, 0 10px 30px rgba(0, 0, 0, 0.16));
}

/* Resolved widget theme, stamped by TierPopover.tsx (the portal root is a
   detached shadow host, so :host theming would not reach the popover). */
.hrtk-tier-popover[data-hr-theme="dark"] {
  --hrtk-tier-popover-bg: #1d2024;
  --hrtk-tier-popover-fg: #f3f3f3;
  --hrtk-tier-popover-border: rgba(255, 255, 255, 0.12);
  --hrtk-tier-popover-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hrtk-tier-popover p {
  margin: 0;
}

.hrtk-tier-popover__eyebrow {
  margin-bottom: 2px !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.hrtk-tier-popover__title {
  margin-bottom: 6px !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.hrtk-tier-popover__desc,
.hrtk-tier-popover__intro {
  margin-bottom: 8px !important;
}

.hrtk-tier-popover__intro {
  font-size: 13px;
  opacity: 0.85;
}

.hrtk-tier-popover__link {
  display: inline-block;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hrtk-tier-popover__link:hover,
.hrtk-tier-popover__link:focus-visible {
  text-decoration-thickness: 2px;
}

@media (max-width: 480px) {
  .hrtk-tier__badge {
    font-size: var(--hrtk-tier-font-size-mobile, 12px);
    padding: 3px 9px 3px 8px;
  }
}
/* ==========================================================================
   Shared explorer-look property card (TemplateExplorer)
   ==========================================================================
   Extracted verbatim from widgets/explorer/explorer.css so every consumer of
   the shared card (explorer, related-properties, property-card) can pull in
   just the card styles instead of the whole explorer stylesheet. Internal rule
   order is preserved: hk-* base utilities, then the card block, then the
   rating block (#2516), which intentionally overrides earlier card rules.
   explorer.css @imports this file at its top, so explorer output order keeps
   the base utilities first, exactly where they originally sat. */

/* UIKit-like base classes (hk-*) used by property cards */

.hk-flex { display: flex; }

.hk-flex-column { flex-direction: column; }

.hk-flex-between { justify-content: space-between; }

.hk-flex-middle { align-items: center; }

.hk-flex-top { align-items: flex-start; }

.hk-flex-center { justify-content: center; }

.hk-flex-auto { flex: 1 1 auto; min-width: 0; }

.hk-flex-none { flex: none; }

.hk-card {
  position: relative;
  box-sizing: border-box;
  transition: box-shadow 0.1s ease-in-out;
}

.hk-card-default {
  background: var(--hfse-card-bg, #fff);
  color: var(--hfse-card-fg, #666);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.hk-card-hover:hover {
  box-shadow: 0 14px 25px rgba(0, 0, 0, 0.16);
}

.hk-card-small .hk-card-body {
  padding: 15px 20px;
}

.hk-card-body {
  flex: 1 1 auto;
}

.hk-card-media-top {
  overflow: hidden;
}

.hk-card-media-top img {
  width: 100%;
  display: block;
}

.hk-link-toggle {
  text-decoration: none;
  color: inherit;
}

.hk-link-toggle:hover {
  text-decoration: none;
  color: inherit;
}

.hk-h5 {
  margin: 0 0 0;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}

.hk-margin-small-top { margin-top: 10px; }

.hk-margin-remove-first-child > :first-child { margin-top: 0; }

.hk-margin-small-bottom { margin-bottom: 10px; }

.hk-text-small { font-size: 0.875rem; }

.hk-position-relative { position: relative; }

.hk-position-center-left {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.hk-position-center-right {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.hk-position-small {
  margin: 10px;
}

.hk-position-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.hk-visible-toggle:not(:hover) .hk-hidden-hover {
  opacity: 0;
}

.hk-hidden-hover {
  transition: opacity 0.15s ease;
  cursor: pointer;
}

/* Dot navigation */

.hk-dotnav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 6px;
}

.hk-dotnav > li > a,
.hk-dotnav > li > button {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  text-indent: -9999px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
}

.hk-dotnav > li.hk-active > a,
.hk-dotnav > li:hover > a,
.hk-dotnav > li.hk-active > button,
.hk-dotnav > li:hover > button {
  background: #fff;
}

/* Slideshow nav arrows */

.hfse-property-slideshow-prev-btn,
.hfse-property-slideshow-next-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  z-index: 5;
}

.hfse-property-slideshow-prev-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  margin-left: 2px;
}

.hfse-property-slideshow-next-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(45deg);
  margin-right: 2px;
}

/* Explorer-specific dialog card overrides */

.hfse-form-modal {
  max-width: 520px;
}

.hfse-form-modal .hk-modal-body {
  overflow-y: auto;
}

/* ==========================================================================
   Property Card
   ========================================================================== */

.hfse-property-container {
  width: 100%;
  min-width: 0;
}

.hfse-property-card {
  width: 100%;
  height: 100%;
}

.hfse-property-body {
  flex-grow: 1;
}

.hfse-property-meta {
  padding: 0 20px;
}

.hfse-property-meta-primary {
  display: flex;
  margin-top: 10px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.hfse-property-meta-primary .hfse-property-locations,
.hfse-property-meta-primary .hfse-property-types {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  max-width: 80%;
  font-size: 13px;
  line-height: 16px;
  box-sizing: border-box;
  padding: 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hfse-property-meta-primary svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.hfse-property-meta-primary .hfse-property-locations {
  padding-right: 10px;
}

.hfse-property-meta-secondary {
  display: flex;
  margin-top: 10px;
  flex-wrap: nowrap;
  padding: 10px 0 15px;
  border-top: 1px solid var(--hfse-border, #eee);
  justify-content: space-between;
}

.hfse-property-meta-secondary .hfse-property-guests,
.hfse-property-meta-secondary .hfse-property-bedrooms,
.hfse-property-meta-secondary .hfse-property-bathrooms {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  font-size: 16px;
  line-height: 20px;
  box-sizing: border-box;
  padding: 4px 0;
}

.hfse-property-meta-secondary svg {
  flex-shrink: 0;
  opacity: 0.6;
  width: 20px;
  height: 20px;
}

.hfse-property-container {
  position: relative;
}

.hfse-property-slideshow-dotnav {
  margin-bottom: 12px;
}

.hfse-property-container .hk-dotnav > * > * {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Card tags (#1812, toolkit CardTags::css). The pills take the type slot,
   which explorer.css clips to one 24px line — the tag slot lifts that so the
   pills wrap; own-row (default) puts location and tags on two left-aligned
   rows, the toolkit's layout. Colours / radius / size ride inline per pill. */

.hfse-property-meta-primary .hfse-property-tags {
  height: auto;
  overflow: visible;
  white-space: normal;
  flex-wrap: wrap;
  gap: 6px;
  text-transform: none;
}

.hfse-property-meta-primary.hfse-card-tags-own-row {
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px 0;
}

.hfse-property-meta-primary.hfse-card-tags-own-row .hfse-property-locations {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 0;
}

.hfse-property-meta-primary.hfse-card-tags-own-row .hfse-property-tags {
  flex: 0 0 100%;
  max-width: 100%;
  justify-content: flex-start;
  margin-bottom: 4px;
}

.hfse-card-tag {
  display: inline-block;
  border: 1px solid;
  padding: 2px 10px;
  line-height: 1.5;
  white-space: nowrap;
}

/* Groups / Labels */

.hfse-property-groups, .hfse-property-favorite-toggle-btn {
  z-index: 10;
  position: absolute;
  width: auto !important;
}

.hfse-property-groups {
  top: 6px;
  left: 6px;
}

.hfse-property-group {
  color: #fff;
  padding: 3px 5px;
  margin: 0 5px 5px 0;
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.7);
}

/* Label Designer badges (#1069): inline style carries the cascade; this only
   lays out the optional icon. Unstyled legacy badge above is untouched. */

.hfse-property-group.hfse-label-styled {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: top;
}

.hfse-label-icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Overlay groups live inside .hk-card-media-top, whose `img { width: 100% }`
   (the photo rule) would stretch an icon <img> across its badge; the
   badge-scoped selector out-ranks it so icons stay 1em in both placements. */

.hfse-property-group .hfse-label-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
}

/* Icon recolor (#1370 slice 2; toolkit CssGenerator::build_icon_rule with
   recolor_icon): an .svg icon becomes a mask over currentColor, so it takes
   the badge text colour — set or auto-contrast. The mask URL is inline per
   badge (TemplateExplorer iconMaskStyle); the geometry lives here. */

.hfse-label-icon-tint {
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Icon-only (toolkit icon_only, font-size:0 on the badge). The text stays in
   the DOM — it is the card link's accessible name — but paints nothing; the
   absolute box leaves the inline-flex flow, so no gap is left beside the icon. */

.hfse-label-icon-only {
  position: relative;
}

.hfse-label-icon-only-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Label Designer overlay placement (#1370 slice 1; toolkit CssGenerator
   position / offset_x / offset_y). Overlay badges leave the top-left row and
   pin to a photo corner. The layer lives INSIDE .hfse-property-slideshow
   (position:relative with an explicit aspect-ratio — the box the toolkit's
   labels-frontend.js shim moves its row into), so bottom corners anchor to
   the photo, not to the card. Insets are inline per group (corner + offset);
   pointer-events:none keeps the slideshow arrows and dots clickable. */

.hfse-property-labels-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

.hfse-label-overlay-group {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
}

.hfse-label-overlay-top-right,
.hfse-label-overlay-bottom-right {
  justify-content: flex-end;
}

.hfse-label-overlay-bottom-left,
.hfse-label-overlay-bottom-right {
  flex-wrap: wrap-reverse;
}

/* The row's per-badge margin (0 5px 5px 0) would push right/bottom-anchored
   badges 5px off their offset; the group gap spaces them instead. */

.hfse-label-overlay-group .hfse-property-group {
  margin: 0;
}

/* Favorite button */

.hfse-property-favorite-toggle-btn {
  top: 10px;
  right: 10px;
}

.hfse-property-favorite-toggle-btn svg {
  color: white;
}

.hfse-property-favorite-toggle-btn svg > path {
  fill: white;
}

.hfse-property-favorite-toggle-btn.favorite svg {
  color: red;
}

.hfse-property-favorite-toggle-btn.favorite svg > * {
  fill: red;
}

/* Rating */

.hfse-property-rating {
  line-height: 20px;
}

.hfse-property-rating-icon polygon {
  fill: var(--hfse-foreground, #333);
  stroke: var(--hfse-foreground, #333) !important;
}

/* Price */

.hfse-property-price-container {
  font-size: 14px;
  color: var(--hfse-card-fg, #666);
}

.hfse-property-price strong {
  font-size: 16px;
  color: var(--hfse-foreground, #333);
}

.hfse-property-price-sep {
  margin: 0 2px;
}

.hfse-property-price-total {
  font-size: 13px;
}

.hfse-property-tax-note {
  font-size: 12px;
  color: var(--hfse-muted-foreground, #999);
}

.hfse-property-price del {
  color: var(--hfse-muted-foreground, #999);
  font-size: 13px;
  margin-right: 4px;
}

.hfse-property-price-loading svg {
  display: inline-block;
  vertical-align: middle;
}

/* "No dates available" (toolkit lowest-rate-availability): a label where a
   price would be, when the property has no bookable nights. */

.hfse-property-price-unavailable {
  opacity: 0.75;
}

.full-price-failed-text {
  color: var(--hfse-muted-foreground, #717171);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
}

.hfse-property-subtitle {
  font-size: 13px;
  color: var(--hfse-muted-foreground, #999);
  margin-top: 4px;
}

/* Favorite Button */

.hfse-property-container {
  position: relative;
}

.hfse-property-favorite-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.15s ease;
}

.hfse-property-favorite-toggle-btn:hover {
  transform: scale(1.15);
}

.hfse-property-favorite-toggle-btn.favorite {
  color: red;
}

.hfse-property-favorite-toggle-btn svg {
  display: block;
}

/* Slideshow */

.hfse-property-slideshow {
  overflow: hidden;
}

.hk-slideshow-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hfse-property-slideshow-item {
  list-style: none;
}

/* ---------- Property card rating (central #2516) ---------- */

.hfse-property-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    margin-left: 8px;
    font-size: 0.8125rem;
    color: var(--hfse-foreground, #333);
    white-space: nowrap;
}

.hfse-property-rating svg {
    color: #f5a623;
}

.hfse-property-rating-avg {
    font-weight: 700;
}

.hfse-property-rating-count {
    color: var(--hfse-muted-foreground, #999);
}
/* Related Properties widget — minimal layout that delegates card visuals to PropertyCard. */

.hr-related {
  font-family: inherit;
}

/* Grid layout — column counts driven by inline CSS variables in widget.tsx */
.hr-related-grid {
  display: grid;
  grid-template-columns: repeat(var(--hr-related-cols, 1), minmax(0, 1fr));
  gap: var(--hr-related-gap, 16px);
}

@media (min-width: 600px) {
  .hr-related-grid {
    grid-template-columns: repeat(var(--hr-related-cols-780, 2), minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .hr-related-grid {
    grid-template-columns: repeat(var(--hr-related-cols-960, 3), minmax(0, 1fr));
  }
}

/* Embla slider (shared ui/carousel mechanics — arrows, dots, autoplay, loop).
 * The card gap is emulated with a negative track inline-start margin plus
 * per-item inline-start padding. The negative margin widens the track to
 * W + gap, so a plain p% basis would render cards gap*(1-p) narrower than the
 * old scroll-snap layout (p% of W). Each basis compensates with +gap*(1-p),
 * which restores the exact legacy card widths: p*(W+gap) + gap*(1-p) - gap
 * padding = p*W.
 * Logical inline-start properties on purpose (#712): the shared carousel's
 * own utilities (`-ms-4`/`ps-4` on CarouselContent/CarouselItem) are logical
 * too as of #712, so matching logical properties here keep exactly one
 * offset in either direction. Mixing physical here with the shared
 * component's logical utilities would leave BOTH a left and an
 * inline-start offset active in RTL — the double-offset bug #712 exists to
 * avoid. */
.hr-related-slider {
  position: relative;
}

.hr-related .hr-related-carousel-content {
  margin-inline-start: calc(var(--hr-related-gap, 16px) * -1);
}

.hr-related .hr-related-slider-item {
  flex: 0 0 calc(85% + var(--hr-related-gap, 16px) * 0.15);
  min-width: 0;
  padding-inline-start: var(--hr-related-gap, 16px);
}

@media (min-width: 600px) {
  .hr-related .hr-related-slider-item {
    flex: 0 0 calc(45% + var(--hr-related-gap, 16px) * 0.55);
  }
}

@media (min-width: 960px) {
  .hr-related .hr-related-slider-item {
    flex: 0 0 calc(31% + var(--hr-related-gap, 16px) * 0.69);
  }
}

/* Loading skeleton — matches grid layout proportions */
.hr-related-skeleton {
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: hr-related-skeleton-pulse 1.5s ease-in-out infinite;
}

.hr-related.dark .hr-related-skeleton {
  background: linear-gradient(90deg, #222 0%, #2a2a2a 50%, #222 100%);
  background-size: 200% 100%;
}

/* Dark-mode skeleton — host-marker + auto first-paint variants (#900).
   Append-only siblings of the `.dark` rule above, reusing its exact values.
   `:host([data-hr-theme="dark"])` covers the runtime marker (explicit dark +
   post-hydration auto); the @media block repaints a server-stamped auto
   widget on a dark OS AT PARSE, dropped by `:not([data-hr-theme])` the instant
   the runtime stamps the marker at hydration. Both auto conditions stay
   INSIDE `:host(...)` — a `:not` after the parens silently never matches. */
:host([data-hr-theme="dark"]) .hr-related-skeleton {
  background: linear-gradient(90deg, #222 0%, #2a2a2a 50%, #222 100%);
  background-size: 200% 100%;
}

@media (prefers-color-scheme: dark) {
  :host([data-hr-scheme="auto"]:not([data-hr-theme])) .hr-related-skeleton {
    background: linear-gradient(90deg, #222 0%, #2a2a2a 50%, #222 100%);
    background-size: 200% 100%;
  }
}

@keyframes hr-related-skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.hr-related-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--hfse-muted-foreground, #999);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------------------
 * Section heading (shared across content widgets)
 * Bold title on the left + horizontal divider line filling remaining width.
 * -------------------------------------------------------------------------- */

.hr-widget-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.hr-widget-section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

.hr-widget-section-line {
  flex: 1;
  height: 1px;
  background-color: currentColor;
  opacity: 0.18;
  display: block;
}

@media (max-width: 640px) {
  .hr-widget-section-title { font-size: 1.25rem; }
  .hr-widget-section { gap: 1rem; margin-bottom: 1.5rem; }
}
