/* ============================================================
   Quest Report Slider  —  namespaced, brand-aware component
   All rules scoped under .qr-report so nothing leaks into, or
   is overridden by, the host theme.

   COLOUR:  everything accent-coloured is driven off --qr-primary.
     Resolution order (highest priority first):
       1. inline  style="--qr-primary:#xxx"  (shortcode primary="" attr)
       2. site-wide  :root { --qr-brand:#xxx; }   (set once per site)
       3. the built-in fallback below
   FONTS:  no font-family is declared anywhere, so the component
     inherits the host theme's fonts automatically.
   ============================================================ */

.qr-report {
  /* Brand accent — override via --qr-brand on :root, or primary="" attr */
  --qr-primary: var(--qr-brand, #1C7A55);

  /* Neutral palette (kept local so it never touches the theme) */
  --qr-ink:  #23272B;
  --qr-body: #4A5350;
  --qr-line: #DFE5E0;
  --qr-card: #FFFFFF;

  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 0 8px;
  color: var(--qr-ink);
  -webkit-font-smoothing: antialiased;
}
.qr-report *,
.qr-report *::before,
.qr-report *::after { box-sizing: border-box; }

/* ---- Optional header ---- */
.qr-header { text-align: center; margin-bottom: 40px; }
/* Scoped under .qr-report so the accent colour beats the theme's
   (and our own .qr-header p) more-specific paragraph rules. */
.qr-report .qr-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;                       /* solid brand pill, white text */
  background: var(--qr-primary);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.qr-header h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.qr-header p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--qr-body);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* ---- Layout ---- */
.qr-slider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
}

/* Left: media */
.qr-media { position: relative; min-width: 0; }
.qr-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--qr-card);
  border: 1px solid var(--qr-line);
  border-radius: 20px;
  box-shadow: 0 18px 40px -22px rgba(28, 60, 45, 0.28);
  touch-action: pan-y;
  cursor: grab;
  outline: none;
}
.qr-viewport.is-dragging { cursor: grabbing; }
.qr-viewport:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--qr-primary) 35%, transparent),
              0 18px 40px -22px rgba(28, 60, 45, 0.28);
}
.qr-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.qr-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.qr-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.qr-count {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qr-body);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--qr-line);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* Right: info */
.qr-info { min-width: 0; }
.qr-textwrap { transition: opacity 0.18s ease; }
.qr-textwrap.is-switching { opacity: 0; }
.qr-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.qr-title {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.qr-desc {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--qr-body);
  margin: 0;
}
@media (min-width: 861px) {
  .qr-report .qr-textwrap { min-height: 210px; }
}

/* ---- Controls (brand-coloured) ---- */
.qr-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}
.qr-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--qr-line);
  background: var(--qr-card);
  color: var(--qr-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease,
              opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.qr-arrow:hover:not(:disabled) {
  border-color: var(--qr-primary);
  color: var(--qr-primary);
  box-shadow: 0 6px 16px -6px rgba(28, 60, 45, 0.35);
  transform: translateY(-1px);
}
.qr-arrow:disabled { opacity: 0.35; cursor: default; }
.qr-arrow:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--qr-primary) 35%, transparent);
  outline-offset: 2px;
}
.qr-arrow svg { width: 18px; height: 18px; }

.qr-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qr-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: #C9D4CC;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.qr-dot:hover { background: #9FB3A6; }
.qr-dot[aria-current="true"] { width: 24px; background: var(--qr-primary); }
.qr-dot:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--qr-primary) 35%, transparent);
  outline-offset: 2px;
}

/* ---- Mobile: stack, text underneath ---- */
@media (max-width: 860px) {
  .qr-header { margin-bottom: 28px; }
  .qr-slider { grid-template-columns: 1fr; gap: 22px; }
  .qr-controls { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .qr-report .qr-track,
  .qr-report .qr-textwrap,
  .qr-report .qr-dot,
  .qr-report .qr-arrow { transition: none !important; }
}
