/* ─────────────────────────────────────────────────────────────────────────
   ASeller Inventory Tiles — Tour Overlay
   Брендовый цвет: #007bff (--color-action-primary)
   ───────────────────────────────────────────────────────────────────────── */

.tour-mask {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: transparent;
  transition: opacity 200ms ease;
}
/* Когда у шага нет spotlight — маска сама затемняет всю страницу */
.tour-mask--no-spotlight { background: rgba(0, 16, 41, 0.7); }

.tour-spotlight {
  position: fixed;
  z-index: 9999;
  border: 2px solid #007bff;
  border-radius: 8px;
  /* Большая «дырка» в маске: всё снаружи затемнено, внутри — оригинальный пиксель */
  box-shadow: 0 0 0 9999px rgba(0, 16, 41, 0.7);
  pointer-events: none;
  transition: all 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip {
  position: fixed;
  z-index: 10002;
  background: #ffffff;
  color: #001029;
  padding: 18px 22px 14px;
  border-radius: 12px;
  max-width: 380px;
  min-width: 280px;
  box-shadow: 0 6px 20px rgba(0, 16, 41, 0.18);
  border: 1px solid rgba(0, 16, 41, 0.08);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transition: opacity 200ms ease, transform 200ms ease;
}
.tour-tooltip__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.13px;
  padding-right: 24px;
  color: #001029;
}
.tour-tooltip__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  color: rgba(0, 16, 41, 0.78);
}
.tour-tooltip__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: rgba(0, 16, 41, 0.5);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.tour-tooltip__close:hover { background: rgba(0, 16, 41, 0.06); color: #001029; }

.tour-tooltip__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 16, 41, 0.1);
}
.tour-tooltip__progress {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: rgba(0, 16, 41, 0.55);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.tour-tooltip__progress-text { display: inline; }
.tour-tooltip__dots { display: none; }

.tour-tooltip__nav { display: flex; gap: 6px; }
.tour-btn {
  background: rgba(0, 16, 41, 0.06);
  color: #001029;
  border: 0;
  padding: 6px 14px;
  border-radius: 6px;
  font: 500 13px/1 'Rubik', sans-serif;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}
.tour-btn:hover { background: rgba(0, 16, 41, 0.1); }
.tour-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tour-btn--primary {
  background: #007bff;
  color: #fff;
}
.tour-btn--primary:hover { background: #2997ff; }

.tour-tooltip__hint {
  position: absolute;
  bottom: -22px;
  left: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-family: ui-monospace, monospace;
}

/* ─── Final screen (step-completed overlay) ─────────────────────────── */
.tour-final {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 16, 41, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  color: #fff;
  backdrop-filter: blur(4px);
}
.tour-final__card {
  background: #fff;
  color: #001029;
  padding: 40px 48px;
  border-radius: 16px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
.tour-final__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #007bff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
/* Tour-Complete redesign: иконка — circle-check (SVG), без фонового кружка. */
.tour-final--complete .tour-final__icon {
  width: 60px;
  height: 60px;
  background: transparent;
  color: #007bff;
  margin-bottom: 12px;
}
.tour-final--complete .tour-final__card { max-width: 550px; }
.tour-final--complete .tour-final__body {
  margin: 0 0 12px;
  color: rgba(0, 16, 41, 0.65);
  font-size: 14px;
  line-height: 19px;
}
.tour-final__optin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 24px;
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 19px;
  letter-spacing: 0.13px;
  color: #001029;
  cursor: pointer;
  user-select: none;
}
.tour-final__optin-cb {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #007bff;
  cursor: pointer;
}
.tour-final__optin-label { color: #001029; }
.tour-final__btn--default {
  background: #fff;
  color: #001029;
  border: 1px solid rgba(0, 16, 41, 0.16);
}
.tour-final__btn--default:hover {
  background: rgba(0, 16, 41, 0.04);
  border-color: rgba(0, 16, 41, 0.24);
}
.tour-final__btn--primary { background: #007bff; color: #fff; }
.tour-final__btn--primary:hover { background: #2997ff; }
.tour-final__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 500;
}
.tour-final__body {
  margin: 0 0 28px;
  color: rgba(0, 16, 41, 0.65);
  line-height: 1.55;
}
.tour-final__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.tour-final__btn {
  background: #007bff;
  color: #fff;
  border: 0;
  padding: 10px 22px;
  border-radius: 8px;
  font: 500 14px/1 'Rubik', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 100ms ease;
}
.tour-final__btn:hover { background: #2997ff; }
.tour-final__btn:disabled {
  background: rgba(0, 123, 255, 0.4);
  cursor: not-allowed;
}
.tour-final__btn:disabled:hover { background: rgba(0, 123, 255, 0.4); }
.tour-final__email {
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 16, 41, 0.16);
  border-radius: 8px;
  font: 14px/1.4 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #001029;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 100ms ease;
}
.tour-final__email::placeholder { color: rgba(0, 16, 41, 0.42); }
.tour-final__email:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
}
.tour-final__email--error,
.tour-final__email--error:focus {
  border-color: #dd0404;
  box-shadow: 0 0 0 3px rgba(221, 4, 4, 0.18);
}
.tour-final__legal {
  margin: 0 0 22px;
  font-size: 12px;
  color: rgba(0, 16, 41, 0.55);
  text-align: center;
}
.tour-final__legal-link {
  color: #007bff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 123, 255, 0.4);
  cursor: pointer;
}
.tour-final__legal-link:hover {
  border-bottom-style: solid;
  border-bottom-color: #007bff;
}
.tour-final__legal-sep { color: rgba(0, 16, 41, 0.35); }
.tour-final__btn--ghost {
  background: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}
.tour-final__btn--ghost:hover { background: rgba(0, 123, 255, 0.08); }

/* Privacy / Cookie overlay — открывается поверх welcome-карточки */
.tour-legal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(0, 16, 41, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.tour-legal__card {
  position: relative;
  background: #ffffff;
  color: #001029;
  border-radius: 12px;
  padding: 28px 32px 24px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.tour-legal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: rgba(0, 16, 41, 0.5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
}
.tour-legal__close:hover { background: rgba(0, 16, 41, 0.06); color: #001029; }
.tour-legal__title {
  margin: 0 0 14px;
  padding-right: 28px;
  font-size: 18px;
  font-weight: 500;
  color: #001029;
}
.tour-legal__body {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(0, 16, 41, 0.82);
}
.tour-legal__body b { color: #001029; font-weight: 500; }

/* Hide overlay parts when tour is closed */
body.tour-closed .tour-mask,
body.tour-closed .tour-spotlight,
body.tour-closed .tour-tooltip { display: none !important; }

/* Tag / red-flag «pills» в ячейках таблицы — стабильно в обеих темах,
   на случай если в snapshot’е нет соответствующих Antd CSS правил. */
[class*="-tagsDynamic"] .ant-tag,
[class*="-flagsDynamic"] .ant-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  margin: 1px 4px 1px 0;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-size: 11px;
  line-height: 16px;
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
[class*="-tagsDynamic"] .ant-tag .css-1todlao-tagTitle,
[class*="-flagsDynamic"] .ant-tag .css-1todlao-tagTitle {
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

/* «Seller Exchange Tour Guide» + «Вернуться на сайт» — пара плавающих
   кнопок в правом нижнем углу после close() (demo mode). */
.tour-cta-group {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10004;
  display: flex;
  gap: 12px;
  align-items: center;
}
.tour-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 16px;
  font: 500 14px/1 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.13px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 16, 41, 0.18);
  transition: background 100ms ease, transform 100ms ease, color 100ms ease, border-color 100ms ease;
  white-space: nowrap;
}
.tour-cta-btn--primary {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}
.tour-cta-btn--primary:hover { background: #2997ff; border-color: #2997ff; transform: translateY(-1px); }
.tour-cta-btn--ghost {
  background: #fff;
  color: #001029;
  border-color: rgba(0, 16, 41, 0.12);
}
.tour-cta-btn--ghost:hover { background: rgba(0, 16, 41, 0.04); border-color: rgba(0, 16, 41, 0.2); }

/* ─── Tour menu overlay ──────────────────────────────────────────────── */
.tour-menu {
  position: fixed;
  inset: 0;
  z-index: 10003;
  background: rgba(0, 16, 41, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.tour-menu__card {
  position: relative;
  background: #ffffff;
  color: #001029;
  border-radius: 16px;
  padding: 10px;
  width: 497px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow:
    0 6px 8px rgba(0, 0, 0, 0.08),
    0 9px 14px rgba(0, 0, 0, 0.05);
}
.tour-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 10px;
}
.tour-menu__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.13px;
  color: #001029;
}
.tour-menu__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: rgba(0, 16, 41, 0.65);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.tour-menu__close:hover { background: rgba(0, 16, 41, 0.06); color: #001029; }

.tour-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}
.tour-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
  font-family: inherit;
}
.tour-menu__item:hover { background: rgba(0, 16, 41, 0.04); }
.tour-menu__item:focus-visible {
  outline: 2px solid rgba(0, 123, 255, 0.4);
  outline-offset: -2px;
}
.tour-menu__item--placeholder { opacity: 0.5; }
.tour-menu__item-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(0, 16, 41, 0.06);
  color: rgba(0, 16, 41, 0.55);
}
.tour-menu__item-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.tour-menu__item-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.13px;
  color: #007bff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tour-menu__item--placeholder .tour-menu__item-title { color: rgba(0, 16, 41, 0.25); }
.tour-menu__item-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  letter-spacing: 0.13px;
  color: rgba(0, 16, 41, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tour-menu__item-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(0, 16, 41, 0.55);
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}
.tour-menu__item:hover .tour-menu__item-meta { opacity: 1; }
.tour-menu__item--placeholder:hover .tour-menu__item-meta { opacity: 0; }
.tour-menu__item-steps {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 16, 41, 0.65);
  white-space: nowrap;
}
.tour-menu__item-play {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
}

.tour-menu__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6px 6px;
  margin-top: auto;
}
.tour-menu__play-demo {
  background: #007bff;
  color: #fff;
  border: 0;
  height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  font: 500 14px/1 'Rubik', sans-serif;
  letter-spacing: 0.13px;
  cursor: pointer;
  transition: background 100ms ease;
}
.tour-menu__play-demo:hover { background: #2997ff; }
