/* =============================================================
   Sneak Peek – retailer preview popup, [sneak_peek_embed result_mode="popup"]
   Self-contained. Every rule is scoped under .spp, and every element sets
   its own margins, borders and colours, so theme and Elementor kit styles
   for headings, buttons and tables cannot reach in.

   Colours, type and spacing from Figma design context, first read 11
   November 2026 and, for v1 (2.3.0), from the WORKING section read 12
   November 2026: RETAILERS_Preview (5287:23743), RETAILERS_Loading State
   (5287:16531), the failure state (5287:18310), the chart hover
   (5287:25771), the tooltip (5287:27804) and the phone frames (5287:33381,
   5287:33708, 5287:34060). Copy and behaviour: SPEC-v1-implementation.md.

   The header and the footer with the report button stay on screen at
   every size, and the content scrolls between them: the phone frame's
   sticky footer, which the designer extended to desktop.
   ============================================================= */

/* ---- The dialog and the dimmed page behind it ---- */
.spp,
.spp *,
.spp *::before,
.spp *::after {
  box-sizing: border-box;
}

/* A fixed size, the design's 799px or the screen if shorter, so moving between
   loading, preview and the other states never resizes the popup */
.spp {
  width: 1137px;
  height: 799px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #F9FAFB;
  box-shadow: none;
  color: #344054;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.43;
  overflow: hidden;
}
.spp::backdrop {
  background: rgba(16, 24, 40, 0.7);
}
.spp [hidden] {
  display: none !important;
}

/* The page behind stays still while the popup is open */
html:has(.spp[open]) {
  overflow: hidden;
}

/* Header, scrolling body, footer */
.spp .spp-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.spp:focus,
.spp .spp-modal:focus {
  outline: none;
}

/* ---- Header bar: 68px, title at 23,21 ---- */
.spp .spp-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 0 24px 0 23px;
  border-bottom: 1px solid #EAECF0;
  background: #FFFFFF;
}
.spp .spp-title {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 23px;
  letter-spacing: 0;
  color: #101828;
  text-transform: none;
}
/* An outlined 26px square holding the 10px cross */
.spp .spp-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: none;
  cursor: pointer;
  min-height: 0;
}
.spp .spp-close:hover,
.spp .spp-close:focus {
  background: #F9FAFB;
  box-shadow: none;
}
.spp .spp-close:focus-visible {
  outline: 2px solid #E94F38;
  outline-offset: 1px;
}
.spp .spp-close img {
  display: block;
}

/* "Based on recent market data", 10px left of the close button: 12px italic, Grey 400 */
.spp .spp-header__end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}
.spp .spp-header__line {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  line-height: 16px;
  color: #98A2B3;
  white-space: nowrap;
}

/* Loading, failure and no data: no header, only the close button in its usual place, and
   the content centred in the whole popup (RETAILERS_Loading State 5287:16531, the
   failure state 5287:18310) */
.spp[data-spp-state="loading"] .spp-header,
.spp[data-spp-state="error"] .spp-header,
.spp[data-spp-state="nodata"] .spp-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  justify-content: flex-end;
  border-bottom-color: transparent;
  background: none;
}
.spp[data-spp-state="loading"] .spp-title,
.spp[data-spp-state="error"] .spp-title,
.spp[data-spp-state="nodata"] .spp-title {
  display: none;
}

/* ---- Body: the only part that scrolls ---- */
.spp .spp-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 25px 24px 24px 23px;
  overflow: auto;
  overscroll-behavior: contain;
}
.spp .js-spp-preview,
.spp .spp-preview {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

.spp p {
  margin: 0;
  padding: 0;
}
.spp img {
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
}

/* ---- Loading: an 80px arc, 64px above the two lines ---- */
.spp .spp-loading {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}
.spp .spp-spinner {
  display: block;
  margin: 0 0 64px;
  animation: spp-spin 0.9s linear infinite;
}
@keyframes spp-spin {
  to { transform: rotate(360deg); }
}
.spp .spp-loading__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #344054;
}
.spp .spp-loading__text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: #667085;
}

