/* LSS Reviews widget: styles.
   Colours are CSS variables: the "Thème" setting (light / dark, LS Agency gold and night blue) sets the header
   palette, the "Couleurs" settings override single values. Review cards stay white in both themes, like Google. */

.lss-rv-wrap {
  /* Header (light theme values; the theme setting rewrites them) */
  --rv-accent: #0D0F1B;
  --rv-link: #0D0F1B;
  --rv-bar: var(--wd-primary-color, #F7D367);
  --rv-stars: #F2B705;
  --rv-text: #4B4F5E;
  --rv-strong: #0D0F1B;
  --rv-muted: #6B7080;
  --rv-track: #ECEEF3;
  /* Cards (Google look) */
  --rv-card-bg: #ffffff;
  --rv-card-border: #E8EAED;
  --rv-card-name: #202124;
  --rv-card-text: #3C4043;
  --rv-card-muted: #70757A;
  --rv-card-link: #0D0F1B;
  --rv-card-stars: #FBBC04;
  --rv-reply-bg: #F6F7F9;
  --rv-reply-accent: var(--wd-primary-color, #F7D367);
  /* LS Agency fonts (WoodMart theme variables first) */
  --rv-font-text: var(--wd-text-font, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
  --rv-font-title: var(--wd-title-font, 'Syne', system-ui, -apple-system, 'Segoe UI', sans-serif);

  width: 100%;
  font-family: var(--rv-font-text);
}

/* ── Header (note + stats) ── */
.lss-rv-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 36px;
}

/* Left: rating */
.lss-rv-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lss-rv-rating {
  font-family: var(--rv-font-title);
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  color: var(--rv-accent);
  letter-spacing: -0.03em;
}
.lss-rv-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lss-rv-stars {
  display: flex;
  gap: 2px;
  color: var(--rv-stars);
}
.lss-rv-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--rv-text);
}
.lss-rv-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--rv-link);
  text-decoration: underline;
  text-decoration-color: var(--rv-bar);
  text-underline-offset: 4px;
  transition: opacity .2s;
}
.lss-rv-link:hover {
  opacity: 0.8;
}

/* Right: stats */
.lss-rv-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lss-rv-stats-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--rv-text);
}
.lss-rv-stats-text strong {
  font-family: var(--rv-font-title);
  font-weight: 700;
  color: var(--rv-strong);
}
.lss-rv-stats-text p {
  margin: 0;
}

/* Bars */
.lss-rv-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lss-rv-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lss-rv-bar-label {
  width: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rv-muted);
  flex-shrink: 0;
}
.lss-rv-bar-track {
  flex: 1;
  height: 8px;
  background: var(--rv-track);
  border-radius: 100px;
  overflow: hidden;
}
.lss-rv-bar-fill {
  height: 100%;
  background-color: var(--rv-bar);
  border-radius: 100px;
  transition: width .6s ease;
  min-width: 2px;
}
.lss-rv-bar-percent {
  width: 36px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--rv-muted);
  flex-shrink: 0;
}

/* ── Carousel ── */
.lss-rv-carousel {
  position: relative;
}
.lss-rv-track {
  display: flex;
  gap: 20px;
  overflow: hidden;
  scroll-behavior: smooth;
}

/* Nav buttons - positioned on edges, overlapping cards */
.lss-rv-nav {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #E8EAED;
  box-shadow: 0 2px 8px rgba(13,15,27,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4B4F5E;
  transition: background .2s, box-shadow .2s, color .2s;
  z-index: 2;
}
.lss-rv-prev { left: -22px; }
.lss-rv-next { right: -22px; }
.lss-rv-nav:hover {
  background: #FFFBEF;
  box-shadow: 0 4px 12px rgba(13,15,27,.14);
  color: #0D0F1B;
}
.lss-rv-nav:focus-visible { outline: 2px solid var(--rv-reply-accent); outline-offset: 2px; }
.lss-rv-nav.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Review cards (Google look) ── */
.lss-rv-card {
  flex: 0 0 calc(33.333% - 14px);
  background: var(--rv-card-bg);
  border: 1px solid var(--rv-card-border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(60,64,67,.12), 0 1px 3px 1px rgba(60,64,67,.06);
}
.lss-rv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Avatar */
.lss-rv-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.lss-rv-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
}

.lss-rv-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.lss-rv-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--rv-card-name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lss-rv-card-date {
  font-size: 13px;
  color: var(--rv-card-muted);
}

.lss-rv-google-icon {
  flex-shrink: 0;
}

/* Stars + verified */
.lss-rv-card-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--rv-card-stars);
}
.lss-rv-verified {
  margin-left: 4px;
}

