.movendi-sbp-open {
  overflow: hidden;
}

.movendi-sbp-modal[hidden] {
  display: none;
}

.movendi-sbp-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: "Barlow Semi Condensed", Arial, sans-serif;
}

.movendi-sbp-modal *,
.movendi-sbp-modal *::before,
.movendi-sbp-modal *::after {
  box-sizing: border-box;
}

.movendi-sbp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(39 52 139 / 68%);
}

.movendi-sbp-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 390px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(7 18 78 / 24%);
}

.movendi-sbp-modal__header {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  min-height: 72px;
  padding: 24px 24px 16px;
  background: #fff;
}

.movendi-sbp-modal__header h2 {
  grid-column: 2;
  margin: 0 !important;
  color: #252525 !important;
  font-family: "Barlow Semi Condensed", Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
  text-align: center;
}

.movendi-sbp-modal__close {
  grid-column: 3;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  cursor: pointer;
}

.movendi-sbp-modal__close svg {
  display: block;
  width: 24px;
  height: 24px;
}

.movendi-sbp-modal__close path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.movendi-sbp-modal__close:hover svg {
  transform: rotate(90deg);
  transition: transform 180ms ease;
}

.movendi-sbp-modal__close:focus-visible {
  border-radius: 2px;
  outline: 2px solid #27348b;
  outline-offset: 3px;
}

.movendi-sbp-modal__message {
  margin: 32px 24px 48px;
  padding: 16px;
  border-radius: 8px;
  background: #eef1ff;
  color: #27348b;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.movendi-sbp-modal__message.is-loading::before {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgb(39 52 139 / 20%);
  border-top-color: #27348b;
  border-radius: 50%;
  content: "";
  animation: movendi-sbp-spin 0.8s linear infinite;
}

.movendi-sbp-modal__message.is-error {
  background: #fff0f0;
  color: #8f1d1d;
}

.movendi-sbp-modal__checkout {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 0 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.movendi-sbp-modal__checkout iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  border: 0;
}

.movendi-sbp-test {
  max-width: 760px;
  padding: 32px;
  border: 1px solid #dcdff2;
  border-radius: 16px;
  background: #fff;
}

.movendi-sbp-test__notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff4cc;
  color: #473a00;
}

.movendi-sbp-test__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.movendi-sbp-test__button {
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid #27348b;
  border-radius: 999px;
  background: #27348b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.movendi-sbp-test__button:hover,
.movendi-sbp-test__button:focus-visible {
  background: #fff;
  color: #27348b;
}

@keyframes movendi-sbp-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .movendi-sbp-modal {
    place-items: stretch;
    padding: 0;
  }

  .movendi-sbp-modal__dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .movendi-sbp-modal__checkout {
    flex: 1 1 auto;
    padding: 0 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .movendi-sbp-modal__close:hover svg {
    transform: none;
  }

  .movendi-sbp-modal__message.is-loading::before {
    animation-duration: 1.6s;
  }
}
