.trial-dialog-backdrop {
  --td-blue: #2563eb;
  --td-blue-strong: #1d4ed8;
  --td-text: #0f172a;
  --td-muted: #64748b;
  --td-border: #e2e8f0;
  --td-green: #22c55e;
  --td-sidebar: #f3f0ff;

  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.trial-dialog-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.trial-dialog {
  position: relative;
  width: min(100%, 980px);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.22s ease;
}

.trial-dialog-backdrop.is-visible .trial-dialog {
  transform: translateY(0) scale(1);
}

.trial-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trial-dialog__close:hover {
  background: #f1f5f9;
  color: #334155;
}

.trial-dialog__layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 560px;
}

.trial-dialog__aside {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.75rem 1.5rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(167, 139, 250, 0.28), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(129, 140, 248, 0.22), transparent 26%),
    radial-gradient(circle at 70% 78%, rgba(96, 165, 250, 0.18), transparent 30%),
    linear-gradient(165deg, #f7f3ff 0%, #efeaff 42%, #f5f8ff 100%);
  display: flex;
  flex-direction: column;
}

.trial-dialog__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(124, 58, 237, 0.55) 0 1.2px, transparent 1.4px),
    radial-gradient(circle, rgba(99, 102, 241, 0.45) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(59, 130, 246, 0.4) 0 1.1px, transparent 1.3px);
  background-size: 120px 120px, 90px 90px, 150px 150px;
  background-position: 18px 40px, 180px 24px, 90px 180px;
  opacity: 0.75;
}

.trial-dialog__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.4rem;
}

.trial-dialog__brand-mark {
  width: auto;
  height: 40px;
  flex: 0 0 auto;
  display: block;
}