/* ---- Key finding: 34px bold headline, recommendation 20px below ---- */
.spp .spp-finding {
  max-width: 1090px;
}
.spp .spp-finding__headline {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: #344054;
}
.spp .spp-highlight {
  font-weight: inherit;
  color: #E94F38;
}
.spp .spp-finding__rec {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #98A2B3;
}

/* ---- Summary metrics: three white panels, 14px apart, 103px tall ---- */
.spp .spp-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 21px;
}
.spp .spp-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 103px;
  padding: 18px;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #FFFFFF;
}
.spp .spp-metric__value {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: #344054;
}
.spp .spp-metric__label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #98A2B3;
}

/* ---- Tooltip icon and bubble ---- */
.spp .spp-tip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  cursor: help;
  min-height: 0;
  line-height: 0;
}
.spp .spp-tip:hover,
.spp .spp-tip:focus {
  background: none;
  box-shadow: none;
}
.spp .spp-tip:focus-visible {
  outline: 2px solid #E94F38;
  outline-offset: 2px;
}
/* Grey 700, 10px padding, 415px of text; the arrow points at the icon */
.spp .spp-tip__bubble {
  position: fixed;
  z-index: 2;
  max-width: min(435px, calc(100vw - 16px));
  padding: 10px;
  border-radius: 8px;
  background: #344054;
  color: #FCFCFC;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: none;
  pointer-events: none;
}
.spp .spp-tip__arrow {
  position: absolute;
  top: 100%;
  margin-top: -1px;
  transform: translateX(-50%) scaleY(-1);
}
.spp .spp-tip__bubble.is-below .spp-tip__arrow {
  top: auto;
  bottom: 100%;
  margin: 0 0 -1px;
  transform: translateX(-50%);
}

/* ---- Widgets: 514 and 558 wide, 301 tall, 18px apart ---- */
.spp .spp-widgets {
  display: flex;
  gap: 18px;
  margin-top: 15px;
}
.spp .spp-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 301px;
  padding: 18px;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #FFFFFF;
}
.spp .spp-widget--groups {
  flex: 514 1 0;
}
.spp .spp-widget--competitors {
  flex: 558 1 0;
}
.spp .spp-widget__head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.spp .spp-widget__title {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0;
  color: #344054;
  text-transform: none;
}

