.dialog-skeleton {
  display: grid;
  gap: 12px;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: hidden;
  isolation: isolate;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: var(--overlay-scrim);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.dialog-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 520px);
  max-height: min(86dvh, 760px);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 96%, var(--bg));
  color: var(--text);
  box-shadow: var(--shadow-strong);
}

.dialog-body-scroll {
  min-height: 0;
  max-height: none;
}

.dialog-body-scroll > .scroll-area__viewport {
  display: grid;
}

.dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.dialog-title-block {
  min-width: 0;
}

.dialog-title-with-icon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.dialog-title-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--accent);
}

.dialog-title-icon svg {
  width: 23px;
  height: 23px;
}

.dialog-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.18;
}

.dialog-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dialog-card .bottom-action {
  margin-top: 2px;
}

.payment-dialog-card {
  max-height: 100%;
  overflow: hidden;
}

.payment-dialog-body {
  display: grid;
  gap: 10px;
}

.activation-success-dialog {
  width: min(100%, 440px);
  gap: 22px;
  padding: 22px 20px 20px;
}

.activation-success-dialog .dialog-title-with-icon {
  gap: 14px;
}

.activation-success-dialog .dialog-head p {
  margin-top: 8px;
  line-height: 1.52;
}

.activation-success-dialog-body {
  display: grid;
  justify-items: center;
  padding-top: 2px;
}

.activation-success-dialog-body .btn {
  width: 100%;
}

.payment-divider {
  height: 1px;
  width: 100%;
  background: var(--border);
}

.payment-submit-button {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 94%, white), var(--accent));
  color: var(--accent-contrast);
  box-shadow:
    0 16px 38px color-mix(in srgb, var(--accent) 28%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 0 26px color-mix(in srgb, var(--accent) 42%, transparent);
}

.email-code-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: email-code-fullscreen-enter 0.2s ease-out both;
}

@keyframes email-code-fullscreen-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .dialog-card {
    border-radius: var(--radius-lg);
    padding: 20px;
  }
}
