.gbpr-product-mode[hidden] {
  display: none !important;
}

.gbpr-product-mode {
  margin-block: 0.5rem 1rem;
}

.gbpr-product-mode__availability {
  margin-block-end: 0.5rem;
  color: var(--bs-success, #198754);
  font-size: 1rem;
}

.gbpr-product-mode__price {
  margin-block-end: 0.75rem;
  color: var(--bs-body-color, #212529);
  font-size: 1.5rem;
  line-height: 1.2;
}

.gbpr-product-mode__button {
  max-width: 100%;
  white-space: normal;
}

/* CE's quantity widget is independent from its server-rendered cart widget. */
html.gbpr-request-product .ce-product-quantity {
  display: none !important;
}

@supports selector(html:has(*)) {
  html:has(.gbpr-product-mode[data-gbpr-can-buy="0"]:not([hidden])) .ce-product-quantity {
    display: none !important;
  }
}

/* Avoid repeating the same BACKORDER availability beside CE's stock widget. */
html.gbpr-has-product-availability .gbpr-product-mode__availability {
  display: none;
}

@supports selector(html:has(*)) {
  html:has(.ce-product-stock__availability) .gbpr-product-mode__availability {
    display: none;
  }
}

html.gbpr-modal-open {
  overflow: hidden;
}

.gbpr-inline {
  width: 100%;
  max-width: 760px;
  color: var(--bs-body-color, #212529);
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 0.75rem;
}

.gbpr-inline__panel {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.gbpr-inline .gbpr-modal__title {
  margin-inline-end: 0;
}

.gbpr-inline .gbpr-modal__success {
  min-height: 18rem;
}

.gbpr-modal {
  position: fixed;
  inset: 0;
  width: min(92vw, 620px);
  max-width: 620px;
  max-height: min(90vh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--bs-body-color, #212529);
  background: #fff;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 28%);
  z-index: 2147483000;
}

.gbpr-modal:not([open]) {
  display: none;
}

.gbpr-modal::backdrop {
  background: rgb(0 0 0 / 58%);
  backdrop-filter: blur(2px);
}

.gbpr-modal__panel {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.gbpr-modal__close {
  position: absolute;
  inset-block-start: 0.65rem;
  inset-inline-end: 0.75rem;
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
  color: #5f6368;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gbpr-modal__close:hover,
.gbpr-modal__close:focus-visible {
  color: #111;
  background: #f0f1f2;
}

.gbpr-modal__title {
  margin: 0 3rem 0.5rem 0;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.gbpr-modal__intro {
  margin: 0 0 1rem;
  color: #5f6368;
}

.gbpr-modal__product {
  display: grid;
  gap: 0.2rem;
  margin-block-end: 1.25rem;
  padding: 0.85rem 1rem;
  background: #f6f7f8;
  border-radius: 0.5rem;
}

.gbpr-modal__product strong {
  font-size: 1rem;
  line-height: 1.35;
}

.gbpr-modal__reference {
  color: #5f6368;
  font-size: 0.9rem;
}

.gbpr-form {
  display: grid;
  gap: 1rem;
}

.gbpr-form__field {
  display: grid;
  gap: 0.35rem;
}

.gbpr-form__field > label {
  margin: 0;
  font-weight: 600;
}

.gbpr-form__captcha-label {
  font-weight: 600;
}

.gbpr-form__captcha {
  width: 100%;
  min-height: 65px;
  overflow: hidden;
  border-radius: 0.25rem;
}

.gbpr-form__field--invalid .gbpr-form__captcha {
  outline: 2px solid var(--bs-danger, #dc3545);
  outline-offset: 0.2rem;
}

.gbpr-form__captcha iframe {
  max-width: 100%;
}

.gbpr-form .form-control {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  color: inherit;
  background: #fff;
  border: 1px solid #b8bdc3;
  border-radius: 0.35rem;
}

.gbpr-form textarea.form-control {
  min-height: 7rem;
  resize: vertical;
}

.gbpr-form .form-control:focus {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 0.2rem rgb(13 110 253 / 18%);
  outline: 0;
}

.gbpr-form__field--invalid .form-control,
.gbpr-form__field--invalid .gbpr-form__consent input {
  border-color: var(--bs-danger, #dc3545);
}

.gbpr-form__field-error {
  min-height: 1em;
  color: var(--bs-danger, #b02a37);
  font-size: 0.85rem;
}

.gbpr-form__notice {
  margin-block-end: 1rem;
  padding: 0.75rem 0.9rem;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 0.35rem;
}

.gbpr-form__consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.gbpr-form__consent input {
  width: 1.15rem;
  height: 1.15rem;
  margin-block-start: 0.15rem;
  flex: 0 0 auto;
}

.gbpr-form__submit {
  justify-self: start;
  min-width: 10rem;
}

.gbpr-form__submit[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.gbpr-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.gbpr-modal__success {
  display: grid;
  min-height: 14rem;
  gap: 1rem;
  place-items: center;
  align-content: center;
  text-align: center;
}

.gbpr-modal__success[hidden],
[data-gbpr-form-view][hidden] {
  display: none !important;
}

.gbpr-modal__success-icon {
  display: inline-grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  color: #fff;
  background: var(--bs-success, #198754);
  border-radius: 50%;
  font-size: 2rem;
}

.gbpr-modal__success p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .gbpr-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 0.5rem;
  }

  .gbpr-modal__panel {
    padding: 1.25rem 1rem;
  }

  .gbpr-inline__panel {
    padding: 1.25rem 1rem;
  }
}