/* Price groups: chart 41px under the title, legend 48px beside it */
.spp .spp-groups {
  display: flex;
  align-items: center;
  gap: 48px;
  margin: 41px 0 21px;
}
/* The open gauge: 173 x 141, a 16px ring with rounded segment ends */
.spp .spp-gauge {
  position: relative;
  flex: 0 0 173px;
  width: 173px;
  height: 141px;
}
.spp .spp-gauge__chart {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.spp .spp-gauge__arc {
  cursor: pointer;
  transition: stroke-width 0.15s ease;
}
.spp .spp-gauge__arc.is-active {
  stroke-width: 19px;
}
/* The total in the middle. It must never catch the pointer: in 2.2.4 the donut's total
   lay over the whole chart and the hover never reached a segment (dev-tests/pointer.mjs). */
.spp .spp-gauge__total {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
}
.spp .spp-gauge__number {
  font-size: 27px;
  font-weight: 700;
  line-height: 36px;
  color: #344054;
}
.spp .spp-gauge__label {
  max-width: 99px;
  font-size: 16px;
  line-height: 23px;
  color: #667085;
}

.spp .spp-legend {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* 16px rows, 16px apart. Each row is a button that shows its group in the gauge. */
.spp .spp-legend__row {
  margin: 0;
  padding: 0;
  list-style: none;
}
.spp .spp-legend__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 8px 6px; /* 16px rows, 32px apart, as in the frame */
  border: 0;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.spp .spp-legend__btn:hover,
.spp .spp-legend__btn:focus,
.spp .spp-legend__row.is-active .spp-legend__btn {
  background: #F2F4F7;
  color: inherit;
  box-shadow: none;
}
.spp .spp-legend__btn:focus-visible {
  outline: 2px solid #475467;
  outline-offset: 1px;
}
/* At least 44px to tap on a touch screen (spec, section 6) */
@media (pointer: coarse) {
  .spp .spp-legend__btn {
    min-height: 44px;
  }
}
.spp .spp-legend__row::before,
.spp .spp-legend__row::marker {
  content: none;
}
.spp .spp-legend__swatch {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.spp .spp-legend__label {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: #344054;
}
.spp .spp-legend__value {
  flex: 0 0 auto;
  min-width: 97px;
  font-weight: 400;
  color: #98A2B3;
  text-align: right;
  white-space: nowrap;
}
/* A locked row: the padlock alone, centred in the value column, as in the frame */
.spp .spp-legend__value.spp-locked {
  justify-content: center;
}

/* ---- Chart hover bubble: white, 8px padding, a 9px dot ---- */
.spp .spp-arc-tip {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 4px 8px rgba(16, 24, 40, 0.12);
  font-size: 14px;
  line-height: 27px;
  white-space: nowrap;
  pointer-events: none;
}
.spp .spp-arc-tip__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.spp .spp-arc-tip__label {
  font-weight: 600;
  color: #344054;
}
.spp .spp-arc-tip__value,
.spp .spp-arc-tip__locked {
  color: #98A2B3;
}

/* ---- Locked values and rows ----
   Deliberate, styled content, never an empty cell: a padlock where the number
   would be, and a closing row under a divider in each widget. */
.spp .spp-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.spp .spp-locked img {
  display: block;
}
.spp .spp-locked-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid #EAECF0;
  font-size: 13.5px;
  line-height: normal;
  color: #98A2B3;
}
.spp .spp-widget--groups .spp-locked-row {
  padding-top: 21px;
}
.spp .spp-widget--competitors .spp-locked-row {
  padding-top: 16px;
}
.spp .spp-locked-row img {
  display: block;
  flex: 0 0 auto;
}
.spp .spp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Biggest competitors: 26px under the title; one rule under the header row */
.spp .spp-widget--competitors .spp-table {
  width: 100%;
  margin: 26px 0 16px;
  border: 0;
  border-collapse: collapse;
  background: none;
}
.spp .spp-table th,
.spp .spp-table td {
  padding: 6px 0 0;
  border: 0;
  background: none;
  vertical-align: middle;
}
.spp .spp-table th {
  padding: 0 0 16px;
  border-bottom: 1px solid #EAECF0;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #667085;
  text-align: center;
}
/* Hello Elementor's reset draws a grey rule above a table's first header row
   (table thead:first-child tr:first-child th, border-block-start), which outranks
   the rule above. The frames have none: only the light rule under the titles. */
.spp .spp-table thead:first-child tr:first-child th {
  border-top: 0;
  border-block-start: 0;
}
.spp .spp-table th:first-child,
.spp .spp-table td:first-child {
  text-align: left;
}
.spp .spp-table td {
  height: 44px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #475467;
  text-align: center;
}
.spp .spp-table tbody tr,
.spp .spp-table tbody tr td {
  border: 0;
  background: none;
}
.spp .spp-vendor {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.spp .spp-vendor__icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
}
.spp .spp-vendor__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.spp .spp-vendor__name {
  overflow: hidden;
  font-weight: 500;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The phone layout's subline; the column carries it on wider screens */
.spp .spp-vendor__matched {
  display: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: #98A2B3;
  white-space: nowrap;
}

/* The highlighted index container, 64px wide. No arrow until the direction is verified. */
.spp .spp-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 64px;
  padding: 8px;
  border-radius: 4px;
  background: #F2F4F7;
  font-weight: 400;
  color: #101828;
  white-space: nowrap;
}
.spp .spp-index.is-up::after,
.spp .spp-index.is-down::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.spp .spp-index.is-up::after {
  border-bottom: 6px solid currentColor;
}
.spp .spp-index.is-down::after {
  border-top: 6px solid currentColor;
}

/* ---- Footer: always on screen below the body. White, with the phone frame's
   upward shadow; title and line left, button right. ---- */
.spp .spp-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 24px 18px 23px;
  border-top: 1px solid #EAECF0;
  background: #FFFFFF;
  box-shadow: 0 -4px 36px rgba(102, 112, 133, 0.12);
}
.spp .spp-footer__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: #344054;
}
.spp .spp-footer__text {
  margin-top: 14px;
  font-size: 14px;
  line-height: normal;
  color: #98A2B3;
}

