/* The original Judge.me card styles are in carousel-source.css. This only
   replaces its translated track with browser-native horizontal scrolling. */
.jdgm-cards-carousel[data-ap-carousel] .jdgm-cards-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.jdgm-cards-carousel[data-ap-carousel] .jdgm-cards-wrapper::-webkit-scrollbar { display: none; }
.jdgm-cards-carousel[data-ap-carousel] .jdgm-videos-container { transform: none !important; }
.jdgm-cards-carousel[data-ap-carousel] .jdgm-media-card { scroll-snap-align: start; }
.jdgm-cards-carousel[data-ap-carousel] .jdgm-media-card:focus-visible { outline: 2px solid #004aad; outline-offset: -2px; }
.jdgm-cards-carousel[data-ap-carousel] .jdgm-hidden { display: none !important; }
.ap-carousel-review {
  padding: 0;
  border: 0;
  border-radius: 8px;
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  background: white;
  color: #000;
}
.ap-carousel-review::backdrop { background: #0009; }
.ap-carousel-review > button { position: absolute; right: 8px; top: 8px; z-index: 1; background: white; border-radius: 50%; }
.ap-carousel-review-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 30px; }
.ap-carousel-review-content > img { width: 100%; max-height: 70dvh; object-fit: contain; align-self: center; }
.ap-carousel-review-content .jdgm-text p { white-space: normal; line-height: 1.5; }
.ap-carousel-review-content .jdgm-reviewer-name { display: block; font-weight: 600; }
.ap-carousel-review-content .jdgm-product-name { margin-top: 15px; }
.ap-carousel-review-content .jdgm-product-name a { color: inherit; }
@media (max-width: 600px) {
  .ap-carousel-review-content { grid-template-columns: 1fr; padding: 28px 20px 20px; gap: 15px; }
  .ap-carousel-review-content > img { max-height: 45dvh; }
}
/* Source carousel inherits normal line height; the legacy product-review CSS
   loaded elsewhere must not enlarge its stars and reviewer rows. */
.jdgm-cards-carousel[data-ap-carousel]{line-height:normal}
.jdgm-cards-carousel[data-ap-carousel] .jdgm-star{line-height:normal}
.jdgm-cards-carousel[data-ap-carousel] .jdgm-average-rating .jdgm-star{line-height:1}
/* These captured cards render immediately, even if a legacy widget state is
   restored by another theme stylesheet. Keep its reset styles inside the cards. */
.jdgm-cards-carousel[data-ap-carousel] { display: block !important; visibility: visible; }
.jdgm-cards-carousel[data-ap-carousel] :is(.jdgm-header,.jdgm-header-info,.jdgm-average-rating,.jdgm-stars,.jdgm-rating-text,.jdgm-rating-star,.jdgm-reviews-count,.jdgm-content,.jdgm-arrow,.jdgm-cards-wrapper,.jdgm-videos-container,.jdgm-media-card,.jdgm-rating-section,.jdgm-reviewer-info,.jdgm-reviewer-verified-icon,.jdgm-product-name,.jdgm-product-name a) { line-height: normal; }
