/* Buying quiz — Stack and Value. Scoped to .bq-* so it cannot leak into
 * the rest of the theme. Inherits the theme's fonts and colours, so it
 * follows the site's dark mode instead of forcing a light background.
 * No animations and no transitions anywhere in this file, so
 * prefers-reduced-motion needs no override beyond the one below. */

.bq-quiz {
  box-sizing: border-box;
  margin: 1.5em 0;
}

.bq-quiz *,
.bq-quiz *::before,
.bq-quiz *::after {
  box-sizing: inherit;
}

.bq-fieldset {
  border: 1px solid;
  border-radius: 8px;
  margin: 0 0 1em;
  padding: 1em;
}

.bq-legend {
  font-weight: 700;
  padding: 0 0.4em;
}

.bq-option {
  display: block;
  line-height: 1.5;
  margin: 0.45em 0;
  cursor: pointer;
}

.bq-option input {
  margin-right: 0.5em;
  accent-color: currentColor;
}

/* Visible keyboard focus, in both light and dark mode. */
.bq-quiz a:focus-visible,
.bq-quiz button:focus-visible,
.bq-quiz input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.bq-button {
  display: inline-block;
  border: 1px solid;
  border-radius: 6px;
  padding: 0.6em 1.2em;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.bq-link {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bq-error {
  font-weight: 700;
}

.bq-result {
  margin-top: 1.5em;
}

.bq-result:empty {
  margin-top: 0;
}

.bq-result-title {
  margin-top: 0;
}

.bq-result-price {
  font-weight: 700;
}

.bq-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  align-items: center;
}

.bq-noscript {
  border: 1px solid;
  border-radius: 8px;
  padding: 1em;
  margin: 1.5em 0;
}

.bq-noscript h2 {
  margin-top: 0;
}

/* Small screens: full-width submit button, no horizontal overflow. */
@media (max-width: 600px) {
  .bq-quiz form .bq-button {
    width: 100%;
    text-align: center;
  }
}

/* Belt and braces: nothing here should ever move on its own. */
@media (prefers-reduced-motion: reduce) {
  .bq-quiz *,
  .bq-quiz *::before,
  .bq-quiz *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