/* Buttons: 44px, 8px radius, 14px semibold */
.spp .spp-cta,
.spp .spp-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin: 0;
  padding: 0 10px 0 19px;
  border: 0;
  border-radius: 8px;
  background: #E94F38;
  box-shadow: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  min-height: 0;
  transition: background-color 0.15s ease;
}
.spp .spp-cta:hover,
.spp .spp-cta:focus {
  background: #D94030;
  color: #FFFFFF;
  box-shadow: none;
}
.spp .spp-cta__chevron {
  display: block;
  flex: 0 0 auto;
  transform: rotate(-90deg);
}
.spp .spp-btn--secondary {
  padding: 0 18px;
  border: 1px solid #EAECF0;
  background: #FFFFFF;
  color: #344054;
}
.spp .spp-btn--secondary:hover,
.spp .spp-btn--secondary:focus {
  background: #F9FAFB;
  color: #344054;
  box-shadow: none;
}
.spp .spp-cta:focus-visible,
.spp .spp-btn:focus-visible,
.spp .spp-back:focus-visible {
  outline: 2px solid #101828;
  outline-offset: 2px;
}

/* ---- Failure states, report form and confirmation ----
   Failure and no data from RETAILERS_Failure/no-data (5287:18310): a 412px
   centred column, the button 28px below the text. The form's layout is held
   (see NEXT-STEPS.md); it keeps the single column until that is decided. */
.spp .spp-fail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 412px;
  margin: auto;
  padding: 48px 0;
  text-align: center;
}
.spp .spp-fail__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #344054;
}
.spp .spp-fail__text {
  margin: -22px 0 0; /* 6px under the title, inside the 28px column gap */
  font-size: 14px;
  line-height: 20px;
  color: #667085;
}
.spp .spp-fail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.spp .spp-report__problem {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #E94F38;
  border-radius: 8px;
  background: #FFFFFF;
  font-size: 14px;
  line-height: 20px;
  color: #C23A26;
}
.spp .spp-report__problem p {
  margin: 0;
}
.spp .spp-report__problem p + p {
  margin-top: 6px;
  color: #475467;
}
.spp .spp-report__problem .spp-btn {
  margin-top: 12px;
}
/* A widget with nothing to draw (partial data) */
.spp .spp-widget__empty {
  margin: 41px 0 21px;
  padding: 24px 0;
  font-size: 14px;
  line-height: 20px;
  color: #667085;
  text-align: center;
}
/* An explicit width: in the body's flex column, auto side margins alone shrink a block to
   its content, and HubSpot's form iframe then falls back to the browser's default 300px,
   narrow enough for HubSpot to stack first and last name. RETAILERS_Form_2's 511px column
   still holds HubSpot's 500px fieldsets with both name fields side by side. */
.spp .spp-report,
.spp .spp-done {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}
.spp .spp-report {
  max-width: 511px;
  padding: 26px 0 40px;
}
.spp .spp-hubspot iframe {
  width: 100% !important;
  max-width: 100%;
}
.spp .spp-done__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #344054;
}
.spp .spp-done__text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: #667085;
}
/* RETAILERS_Form_2 (5287:21910): 34px headline, the body 20px under it, the checkmarks
   14px under that, the form 28px below */
.spp .spp-report__title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.23;
  color: #101828;
}
.spp .spp-report__text {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.58;
  color: #475467;
}
.spp .spp-report__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 17px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.spp .spp-report__checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #475467;
  list-style: none;
}
.spp .spp-report__checks li::before,
.spp .spp-report__checks li::marker {
  content: none;
}
.spp .spp-hubspot {
  margin-top: 28px;
  min-height: 120px;
}
/* The form's way back, in the header row where the title would be: a chevron and an
   underlined 14px label */
