/* Tutor LMS が出力した購入完了カードを画面中央へ表示する。 */
.wm-purchase-confirmation-screen {
  position: fixed !important;
  z-index: 100000;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px;
  background: #f6f8fc;
  box-sizing: border-box;
}

.wm-purchase-confirmation-backdrop {
  position: absolute;
  inset: 0;
  background: #f6f8fc;
}

.wm-purchase-confirmation-dialog {
  position: relative !important;
  z-index: 1;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: min(100%, 760px);
  max-height: calc(100dvh - 48px);
  margin: 0 !important;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 20px;
}

.wm-purchase-confirmation-card {
  width: 100%;
  margin: 0 !important;
  padding: 48px !important;
  box-sizing: border-box;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(39, 67, 112, 0.12);
}

body.wm-purchase-confirmation-open {
  overflow: hidden;
}

.wm-purchase-confirmation-actions {
  display: flex;
  gap: 12px;
}

.wm-purchase-confirmation-actions > :is(a, button) {
  flex: 1 1 0;
}

.wm-purchase-confirmation-primary {
  background-color: #4169d8 !important;
  border-color: #4169d8 !important;
  color: #fff !important;
}

.wm-purchase-confirmation-secondary {
  background-color: #fff !important;
  border-color: #4169d8 !important;
  color: #4169d8 !important;
}

@media screen and (max-width: 768px) {
  .wm-purchase-confirmation-screen {
    padding: 16px;
  }

  .wm-purchase-confirmation-dialog {
    max-height: calc(100dvh - 32px);
  }

  .wm-purchase-confirmation-actions {
    flex-direction: column;
  }

  .wm-purchase-confirmation-card {
    padding: 32px 24px !important;
  }

  .wm-purchase-confirmation-actions {
    width: min(100%, 320px);
    margin-right: auto;
    margin-left: auto;
    gap: 10px;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .wm-purchase-confirmation-actions > :is(a, button) {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: clamp(9px, 3vw, 11px) clamp(12px, 4vw, 16px) !important;
    box-sizing: border-box;
    font-size: clamp(13px, 4vw, 16px) !important;
    line-height: 1.4 !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
