.checkout-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(0 0 0 / 60%);
}

.checkout-popup.is-open {
  display: flex;
}

.checkout-popup__dialog {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  color: #171717;
  box-shadow: 0 20px 60px rgb(0 0 0 / 25%);
  font: 14px/1.45 system-ui, sans-serif;
}

.checkout-popup__dialog h2 {
  margin: 0 36px 6px 0;
  font-size: 24px;
}

.checkout-popup__intro {
  margin: 0 0 20px;
  color: #666;
}

.checkout-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.checkout-popup__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkout-popup__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.checkout-popup__field--full {
  grid-column: 1 / -1;
}

.checkout-popup__field input,
.checkout-popup__field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #fff;
  color: #171717;
  font: inherit;
}

.checkout-popup__field input:focus,
.checkout-popup__field select:focus {
  outline: 2px solid #555;
  outline-offset: 1px;
}

.checkout-popup__error {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #b42318;
}

.checkout-popup__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.checkout-popup__actions button {
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.checkout-popup__cancel {
  background: #eee;
  color: #222;
}

.checkout-popup__submit {
  flex: 1;
  background: #111;
  color: #fff;
}

.checkout-popup__actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 480px) {
  .checkout-popup__dialog {
    padding: 22px 18px;
  }

  .checkout-popup__fields {
    grid-template-columns: 1fr;
  }

  .checkout-popup__field--full {
    grid-column: auto;
  }
}