.trial-dialog__brand-name {
  color: var(--td-text);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.trial-dialog__aside-copy {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin-top: 1.5rem;
}

.trial-dialog__hero-heading {
  margin: 0 0 0.85rem;
  color: var(--td-text);
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.trial-dialog__title-accent {
  color: var(--td-blue);
}

.trial-dialog__hero-subtext {
  margin: 0;
  color: var(--td-muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 280px;
}

.trial-dialog__hero {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 1.5rem;
}

.trial-dialog__hero img,
.trial-dialog__hero svg {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
}

.trial-dialog__content {
  padding: 2.4rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.trial-dialog__stepper {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 1.85rem;
  padding-right: 1.5rem;
}

.trial-dialog__step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.trial-dialog__step-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.trial-dialog__step-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.trial-dialog__step-divider {
  flex: 1 1 auto;
  height: 1px;
  min-width: 18px;
  background: #e2e8f0;
}

.trial-dialog__step.is-active .trial-dialog__step-circle {
  border-color: var(--td-blue);
  background: var(--td-blue);
  color: #ffffff;
}

.trial-dialog__step.is-active .trial-dialog__step-name {
  color: var(--td-text);
  font-weight: 700;
}

.trial-dialog__step.is-complete .trial-dialog__step-circle {
  border-color: #86efac;
  background: #dcfce7;
  color: #16a34a;
}

.trial-dialog__step.is-complete .trial-dialog__step-name {
  color: #16a34a;
}

.trial-dialog__body {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.trial-dialog__panel-title {
  margin: 0 0 1.25rem;
  color: var(--td-text);
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}

.trial-dialog__muted {
  margin: 0 0 1.15rem;
  color: var(--td-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.trial-dialog__error {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
}

.trial-dialog__field {
  margin-bottom: 0.85rem;
}

.trial-dialog__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.trial-dialog__input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.trial-dialog__input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--td-border);
  padding: 0 0.95rem 0 2.55rem;
  outline: none;
  background: #ffffff;
  color: var(--td-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.trial-dialog__input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.trial-dialog__input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.trial-dialog__phone {
  display: flex;
  align-items: stretch;
  height: 48px;
  border: 1px solid var(--td-border);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.trial-dialog__phone:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.trial-dialog__phone-code {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  border: 0;
  border-right: 1px solid var(--td-border);
  background: #ffffff;
  color: var(--td-text);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.trial-dialog__flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.trial-dialog__phone-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0 0.95rem;
  background: transparent;
  color: var(--td-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.trial-dialog__phone-input::placeholder {
  color: #94a3b8;
}

.trial-dialog__points {
  list-style: none;
  margin: 1rem 0 1.35rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.trial-dialog__points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 500;
}

.trial-dialog__check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #dcfce7;
  color: #16a34a;
}

.trial-dialog__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.trial-dialog__button:hover {
  transform: translateY(-1px);
}

.trial-dialog__button--primary {
  width: 100%;
  color: #ffffff;
  background: var(--td-blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.trial-dialog__button--primary:hover {
  background: var(--td-blue-strong);
}

.trial-dialog__button--secondary {
  width: auto;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--td-border);
  box-shadow: none;
}

.trial-dialog__panel-actions {
  margin-top: 0.35rem;
}

.trial-dialog__panel-actions--split {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.trial-dialog__panel-actions--split .trial-dialog__button {
  flex: 1;
}

.trial-dialog__switch {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--td-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.trial-dialog__link {
  color: var(--td-blue);
  text-decoration: none;
  font-weight: 700;
}

.trial-dialog__link:hover {
  text-decoration: underline;
}

.trial-dialog__code-inputs {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin: 0 auto 1rem;
}

.trial-dialog__code-input {
  width: 46px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid var(--td-border);
  background: #ffffff;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  outline: none;
}

.trial-dialog__code-input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.trial-dialog__resend {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

.trial-dialog__resend .trial-dialog__muted {
  margin: 0;
}

.trial-dialog__resend-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--td-blue);
}

.trial-dialog__resend-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.trial-dialog__password-wrap {
  position: relative;
}

.trial-dialog__password-wrap .trial-dialog__input {
  padding-right: 2.75rem;
}

.trial-dialog__eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trial-dialog__password-hint {
  margin-top: 0.55rem;
  color: #16a34a;
  font-weight: 700;
  font-size: 0.88rem;
}

.trial-dialog__strength {
  margin-top: 0.45rem;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.trial-dialog__strength > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #22c55e;
  transition: width 0.2s ease;
}

.trial-dialog__panel--success {
  text-align: center;
  padding-top: 1rem;
}

.trial-dialog__success-icon {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  margin: 0 auto 1rem;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.trial-dialog.is-success .trial-dialog__success-icon {
  animation: tdSuccessPop 520ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.trial-dialog__success-icon::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35) 0%, rgba(34, 197, 94, 0) 62%);
  opacity: 0;
  transform: scale(0.6);
}

.trial-dialog.is-success .trial-dialog__success-icon::before {
  animation: tdSuccessBurst 620ms ease-out both;
}

.trial-dialog__success-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  box-shadow:
    -26px -6px 0 rgba(34, 197, 94, 0.65),
    22px -16px 0 rgba(34, 197, 94, 0.55),
    18px 16px 0 rgba(34, 197, 94, 0.5),
    -8px 24px 0 rgba(34, 197, 94, 0.55);
}

.trial-dialog.is-success .trial-dialog__success-icon::after {
  animation: tdSuccessSparks 700ms ease-out both;
}

.trial-dialog.is-success .trial-dialog__success-icon svg path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}

.trial-dialog.is-success .trial-dialog__success-icon svg path {
  animation: tdTickDraw 520ms ease-out both;
}

@keyframes tdSuccessPop {
  0% {
    transform: scale(0.72);
  }
  55% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tdSuccessBurst {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes tdSuccessSparks {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  60% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes tdTickDraw {
  0% {
    stroke-dashoffset: 120;
    opacity: 0.75;
  }
  70% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.trial-dialog__success-title {
  margin: 0 0 0.65rem;
  color: var(--td-text);
  font-size: 1.55rem;
  font-weight: 800;
}

.trial-dialog__what-next {
  margin: 1.35rem 0 1.2rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid #eef2ff;
  background: #f8fafc;
}

.trial-dialog__what-next-title {
  font-weight: 800;
  color: var(--td-text);
  margin-bottom: 0.7rem;
}

.trial-dialog__what-next-list {
  margin: 0;
  padding-left: 1.05rem;
  color: #334155;
  font-weight: 600;
}

.trial-dialog__what-next-list li {
  margin: 0.45rem 0;
}

.trial-dialog.is-success .trial-dialog__aside {
  display: none;
}

.trial-dialog.is-success .trial-dialog__layout {
  grid-template-columns: 1fr;
}

.trial-dialog.is-success .trial-dialog__content {
  padding: 3rem 2.5rem;
}

.trial-dialog.is-success .trial-dialog__stepper {
  display: none;
}

.trial-dialog.is-success .trial-dialog__body {
  max-width: 460px;
}

body.trial-dialog-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .trial-dialog__layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .trial-dialog__aside {
    min-height: 280px;
  }

  .trial-dialog__aside-copy {
    margin-top: 0.5rem;
  }

  .trial-dialog__hero {
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  .trial-dialog__content {
    padding: 1.75rem 1.35rem 1.5rem;
  }

  .trial-dialog__stepper {
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .trial-dialog-backdrop {
    padding: 0.75rem;
  }

  .trial-dialog {
    border-radius: 18px;
  }

  .trial-dialog__step-name {
    display: none;
  }

  .trial-dialog__code-input {
    width: 40px;
    height: 48px;
  }

  .trial-dialog__panel-actions--split {
    flex-direction: column;
  }

  .trial-dialog__panel-actions--split .trial-dialog__button {
    width: 100%;
  }
}
