.coindpay-checkout-open {
  overflow: hidden;
}

.coindpay-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgb(0 0 0 / 72%);
  box-sizing: border-box;
}

.coindpay-checkout-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 520px);
  height: min(820px, 100%);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 18px;
  background: #fff;
  color: #161616;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.coindpay-checkout-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 18px;
  border-bottom: 1px solid #e9e9e9;
}

.coindpay-checkout-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.coindpay-checkout-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #222;
  font: 30px/1 system-ui, sans-serif;
  cursor: pointer;
}

.coindpay-checkout-close:focus-visible,
.coindpay-checkout-fallback:focus-visible {
  outline: 3px solid #6b4eff;
  outline-offset: 2px;
}

.coindpay-checkout-loading {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  margin: 0;
  color: #626262;
  font-size: 14px;
}

.coindpay-checkout-frame {
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
  opacity: 0;
}

.coindpay-checkout-frame.is-loaded {
  opacity: 1;
}

.coindpay-checkout-fallback {
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  color: #4e35d8;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 640px) {
  .coindpay-checkout-overlay {
    padding: 0;
  }

  .coindpay-checkout-panel {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .coindpay-checkout-header {
    padding-top: max(6px, env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  .coindpay-checkout-frame {
    transition: none;
  }
}