.spp .spp-back {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #475467;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: underline;
  cursor: pointer;
}
.spp .spp-back__chevron {
  transform: rotate(90deg);
}
.spp .spp-back:hover,
.spp .spp-back:focus {
  background: none;
  color: #E94F38;
  box-shadow: none;
}
/* The form state: no title bar, the back link left and the close button right */
.spp[data-spp-state="form"] .spp-title {
  display: none;
}
.spp[data-spp-state="form"] .spp-header {
  border-bottom-color: transparent;
  background: none;
}
.spp .spp-done {
  margin: auto;
  padding: 24px 0;
  text-align: center;
}
.spp .spp-done .spp-btn {
  margin-top: 24px;
}

/* =============================================================
   Between phone and the design's width the widgets stack. No frame
   covers this range; it is this file's own arrangement.
   ============================================================= */
@media (max-width: 1000px) {
  .spp .spp-widgets {
    flex-direction: column;
  }
  .spp .spp-widget--groups,
  .spp .spp-widget--competitors {
    flex: 0 0 auto;
  }
}

/* =============================================================
   Phone, from Phone_view_full (5287:33381), the first screen (5287:33708)
   and Phone_view (5287:34060). A sheet starting 61px down, so
   the page's own navigation bar stays visible behind the dimming.
   ============================================================= */
@media (max-width: 767px) {
  .spp {
    --spp-top: 61px;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--spp-top));
    height: calc(100dvh - var(--spp-top));
    max-height: calc(100vh - var(--spp-top));
    max-height: calc(100dvh - var(--spp-top));
    margin: var(--spp-top) 0 0;
    border-width: 1px 0 0;
    border-radius: 8px 8px 0 0;
  }
  /* No bar: the close button at the top right, the title centred under it */
  .spp .spp-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: 0;
    padding: 15px 19px 16px;
    border-bottom: 0;
    background: none;
  }
  /* The close button stays top right; the header line sits to its left */
  .spp .spp-header__end {
    order: -1;
    justify-content: flex-end;
  }
  .spp .spp-title {
    text-align: center;
  }
  .spp .spp-body {
    padding: 0 20px 24px;
  }
  .spp .spp-finding__headline {
    font-size: 24px;
  }
  .spp .spp-finding__rec {
    margin-top: 12px;
    font-size: 14px;
  }
  /* Stacked, centred panels, 8px apart */
  .spp .spp-metrics {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .spp .spp-metric {
    align-items: center;
    text-align: center;
  }
  .spp .spp-metric__label {
    justify-content: center;
  }
  .spp .spp-widgets {
    gap: 14px;
    margin-top: 11px;
  }
  .spp .spp-widget {
    min-height: 0;
  }
  /* Chart above the legend; the legend 252px wide, centred */
  .spp .spp-groups {
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin: 41px 0 18px;
  }
  .spp .spp-legend {
    width: 100%;
    max-width: 252px;
  }
  .spp .spp-widget--groups .spp-locked-row {
    padding-top: 18px;
  }
  /* Two columns: the matched count moves under the vendor's name */
  .spp .spp-table .spp-table__matches {
    display: none;
  }
  .spp .spp-vendor {
    align-items: flex-start;
  }
  .spp .spp-vendor__matched {
    display: block;
  }
  .spp .spp-table td {
    height: auto;
    padding-bottom: 0;
  }
  .spp .spp-table th:last-child,
  .spp .spp-table td:last-child {
    width: 114px;
  }
  .spp .spp-widget--competitors .spp-table {
    margin-bottom: 16px;
  }
  /* The footer stacks: title, line, then the button at its own width */
  .spp .spp-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 17px 30px calc(24px + env(safe-area-inset-bottom, 0px));
    border-top: 0;
    border-radius: 8px 8px 0 0;
  }
  .spp .spp-footer__text {
    margin-top: 8px;
  }
  /* The form (Phone_view_form_mobile 5297:9287): back and close on one row */
  .spp[data-spp-state="form"] .spp-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .spp[data-spp-state="form"] .spp-header__end {
    order: 0;
  }
  .spp .spp-report {
    padding-top: 8px;
  }
  .spp .spp-report__title {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spp * {
    transition: none !important;
  }
  .spp .spp-spinner {
    animation-duration: 2.4s;
  }
}