/* Review text */
.lss-rv-card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--rv-card-text);
  margin: 0;
}

/* "Read more / Read less" link (text clamped by the "max lines" settings).
   !important: the expanded text must win over the line clamp generated by Elementor,
   and the link must not inherit the theme / Elementor button styles. */
.lss-rv-card-text.is-expanded,
.lss-rv-reply-text.is-expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: none !important;
  overflow: visible !important;
}
.lss-rv-more {
  align-self: flex-start;
  margin: -6px 0 0 !important;
  padding: 2px 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  min-height: 0 !important;
  font: inherit;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: underline !important;
  text-decoration-color: var(--rv-reply-accent) !important;
  text-underline-offset: 3px;
  color: var(--rv-card-link) !important;
  cursor: pointer;
}
.lss-rv-more:hover { opacity: .8; }
.lss-rv-more:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lss-rv-more[hidden] { display: none !important; }
/* Expanded card: the other cards do not stretch to its height */
.lss-rv-track.has-expanded { align-items: flex-start; }

/* ── Owner reply (Google "Réponse du propriétaire") ── */
.lss-rv-reply {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
/* !important (like .lss-rv-more): the toggle must not inherit the theme / Elementor kit button styles,
   including their :hover and :focus states. */
.lss-rv-wrap .lss-rv-reply-toggle,
.lss-rv-wrap .lss-rv-reply-toggle:hover,
.lss-rv-wrap .lss-rv-reply-toggle:focus,
.lss-rv-wrap .lss-rv-reply-toggle:active {
  all: unset;
  box-sizing: border-box !important;
  align-self: flex-start;
  display: inline-flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  color: var(--rv-card-link) !important;
  cursor: pointer;
}
.lss-rv-wrap .lss-rv-reply-toggle:hover .lss-rv-reply-title { text-decoration: underline; text-decoration-color: var(--rv-reply-accent); text-underline-offset: 3px; }
.lss-rv-wrap .lss-rv-reply-toggle:focus-visible { outline: 2px solid currentColor !important; outline-offset: 2px; }
.lss-rv-reply-icon { flex-shrink: 0; color: var(--rv-card-muted); }
.lss-rv-reply-title { font-weight: 600 !important; }
.lss-rv-reply-date { color: var(--rv-card-muted); }
.lss-rv-reply-chevron { flex-shrink: 0; transition: transform .2s ease; }
.lss-rv-reply-toggle[aria-expanded="true"] .lss-rv-reply-chevron { transform: rotate(180deg); }
.lss-rv-reply-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--rv-reply-bg);
  border-left: 3px solid var(--rv-reply-accent);
  border-radius: 0 8px 8px 0;
}
.lss-rv-reply-body[hidden] { display: none !important; }
.lss-rv-reply-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--rv-card-text);
  margin: 0;
  white-space: pre-line;
}
.lss-rv-reply-body .lss-rv-more { margin: -4px 0 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .lss-rv-track { scroll-behavior: auto; }
  .lss-rv-bar-fill,
  .lss-rv-reply-chevron { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .lss-rv-card {
    flex: 0 0 calc(50% - 10px);
  }
}
@media (max-width: 768px) {
  .lss-rv-header {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .lss-rv-left {
    justify-content: center;
  }
  .lss-rv-rating {
    font-size: 56px;
  }
  .lss-rv-card {
    flex: 0 0 calc(100% - 0px);
  }
  .lss-rv-nav {
    display: none;
  }
  .lss-rv-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .lss-rv-card {
    scroll-snap-align: start;
  }
}

/* ── Trustindex list (Google shortcode) ── */
.lss-rv-trustindex {
    margin-top: 24px;
}

.lss-rv-trustindex--preview .lss-rv-ti-note {
    padding: 18px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.lss-rv-trustindex--preview .lss-rv-ti-note code {
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 5px;
    color: #334155;
    font-size: 12px;
}
