/* HerCar Live Patch v67
   - Sold by HerCar cards match the vertical Cars for Sale card language
   - wide landscape image on top, content below
   - preserve 4 initial outcomes on desktop / 2 on mobile
   - shared links open details first with an obvious video CTA
*/

/* Share control */
.car-img,.sold-image-frame{position:relative}
.hc-share-button{
  position:absolute;z-index:8;top:12px;right:12px;
  display:grid;place-items:center;width:38px;height:38px;padding:0;
  border:1px solid rgba(20,20,22,.12);border-radius:50%;
  background:rgba(255,255,255,.95);color:#111216;
  box-shadow:0 7px 18px rgba(0,0,0,.13);cursor:pointer;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.hc-share-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hc-share-button:hover{transform:translateY(-2px);background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.hc-share-button:focus-visible{outline:3px solid rgba(237,28,36,.25);outline-offset:2px}
.car-card .tag{z-index:9}

/* Sold by HerCar — same visual rhythm as Cars for Sale: vertical card,
   landscape photo first, information below. */
.sold-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch;
}
.sold-card,
.sold-card.has-customer-story{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(0,0,0,.03)!important;
  cursor:pointer;
}
.sold-card>.sold-image-frame,
.sold-card.has-customer-story>.sold-image-frame{
  position:relative!important;
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:16/9!important;
  overflow:hidden!important;
  background:#f4f6f7!important;
  isolation:isolate;
}
.sold-card>.sold-image-frame>img,
.sold-card.has-customer-story>.sold-image-frame>img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-width:none!important;
  object-fit:contain!important;
  object-position:50% 50%!important;
  transform-origin:50% 50%;
  will-change:transform;
}
.sold-card>.sold-content,
.sold-card.has-customer-story>.sold-content{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  min-width:0!important;
  padding:15px 15px 13px!important;
}
.sold-card .sold-pill{align-self:flex-start}
.sold-card .sold-content h3{margin:8px 0 6px!important;font-size:.93rem!important;line-height:1.18!important}
.sold-card .sold-content .meta{font-size:.75rem!important;line-height:1.42!important;min-height:2.1em}
.sold-card .uplift{
  margin-top:auto!important;
  padding-top:12px!important;
  border-top:1px solid var(--line)!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:8px!important;
}
.sold-card .uplift span{font-size:.71rem!important;line-height:1.3!important;color:#6c6f76}
.sold-card .uplift b{font-size:.93rem!important;line-height:1.2!important;text-align:right;color:var(--red)}
.sold-card .sold-video-cta,
.sold-card.has-customer-story .sold-video-cta{
  flex:0 0 auto!important;
  width:calc(100% - 24px)!important;
  min-height:43px!important;
  margin:0 12px 12px!important;
  border-radius:12px!important;
}

/* Progressive reveal must win over all card layout rules. */
.sold-card.progressive-card-hidden{display:none!important}
.sold-grid:not(.progressive-ready)>.sold-card:nth-child(n+5){display:none!important}

/* Video CTA inside information windows: prominent and close to the title/result. */
.hc-modal-video-cta.hc-modal-video-primary{
  display:flex;
  width:100%;
  min-height:48px;
  margin:14px 0 16px;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid #f51f2a!important;
  border-radius:13px!important;
  background:#f51f2a!important;
  color:#fff!important;
  box-shadow:0 9px 20px rgba(245,31,42,.18);
  font-weight:900;
}
.hc-modal-video-cta.hc-modal-video-primary:hover{background:#db111d!important;border-color:#db111d!important;transform:translateY(-1px)}
.hc-modal-video-cta[hidden]{display:none!important}
.hc-modal-video-cta.hc-shared-video-focus{animation:hcSharedVideoPulse 1.15s ease 2}
.hc-shared-video-hint{margin:-8px 0 14px;color:#666a72;font-size:.76rem;font-weight:650;text-align:center}
@keyframes hcSharedVideoPulse{0%,100%{box-shadow:0 9px 20px rgba(245,31,42,.18)}50%{box-shadow:0 0 0 7px rgba(245,31,42,.12),0 12px 28px rgba(245,31,42,.24)}}

/* Modal share actions */
.modal-actions .hc-modal-share{white-space:nowrap}

/* Desktop fallback share menu */
.hc-share-menu[hidden]{display:none!important}
.hc-share-menu{
  position:fixed;inset:0;z-index:2500;display:grid;place-items:center;
  padding:20px;background:rgba(12,12,14,.48);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)
}
.hc-share-menu-card{width:min(100%,360px);padding:18px;border:1px solid rgba(255,255,255,.22);border-radius:20px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.24)}
.hc-share-menu-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;padding:0 2px 8px}
.hc-share-menu-head strong{font-size:1.05rem}
.hc-share-menu-close{width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:#fff;font-size:1.2rem;cursor:pointer}
.hc-share-option{width:100%;display:flex;align-items:center;gap:12px;margin-top:8px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:#fafafa;color:#111;font:inherit;font-weight:850;text-align:left;cursor:pointer;transition:.16s}
.hc-share-option:hover{border-color:#d9d9dc;background:#f3f3f4;transform:translateY(-1px)}
.hc-share-option>span:first-child{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#111;color:#fff;font-weight:950}
.hc-share-copy-status{min-height:18px;margin-top:10px;color:#5d6067;font-size:.76rem;text-align:center}

@media(max-width:820px){
  .sold-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:650px){
  .hc-share-button{top:10px;right:10px;width:36px;height:36px}
  .sold-grid{grid-template-columns:1fr!important;gap:18px!important}
  .sold-grid:not(.progressive-ready)>.sold-card:nth-child(n+3){display:none!important}
  .sold-card,.sold-card.has-customer-story{border-radius:20px!important}
  .sold-card>.sold-image-frame,.sold-card.has-customer-story>.sold-image-frame{aspect-ratio:16/9!important;min-height:0!important;height:auto!important}
  .sold-card>.sold-content,.sold-card.has-customer-story>.sold-content{padding:15px 15px 13px!important}
  .sold-card .sold-content h3{font-size:1rem!important}
  .sold-card .sold-content .meta{font-size:.79rem!important;min-height:0}
  .sold-card .sold-video-cta,.sold-card.has-customer-story .sold-video-cta{width:calc(100% - 28px)!important;min-height:48px!important;margin:0 14px 14px!important;border-radius:13px!important;font-size:.84rem!important}
  .modal-actions{flex-wrap:wrap}
  .modal-actions .hc-modal-share{width:100%}
}
