/* CandyCards Reviews Carousel — carousel.css v1.0.1 */
/* Caricato SOLO nelle pagine che usano lo shortcode */

.ccr-carousel-wrap {
  --ccr-gap: 20px;
  --ccr-radius: 14px;
  --ccr-star-on: #00b67a;
  --ccr-star-off: rgba(255,255,255,.18);
  --ccr-text: rgba(255,255,255,.85);
  --ccr-muted: rgba(255,255,255,.45);
  --ccr-border: rgba(255,255,255,.08);
  --ccr-card-bg: rgba(255,255,255,.04);
  --ccr-btn-bg: rgba(255,255,255,.07);
  --ccr-btn-hover: rgba(255,255,255,.14);
  /* Defaults — sovrascritti da JS tramite data-attributes */
  --ccr-visible-desktop: 3;
  --ccr-visible-tablet: 2;
  --ccr-visible-mobile: 1;

  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: 52px;
}

/* Track scorrevole */
.ccr-track {
  display: flex;
  gap: var(--ccr-gap);
  transition: transform .42s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.ccr-track:active { cursor: grabbing; }

/* Card — larghezza calcolata dinamicamente via CSS variables */
.ccr-card {
  flex: 0 0 calc(
    (100% - var(--ccr-gap) * (var(--ccr-visible-desktop) - 1)) / var(--ccr-visible-desktop)
  );
  background: var(--ccr-card-bg);
  border: 1px solid var(--ccr-border);
  border-radius: var(--ccr-radius);
  padding: 24px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .25s, background .25s;
}

.ccr-card:hover {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
}

/* Stelle */
.ccr-stars { display: flex; gap: 3px; }
.ccr-star  { flex-shrink: 0; }

/* Titolo */
.ccr-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

/* Testo */
.ccr-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ccr-text);
  flex: 1;
}

/* Footer */
.ccr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.ccr-author {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ccr-date {
  font-size: 11.5px;
  color: var(--ccr-muted);
  white-space: nowrap;
}

/* Controlli */
.ccr-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
}

.ccr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ccr-border);
  background: var(--ccr-btn-bg);
  color: var(--ccr-text);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  padding: 0;
  line-height: 1;
}

.ccr-btn:hover {
  background: var(--ccr-btn-hover);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

.ccr-btn:disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

.ccr-btn:focus-visible {
  outline: 2px solid var(--ccr-star-on);
  outline-offset: 2px;
}

/* Dots */
.ccr-dots { display: flex; gap: 6px; align-items: center; }

.ccr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ccr-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .25s, transform .25s;
}

.ccr-dot.is-active {
  background: var(--ccr-star-on);
  transform: scale(1.4);
}

.ccr-dot:focus-visible {
  outline: 2px solid var(--ccr-star-on);
  outline-offset: 2px;
}

/* Link Trustpilot */
.ccr-tp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ccr-muted);
  text-decoration: none;
  transition: color .2s;
}

.ccr-tp-link:hover { color: #fff; }

.ccr-tp-logo {
  width: 80px;
  height: auto;
  color: var(--ccr-muted);
  flex-shrink: 0;
}

.ccr-tp-link:hover .ccr-tp-logo { color: #fff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 899px) {
  .ccr-card {
    flex: 0 0 calc(
      (100% - var(--ccr-gap) * (var(--ccr-visible-tablet) - 1)) / var(--ccr-visible-tablet)
    );
  }
}

@media (max-width: 579px) {
  .ccr-card {
    flex: 0 0 calc(
      (100% - var(--ccr-gap) * (var(--ccr-visible-mobile) - 1)) / var(--ccr-visible-mobile)
    );
  }
}
