/* Store rating: the floating tab, its slide-in panel, and the compact trust badge.
   (template-parts/snippets/dpl-review-tab.php, dpl-reviews-trust.php). Subtle, in the shop's tokens. */

.dpl-rating-stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.dpl-rating-stars__base { color: #E5E5E5; }
.dpl-rating-stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #FF9A01; }

/* --- The tab --------------------------------------------------------------------------------- */
.dpl-review-tab {
  position: fixed;
  z-index: 900; /* under the contact buttons (9000), the cookie banner and every modal */
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0 24px;
  height: 60px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #0D0D0D;
  font: inherit;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition: opacity 0.2s ease;
}
.dpl-review-tab .dpl-rating-stars { font-size: 19px; }
.dpl-review-tab__count { color: #6B6B6B; font-weight: 400; }
.dpl-review-tab:focus-visible { outline: 2px solid #0D0D0D; outline-offset: 3px; }
.dpl-review-tab.is-stepping-aside { opacity: 0; pointer-events: none; }
.dpl-consent-open .dpl-review-tab,
.overflow-hidden .dpl-review-tab,
.overflow-hidden-mobile .dpl-review-tab,
.overflow-hidden-tablet .dpl-review-tab,
.dpl-review-panel-open .dpl-review-tab { opacity: 0; pointer-events: none; }

/* Desktop and tablet: a tab on the right edge, halfway down, turned on its side (it reads top to
   bottom). The contact buttons sit in the bottom-right corner, well below it. */
@media screen and (min-width: 768px) {
  .dpl-review-tab {
    right: 0;
    top: 50%;
    transform-origin: 100% 0;
    transform: rotate(90deg) translateX(50%);
    border-top: 0;
    border-radius: 0 0 20px 20px;
  }
}

/* Phone: in the bottom-right corner, just above the contact buttons (48 px high, 16 px from the
   bottom), so the two never touch. */
@media screen and (max-width: 767px) {
  .dpl-review-tab { right: 16px; bottom: 76px; border-radius: 20px; padding: 0 20px; }
}

/* --- The panel ------------------------------------------------------------------------------- */
.dpl-review-panel { position: fixed; inset: 0; z-index: 9300; }
.dpl-review-panel[hidden] { display: none; }
.dpl-review-panel .dpl-review-panel__overlay { display: block; /* two classes: Dawn hides empty divs with div:empty (base.css), which outranks one */ position: absolute; inset: 0; background: rgba(13, 13, 13, 0.45); opacity: 0; transition: opacity 0.25s ease; }
.dpl-review-panel.is-open .dpl-review-panel__overlay { opacity: 1; }
.dpl-review-panel__sheet {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #FFFFFF;
  color: #0D0D0D;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  transition: transform 0.25s ease;
}
@media screen and (min-width: 768px) {
  .dpl-review-panel__sheet { left: 0; top: 0; bottom: 0; width: min(440px, 92vw); border-radius: 0 20px 20px 0; transform: translateX(-100%); }
}
@media screen and (max-width: 767px) {
  .dpl-review-panel__sheet { left: 0; right: 0; bottom: 0; max-height: 86vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
}
.dpl-review-panel.is-open .dpl-review-panel__sheet { transform: none; }

.dpl-review-panel__head { position: relative; padding-right: 44px; }
.dpl-review-panel__title { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.dpl-review-panel__close {
  position: absolute; top: -6px; right: -6px; width: 44px; height: 44px;
  border: 1px solid #E5E5E5; border-radius: 50%; background: #FFFFFF; color: #0D0D0D;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.dpl-review-panel__summary { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: #6B6B6B; }
.dpl-review-panel__summary .dpl-rating-stars { font-size: 16px; }
.dpl-review-panel__avg { font-weight: 500; color: #0D0D0D; }

.dpl-review-panel__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dpl-review-panel__item { background: #F7F7F7; border: 1px solid #E5E5E5; border-radius: 20px; padding: 16px 18px; }
.dpl-review-panel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; margin-bottom: 8px; }
.dpl-review-panel__author { font-weight: 500; }
.dpl-review-panel__verified, .dpl-review-panel__date { color: #6B6B6B; }
.dpl-review-panel__date { flex-basis: 100%; }
.dpl-review-panel__text { font-size: 14px; line-height: 1.55; }
.dpl-review-panel__text p { margin: 0 0 8px; }
.dpl-review-panel__text p:last-child { margin-bottom: 0; }
.dpl-review-panel__text.is-clamped {
  max-height: 6.2em; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.dpl-review-panel__more { margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: #0D0D0D; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dpl-review-panel__photos { display: flex; gap: 8px; margin-top: 10px; }
.dpl-review-panel__photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 20px; display: block; }
.dpl-review-panel__incentive { margin: 8px 0 0; font-size: 12px; color: #6B6B6B; }
.dpl-review-panel__all { align-self: stretch; text-align: center; }

/* --- The compact trust badge ----------------------------------------------------------------- */
.dpl-reviews-trust {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: inherit; text-decoration: none;
}
.dpl-reviews-trust:hover .dpl-reviews-trust__label { text-decoration: underline; text-underline-offset: 3px; }
.dpl-reviews-trust .dpl-rating-stars { font-size: 14px; }
.dpl-reviews-trust__avg { font-weight: 500; }
.dpl-reviews-trust__label { color: inherit; opacity: 0.8; }
.dpl-reviews-trust--product { margin-top: 12px; }
.dpl-reviews-trust--cart { margin-top: 12px; justify-content: center; width: 100%; }
.dpl-reviews-trust--footer { margin: 0 0 12px; }

/* --- The large trust badge under the hero (sections/dpl-reviews-trust-hero.php) --------------- */
.dpl-hero-trust-wrap { display: flex; justify-content: center; padding-top: 24px; padding-bottom: 8px; }
.dpl-hero-trust {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 12px 28px; min-height: 64px; box-sizing: border-box;
  border-radius: 20px; background: #0D0D0D; color: #FFFFFF; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.dpl-hero-trust:hover .dpl-hero-trust__count { text-decoration: underline; text-underline-offset: 4px; }
.dpl-hero-trust:focus-visible { outline: 2px solid #FF9A01; outline-offset: 3px; }
.dpl-hero-trust__brand { display: flex; flex-direction: column; line-height: 1.1; }
.dpl-hero-trust__name { font-size: 17px; font-weight: 500; letter-spacing: 0.01em; }
.dpl-hero-trust__sub { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; margin-top: 3px; }
.dpl-hero-trust__sep { align-self: stretch; width: 1px; background: rgba(255, 255, 255, 0.35); }
.dpl-hero-trust__avg { font-size: 30px; font-weight: 400; line-height: 1; }
.dpl-hero-trust .dpl-rating-stars { font-size: 28px; letter-spacing: 2px; }
.dpl-hero-trust .dpl-rating-stars__base { color: rgba(255, 255, 255, 0.28); }
.dpl-hero-trust__count { font-size: 16px; opacity: 0.9; }
@media screen and (max-width: 767px) {
  .dpl-hero-trust-wrap { padding-top: 16px; }
  .dpl-hero-trust { gap: 10px; padding: 10px 16px; min-height: 52px; }
  .dpl-hero-trust__brand, .dpl-hero-trust__sep { display: none; }
  .dpl-hero-trust__avg { font-size: 22px; }
  .dpl-hero-trust .dpl-rating-stars { font-size: 20px; letter-spacing: 1px; }
  .dpl-hero-trust__count { font-size: 13px; }
}
