/*
 * Price comparison widget ("How do we compare to others?").
 * Lives inside the booking summary sidebar; revealed by comparison-widget.js
 * on steps 4-5 only. Namespaced .gobox-cmpw-* to avoid form style collisions.
 */

.gobox-cmpw {
  margin-top: 18px;
}

/* Self-contained sizing so the widget renders identically on any host page */
.gobox-cmpw,
.gobox-cmpw *,
.gobox-cmpw *::before,
.gobox-cmpw *::after {
  box-sizing: border-box;
}

.gobox-cmpw__card {
  background: #ffffff;
  border: 1px solid #e6e3df;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.gobox-cmpw__heading {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #1a1a1a;
}

.gobox-cmpw__subline {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b6660;
}

.gobox-cmpw__compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.gobox-cmpw__slot {
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* gobox steel box — heights are volume-honest between variants (23.2 vs 17.4 m3) */
.gobox-cmpw__gobox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: repeating-linear-gradient(90deg, #fafafa 0px, #fafafa 10px, #ededed 10px, #ededed 12px);
  border: 2px solid #cfcac4;
  border-radius: 4px;
}

.gobox-cmpw__gobox--large {
  height: 150px;
}

.gobox-cmpw__gobox--medium {
  height: 112px;
}

.gobox-cmpw__logo {
  max-width: 70%;
  max-height: 26px;
  width: auto;
  height: auto;
}

.gobox-cmpw__wordmark {
  font-size: 18px;
  font-weight: 900;
  color: var(--gobox-red, #d92b2b);
}

.gobox-cmpw__gobox-label {
  font-size: 11px;
  font-weight: 700;
  color: #1a1a1a;
}

/* competitor stack — identical wooden boxes, bottom-up */
.gobox-cmpw__slot--stack {
  position: relative;
}

.gobox-cmpw__stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 4px;
}

.gobox-cmpw__wbox {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(0deg, #c9a06a 0px, #c9a06a 12px, #b8905c 12px, #b8905c 14px);
  border: 2px solid #a87f4e;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #5d452a;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gobox-cmpw__wbox.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Medium-only shortfall marker: dashed line at the gobox Medium's 17.4 m3 level */
.gobox-cmpw__target {
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 110px;
  border-top: 2px dashed var(--gobox-red, #d92b2b);
  z-index: 2;
  pointer-events: none;
}

.gobox-cmpw__target-label {
  position: absolute;
  right: 0;
  bottom: 13px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gobox-red, #d92b2b);
  white-space: nowrap;
}

.gobox-cmpw__target-chip {
  position: absolute;
  left: 4px;
  top: -9px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gobox-red, #d92b2b);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gobox-cmpw__target-chip.is-in {
  opacity: 1;
}

.gobox-cmpw__price {
  margin: 8px 0 0;
  text-align: center;
}

.gobox-cmpw__price strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  transition: color 0.3s ease;
}

.gobox-cmpw__price strong.is-final {
  color: var(--gobox-red, #d92b2b);
}

.gobox-cmpw__price span {
  font-size: 12px;
  color: #8a8a8a;
}

.gobox-cmpw__controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.gobox-cmpw__toggle {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid #e6e3df;
  border-radius: 8px;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
}

.gobox-cmpw__toggle:hover {
  color: #1a1a1a;
  border-color: #cfcac4;
}

.gobox-cmpw__verdict {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fdf1f1;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gobox-cmpw__verdict.is-in {
  opacity: 1;
}

.gobox-cmpw__verdict-lead {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.gobox-cmpw__verdict-lead em {
  font-style: normal;
  color: var(--gobox-red, #d92b2b);
}

.gobox-cmpw__verdict-body {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #6b6660;
}

.gobox-cmpw__footnote {
  margin: 12px 0 0;
  font-size: 11px;
  color: #8a8a8a;
}

/* Mobile: card is full-width of the stacked summary column, centered */
@media (max-width: 1220px) {
  .gobox-cmpw__card {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ---- Standalone page embed ([gobox_comparison_widget]) ---- */

.gobox-cmpw--standalone {
  max-width: 900px;
  margin: 0 auto;
}

.gobox-cmpw--standalone .gobox-cmpw__figure {
  margin: 0 0 28px;
}

.gobox-cmpw--standalone .gobox-cmpw__svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.gobox-cmpw--standalone .gobox-cmpw__pair-heading {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-align: center;
}

.gobox-cmpw--standalone .gobox-cmpw__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

/* Both cards always visible in standalone; cap width so they match the design */
.gobox-cmpw--standalone .gobox-cmpw__card {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 767px) {
  .gobox-cmpw--standalone .gobox-cmpw__pair {
    grid-template-columns: 1fr;
  }

  .gobox-cmpw--standalone .gobox-cmpw__pair-heading {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gobox-cmpw__wbox,
  .gobox-cmpw__target-chip,
  .gobox-cmpw__verdict,
  .gobox-cmpw__price strong {
    transition: none;
  }
}
