/* Companion signup step 1 — verify mobile */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tm-ob-back-link {
  font-weight: 500;
  transition: color 0.2s ease;
}

.tm-ob-step1 {
  position: relative;
}

.tm-ob-step1::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(167, 139, 250, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 80%, rgba(244, 114, 182, 0.08), transparent 45%);
  z-index: 0;
}

.tm-ob-step1 > * {
  position: relative;
  z-index: 1;
}

/* Progress */
.tm-ob-progress {
  max-width: 520px;
  margin: 0 auto 24px;
  padding: 0 4px;
}

.tm-ob-progress-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.tm-ob-progress-track::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(148, 163, 184, 0.2) 45%, rgba(148, 163, 184, 0.15));
  border-radius: 2px;
  z-index: 0;
}

.tm-ob-progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  z-index: 1;
}

.tm-ob-progress-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tm-ob-muted);
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--tm-ob-border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.tm-ob-progress-step.is-active .tm-ob-progress-dot {
  color: #0b1220;
  border-color: transparent;
  background: linear-gradient(135deg, #7dd3fc, #a5b4fc);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2), 0 8px 24px rgba(56, 189, 248, 0.35);
}

.tm-ob-progress-step.is-done .tm-ob-progress-dot {
  color: var(--tm-ob-success);
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.12);
}

.tm-ob-progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tm-ob-muted);
  max-width: 88px;
  line-height: 1.3;
}

.tm-ob-progress-step.is-active .tm-ob-progress-label {
  color: var(--tm-ob-text);
}

/* Card */
.tm-ob-step1-card {
  position: relative;
  overflow: hidden;
  padding: 32px 28px 28px;
}

.tm-ob-step1-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(167, 139, 250, 0.2), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.tm-ob-step1-header {
  text-align: center;
  margin-bottom: 28px;
}

.tm-ob-step1-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

.tm-ob-step1-icon svg {
  width: 28px;
  height: 28px;
}

.tm-ob-step1-icon--profile {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.22), rgba(244, 114, 182, 0.12));
  border-color: rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
}

.tm-ob-verified-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--tm-ob-muted);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.tm-ob-verified-mobile svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--tm-ob-success);
}

.tm-ob-verified-mobile strong {
  color: var(--tm-ob-text);
  font-weight: 600;
}

.tm-ob-step2 .tm-ob-progress-track::before {
  background: linear-gradient(
    90deg,
    rgba(74, 222, 128, 0.45),
    rgba(56, 189, 248, 0.5) 50%,
    rgba(148, 163, 184, 0.15)
  );
}

.tm-ob-step1-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.tm-ob-step1-card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.tm-ob-step1-lead {
  margin: 0 auto;
  max-width: 380px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--tm-ob-muted);
}

/* Verify panel */
.tm-ob-verify-panel {
  margin-bottom: 8px;
}

.tm-ob-input-group {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.tm-ob-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 14px;
  border: 1px solid var(--tm-ob-border);
  background: rgba(15, 23, 42, 0.75);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tm-ob-input-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.tm-ob-input-prefix {
  padding: 0 12px 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tm-ob-muted);
  border-right: 1px solid var(--tm-ob-border);
  background: rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  user-select: none;
}

.tm-ob-input-wrap input,
.tm-ob-otp-panel .tm-ob-input-wrap input,
#signup-otp {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 13px 14px 13px 12px !important;
  border-radius: 0 !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-size: 1rem;
  font-family: inherit;
}

.tm-ob-input-wrap input::placeholder,
#signup-otp::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

.tm-ob-input-wrap input:-webkit-autofill,
.tm-ob-input-wrap input:-webkit-autofill:hover,
.tm-ob-input-wrap input:-webkit-autofill:focus,
#signup-otp:-webkit-autofill,
#signup-otp:-webkit-autofill:hover,
#signup-otp:-webkit-autofill:focus {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc !important;
  box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.75) inset !important;
  transition: background-color 9999s ease-out 0s;
}

.tm-ob-input-wrap input:focus,
#signup-otp:focus {
  outline: none;
  box-shadow: none !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

.tm-ob-btn-send {
  flex-shrink: 0;
  align-self: stretch;
  padding: 0 20px;
  min-height: 48px;
  white-space: nowrap;
}

.tm-ob-otp-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--tm-ob-border);
  animation: tmObFadeUp 0.35s ease;
}

@keyframes tmObFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tm-ob-otp-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tm-ob-muted);
}

.tm-ob-otp-label svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  color: var(--tm-ob-accent);
}

