/* The header's button: its label and the quote's icon, with the count on the icon.
   The head's script sets the class and the count. */
.aqr-header-button.wp-element-button {
  display: inline-flex;
  gap: 0.625rem;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.aqr-header-button__icon {
  position: relative;
  display: block;
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
}

.aqr-header-button__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.aqr-has-quote .aqr-header-button__empty {
  display: none;
}

.aqr-has-quote .aqr-header-button__label::before {
  content: attr(data-filled);
}

.aqr-has-quote .aqr-header-button__icon::after {
  position: absolute;
  top: -0.375rem;
  right: -0.5rem;
  box-sizing: border-box;
  min-width: 1rem;
  height: 1rem;
  padding-inline: 0.1875rem;
  border-radius: 999px;
  background: var(--gds-color-accent, #3b79bd);
  color: var(--gds-color-on-accent, #fff);
  counter-reset: aqr-quote var(--aqr-quote-count, 0);
  content: counter(aqr-quote);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1rem;
  text-align: center;
}

/* The icon takes room from the logo, keeping the header's own margin. */
@media (width < 390px) {
  .header__main-inner:has(.aqr-header-button) .header__logo img {
    width: 104px;
    height: auto;
  }
}

/* The smallest phones: the longer label needs the icon's room. */
@media (width < 360px) {
  html:not(.aqr-has-quote) .aqr-header-button__icon {
    display: none;
  }
}
