/* ===== Онбординг: тур, баннеры, тосты ===== */

.onboarding-empty-preview {
  color: #646b75 !important;
  font-style: italic;
  line-height: 1.55;
}

.onboarding-record-pulse {
  animation: onboarding-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(0, 0, 255, 0.35);
}

@keyframes onboarding-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 255, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(0, 0, 255, 0); }
}

/* Демо-баннер */
.onboarding-demo-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 14px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.onboarding-demo-banner a {
  color: #0000ff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.onboarding-demo-banner a:hover {
  text-decoration: underline;
}

.onboarding-demo-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #b45309;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

/* Микрофон */
.onboarding-mic-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f0f4ff;
  border: 1px solid rgba(0, 0, 255, 0.15);
  border-radius: 14px;
  font-size: 13px;
  color: #1b1f24;
  line-height: 1.45;
}

.onboarding-mic-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.onboarding-mic-banner-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.onboarding-mic-banner-actions button {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.onboarding-mic-banner-actions .btn-ok {
  background: #0000ff;
  color: #fff;
}

.onboarding-mic-banner-actions .btn-dismiss {
  background: transparent;
  color: #646b75;
  border: 1.5px solid #e5e7eb;
}

/* Тост */
.onboarding-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10050;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  background: #1b1f24;
  color: #fff;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s ease;
  pointer-events: none;
}

.onboarding-toast.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.onboarding-toast a {
  color: #93c5fd;
  font-weight: 600;
}

/* Тур */
.onboarding-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  pointer-events: none;
}

/* Прозрачный — затемнение только у spotlight (иначе «дырка» закрыта фоном) */
.onboarding-tour-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.onboarding-tour-spotlight {
  position: fixed;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
  z-index: 10041;
}

/* Меню видно в «окне» подсветки во время шагов тура */
body.onboarding-tour-sidebar .app-sidebar.active {
  z-index: 10039;
}

/* Модалка настроек под оверлеем тура, чтобы spotlight подсвечивал её содержимое */
body.onboarding-tour-sidebar .settings-modal {
  z-index: 10039;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 10042;
  width: min(340px, calc(100vw - 32px));
  background: #fff;
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.onboarding-tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.onboarding-tour-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #0000ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.onboarding-tour-step {
  font-size: 12px;
  font-weight: 600;
  color: #646b75;
  margin: 0;
  white-space: nowrap;
}

.onboarding-tour-title {
  font-size: 17px;
  font-weight: 650;
  color: #1b1f24;
  margin: 0 0 8px;
}

.onboarding-tour-text {
  font-size: 14px;
  color: #646b75;
  line-height: 1.5;
  margin: 0 0 16px;
}

.onboarding-tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.onboarding-tour-skip {
  background: none;
  border: none;
  color: #646b75;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
}

.onboarding-tour-skip:hover {
  color: #1b1f24;
}

.onboarding-tour-next {
  padding: 10px 20px;
  background: #0000ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.onboarding-tour-next:hover {
  background: #0000d6;
}

/* Модалки демо / успех */
.onboarding-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.onboarding-modal {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.onboarding-modal h2 {
  font-size: 20px;
  font-weight: 650;
  color: #1b1f24;
  margin: 0 0 10px;
}

.onboarding-modal p {
  font-size: 14px;
  color: #646b75;
  line-height: 1.5;
  margin: 0 0 20px;
}

.onboarding-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-modal-actions a,
.onboarding-modal-actions button {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  border: none;
}

.onboarding-modal-actions .primary {
  background: #0000ff;
  color: #fff;
}

.onboarding-modal-actions .secondary {
  background: #f6f7f9;
  color: #1b1f24;
  border: 1.5px solid #e5e7eb;
}

.onboarding-modal-actions .yandex {
  background: #000;
  color: #fff;
}

.onboarding-highlight-export {
  outline: 3px solid #0000ff;
  outline-offset: 4px;
  border-radius: 12px;
  animation: onboarding-pulse 2s ease-in-out 3;
}

@media (max-width: 768px) {
  .onboarding-tour-card {
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: none;
  }
}