.tm-ob-otp-demo:not(.show) {
  display: none;
}

.tm-ob-otp-demo.show {
  display: block;
}

.tm-ob-otp-demo {
  margin-top: 18px;
  padding: 20px 18px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(74, 222, 128, 0.12), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(74, 222, 128, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tm-ob-otp-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(74, 222, 128, 0.15), transparent 65%);
  pointer-events: none;
}

.tm-ob-otp-demo-label {
  position: relative;
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(134, 239, 172, 0.9);
}

.tm-ob-otp-demo strong {
  position: relative;
  display: block;
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: var(--tm-ob-success);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(74, 222, 128, 0.4);
}

.tm-ob-btn-verify {
  min-height: 48px;
  padding: 0 22px;
}

/* Details section */
.tm-ob-details-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--tm-ob-border);
  animation: tmObFadeUp 0.4s ease;
}

.tm-ob-details-title {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-ob-details-title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: linear-gradient(180deg, #7dd3fc, #a5b4fc);
}

.tm-ob-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.tm-ob-field-grid .tm-onboard-field--full {
  grid-column: 1 / -1;
}

.tm-ob-btn-continue {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  font-size: 1rem;
}

/* Trust row */
.tm-ob-trust {
  max-width: 520px;
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
}

.tm-ob-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tm-ob-muted);
}

.tm-ob-trust-item svg {
  width: 14px;
  height: 14px;
  color: var(--tm-ob-accent);
  flex-shrink: 0;
}

.tm-onboard-alert.tm-onboard-alert--success {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.tm-convert-warning {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tm-convert-warning.is-hidden {
  display: none;
}

.tm-convert-warning__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(4px);
}

.tm-convert-warning__panel {
  position: relative;
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: linear-gradient(165deg, rgba(30, 27, 46, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 24px 24px 20px;
}

.tm-convert-warning__panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #fecaca;
}

.tm-convert-warning__lead {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 0.95rem;
}

.tm-convert-warning__list {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  color: #e2e8f0;
  line-height: 1.6;
  font-size: 0.92rem;
}

.tm-convert-warning__list li + li {
  margin-top: 8px;
}

.tm-convert-warning__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-convert-warning__cancel {
  text-align: center;
  color: #94a3b8;
  font-size: 0.88rem;
  text-decoration: none;
}

.tm-convert-warning__cancel:hover {
  color: #e2e8f0;
}

body.tm-convert-warning-open {
  overflow: hidden;
}

#companion-convert-form.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.tm-ob-progress-track--4 .tm-ob-progress-step {
  flex: 1;
  min-width: 0;
}

.tm-ob-progress-track--4 .tm-ob-progress-label {
  max-width: 64px;
}

.tm-ob-required {
  color: #f472b6;
}

.tm-ob-field-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
}

.tm-ob-photo-picker input[type="file"] {
  margin-top: 10px;
  width: 100%;
  font-size: 0.82rem;
}

.tm-ob-photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  border: 2px dashed rgba(129, 140, 248, 0.45);
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.tm-ob-photo-preview.has-photo {
  border-style: solid;
}

.tm-ob-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-ob-photo-placeholder {
  padding: 10px;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}

.tm-ob-price-summary {
  margin: 6px 0 20px;
}

.tm-ob-price-summary__card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 27, 75, 0.78) 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tm-ob-price-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tm-ob-price-summary__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.01em;
}

.tm-ob-price-summary__value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.tm-ob-price-summary__divider {
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.45), transparent);
}

.tm-ob-price-summary__row--highlight .tm-ob-price-summary__label {
  color: #e0e7ff;
  font-weight: 700;
}

.tm-ob-price-summary__value--visitor {
  font-size: 1.35rem;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 55%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tm-ob-price-summary__hint {
  margin: 12px 4px 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #94a3b8;
}

/* Legacy alias — keep for cached pages */
.tm-ob-price-breakdown {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(2, 6, 23, 0.55);
}

.tm-ob-price-breakdown__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.86rem;
  color: #cbd5e1;
}

.tm-ob-price-breakdown__row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(99, 102, 241, 0.22);
  color: #f8fafc;
  font-weight: 700;
}

.tm-ob-price-breakdown__row--total strong {
  color: #a5b4fc;
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .tm-ob-input-group {
    flex-direction: column;
  }

  .tm-ob-btn-send,
  .tm-ob-btn-verify {
    width: 100%;
  }

  .tm-ob-field-grid {
    grid-template-columns: 1fr;
  }

  .tm-ob-progress-label {
    font-size: 0.65rem;
    max-width: 72px;
  }
}
