/*
 * parades_list.css (renamed from mercat_highlight_section.css)
 */

.mercat-highlights{
  --mh-gap: 3px;
  --mh-inset: 12px;
  --mh-card-w: 75vw;
  --mh-radius: 16px;
}

.mh-scroller-root{ position: relative; }

.mh-scroller{
  width: 100vw;
  margin-left: calc(-1 * (100vw - 100%) / 2);
  margin-right: calc(-1 * (100vw - 100%) / 2);
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: var(--mh-inset);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.mh-scroller::-webkit-scrollbar{ display: none; }

.mercat-highlights .mh-scroller{
  padding-inline-start: var(--mh-inset) !important;
  padding-inline-end: 0 !important;
  scroll-padding-inline: var(--mh-inset) !important;
  box-sizing: border-box !important;
}

.mh-track{
  display: flex;
  gap: var(--mh-gap);
  padding-block: 6px 18px;
  align-items: stretch;
}

.mercat-highlights .mh-track::after{
  content: '';
  flex: 0 0 var(--mh-inset);
  margin-left: calc(var(--mh-gap) * -1);
  width: var(--mh-inset);
  height: 1px;
}

.mh-card{
  box-sizing: border-box;
  flex: 0 0 var(--mh-card-w);
  min-width: var(--mh-card-w);
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #fff);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 0.5px solid #b2bab1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  position: relative;
}

.mh-vendor-avatar {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 33.333%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.20);
  pointer-events: none;
}

.mh-img{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  position: relative;
  overflow: hidden;
}
.mh-img.img-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.12);
  border-top-color: #5B7065;
  animation: mh-spin 0.7s linear infinite;
  pointer-events: none;
}
@keyframes mh-spin {
  to { transform: rotate(360deg); }
}
.mh-img img:not(.mh-vendor-avatar){ width:100%; height:100%; object-fit: cover; display:block; }
.mh-meta{
  padding: 10px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.mh-meta > *{ margin:0; text-align:center; white-space:normal; overflow-wrap:break-word; }
.mh-name{ font-weight:600; font-size:.95rem; }
.mh-types{ padding:0; line-height:1.05; color:var(--muted-color,#6c757d); font-size:.85rem; }

.mh-track .mh-card:first-of-type{ border-top-left-radius: var(--mh-radius); border-bottom-left-radius: var(--mh-radius); }
.mh-track .mh-card:last-of-type{ border-top-right-radius: var(--mh-radius); border-bottom-right-radius: var(--mh-radius); }

.mh-indicators{ display:flex; justify-content:center; gap:8px; padding:8px 0 24px; }
.mh-status-wrapper{ position:absolute; top:8px; left:8px; z-index:3; display:flex; gap:4px; align-items:center; }
.mh-chip.mh-status{ display:inline-flex; align-items:center; justify-content:center; height:1.4em; padding:0 .45rem; border-radius:9999px; color:#fff; font-weight:500; font-size:.82rem; }
.mh-chip.mh-status.open{ background-color:#198754; border:1px solid #198754; }
.mh-chip.mh-status.closed{ background-color:#dc3545; border:1px solid #dc3545; }
.mh-indicator{
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  border: 0;
  padding: 0;
  line-height: 0;
  box-shadow: none;
  transition: width .18s ease, background .18s ease, border-radius .18s ease;
  vertical-align: middle;
  cursor: pointer;
}
.mh-indicator:focus{ outline: none; }
.mh-indicator:focus-visible{
  outline:3px solid color-mix(in srgb, var(--color-pine) 30%, #000);
  outline-offset:4px;
}
.mh-indicator.active{
  width:16px;
  height:6px;
  border-radius:3px;
  background: rgba(0,0,0,0.75);
}

/* When the highlights strip is used inside a dark `parada-highlight-strip` (parada.html)
   use light indicators for better contrast. */
.parada-highlight-strip .mh-indicators .mh-indicator{
  background: rgba(255,255,255,0.45);
}
.parada-highlight-strip .mh-indicators .mh-indicator.active{
  background: rgba(255,255,255,0.95);
}

@media (min-width:768px){
  .mercat-highlights{ --mh-card-w: min(75vw, 340px); }
  .mh-track{ gap:3px; }
}

.mh-scroller:focus{ outline: none; }
.mh-scroller:focus-visible{ outline: 2px solid rgba(0,128,0,0.12); }
.mh-track{ gap:3px; }