/* =============================================================
   Brand preview (Phase 3), from BRANDS_Preview (5287:34565) and the
   reseller hover (5287:42434). Everything else is the Retailer
   preview's: metrics, widget panels, tooltips, locked rows, footer.
   ============================================================= */
.spp .spp-finding__prefix {
  font-weight: inherit;
}
.spp .spp-widget--resellers {
  flex: 514 1 0;
}
.spp .spp-widget--changes {
  flex: 558 1 0;
}

/* Reseller landscape: a name column, then bars over a light grid with
   the product-count axis under them */
.spp .spp-bars {
  --spp-name: 150px;
  --spp-ticks: 6;
  margin: 26px 0 21px;
}
.spp .spp-bars__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.spp .spp-bars__row {
  margin: 0;
  padding: 0;
}
.spp .spp-bars__btn {
  display: grid;
  grid-template-columns: var(--spp-name) minmax(0, 1fr);
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: default;
}
.spp .spp-bars__btn:hover,
.spp .spp-bars__btn:focus {
  background: none;
  box-shadow: none;
  color: inherit;
}
.spp .spp-bars__btn:focus-visible {
  outline: 2px solid #E94F38;
  outline-offset: 2px;
}
.spp .spp-bars__name {
  overflow: hidden;
  padding-right: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 48px;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spp .spp-bars__track {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border-left: 1px solid #EAECF0;
  background-image: linear-gradient(to left, #EAECF0 1px, transparent 1px);
  background-size: calc(100% / var(--spp-ticks)) 100%;
  background-position: right top;
}
.spp .spp-bars__bar {
  display: block;
  min-width: 2px;
  height: 12px;
  border-radius: 0 2px 2px 0;
  background: #344054;
}
.spp .spp-bars__row.is-active .spp-bars__bar {
  background: #1D2939;
}
.spp .spp-bars__axis {
  position: relative;
  height: 20px;
  margin-left: var(--spp-name);
  border-top: 1px solid #EAECF0;
}
.spp .spp-bars__tick {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 12px;
  color: #98A2B3;
  white-space: nowrap;
}
.spp .spp-bars__tick:last-child {
  transform: translateX(-100%);
}
.spp .spp-bars__tick:first-child {
  transform: none;
}

/* Latest price changes: four columns, the product cut short with an ellipsis */
.spp .spp-widget--changes .spp-table {
  width: 100%;
  margin: 26px 0 16px;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: none;
}
.spp .spp-changes th,
.spp .spp-changes td {
  padding-right: 8px;
  text-align: left;
}
.spp .spp-changes th:last-child,
.spp .spp-changes td:last-child {
  padding-right: 0;
  text-align: right;
}
.spp .spp-changes__product {
  overflow: hidden;
  font-weight: 500;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Prices get the most room and wrap after the arrow only when still too long */
.spp .spp-changes th:nth-child(1) {
  width: 26%;
}
.spp .spp-changes th:nth-child(2) {
  width: 22%;
}
.spp .spp-changes th:nth-child(3) {
  width: 33%;
}
.spp .spp-changes__time {
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .spp .spp-widget--resellers,
  .spp .spp-widget--changes {
    flex: 0 0 auto;
  }
}
@media (max-width: 767px) {
  .spp .spp-bars {
    --spp-name: 96px;
    margin: 20px 0 18px;
  }
  .spp .spp-changes__time {
    display: none;
  }
  /* Three columns on a phone (no time) */
  .spp .spp-changes th:nth-child(1) {
    width: 30%;
  }
  .spp .spp-changes th:nth-child(2) {
    width: 28%;
  }
  .spp .spp-changes th:nth-child(3) {
    width: auto;
  }
}
