/* Creavi Booking Service — Step Bar (Modern SaaS + Chevrons)
   File: assets/css/service-tour.css
   Ready to replace полностью.
*/

#creavibc-tour-bar.creavibc-tour-bar{
  /* Theme tokens */
  --cbs-accent: rgba(120, 2, 159, 0.78);
  --cbs-accent-strong: rgba(120, 2, 159, 0.88);
  --cbs-accent-soft: rgba(120, 2, 159, 0.12);

  --cbs-ink: rgba(0, 0, 0, 0.92);
  --cbs-muted: rgba(0, 0, 0, 0.62);
  --cbs-subtle: rgba(0, 0, 0, 0.48);

  --cbs-line: rgba(0, 0, 0, 0.10);
  --cbs-border: rgba(0, 0, 0, 0.06);

  --cbs-surface: rgba(255, 255, 255, 0.90);
  --cbs-surface-strong: rgba(255, 255, 255, 0.96);

  position: sticky;
  top: 32px;
  z-index: 999;

  background: var(--cbs-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid var(--cbs-border);
  border-radius: 16px;

  margin: 12px 0;
  padding: 12px 14px;

  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255,255,255,0.65) inset;
}

.creavibc-tour-wrap{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================
   Rail area + progress line
   ========================= */
.creavibc-tour-rail{
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 8px 0 6px;
}

.creavibc-tour-line{
  position: absolute;
  left: 12px;
  right: 12px;
  top: 21px;
  height: 1px;
  border-radius: 999px;
  background: var(--cbs-line);
  overflow: hidden;
}

.creavibc-tour-line-fill{
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--cbs-accent);
  box-shadow: 0 10px 18px rgba(120, 2, 159, 0.18);
  transition: width .18s ease;
}

/* =========================
   Arrows + scroll row layout
   ========================= */
.creavibc-tour-rail-inner{
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: start;
  gap: 6px;
}

.creavibc-tour-rail-inner .creavibc-tour-steps{
  grid-column: 2;
}

/* Edge fades (subtle UX hint that it scrolls) */
.creavibc-tour-rail.has-scroll .creavibc-tour-rail-inner::before,
.creavibc-tour-rail.has-scroll .creavibc-tour-rail-inner::after{
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 44px;
  pointer-events: none;
  z-index: 1;
}

.creavibc-tour-rail.has-scroll .creavibc-tour-rail-inner::before{
  left: 10px;
  background: linear-gradient(to right, var(--cbs-surface-strong), rgba(255,255,255,0));
}

.creavibc-tour-rail.has-scroll .creavibc-tour-rail-inner::after{
  right: 10px;
  background: linear-gradient(to left, var(--cbs-surface-strong), rgba(255,255,255,0));
}

/* Chevrons */
.creavibc-tour-nav{
  grid-row: 1;
  width: 34px;
  height: 34px;
  margin-top: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.92);

  color: rgba(0,0,0,0.82);
  cursor: pointer;
  user-select: none;

  position: relative;
  z-index: 2;

  box-shadow:
    0 10px 24px rgba(0,0,0,0.10),
    0 1px 0 rgba(255,255,255,0.60) inset;

  transition:
    transform .14s ease,
    box-shadow .14s ease,
    background .14s ease,
    border-color .14s ease,
    opacity .14s ease;
}

.creavibc-tour-nav > span{
  display: inline-block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.creavibc-tour-nav:hover{
  background: rgba(255,255,255,1);
  border-color: rgba(0,0,0,0.14);
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.14),
    0 1px 0 rgba(255,255,255,0.70) inset;
}

.creavibc-tour-nav:active{
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.12),
    0 1px 0 rgba(255,255,255,0.55) inset;
}

.creavibc-tour-nav:focus-visible{
  outline: none;
  border-color: rgba(120,2,159,0.28);
  box-shadow:
    0 0 0 3px rgba(120,2,159,0.18),
    0 14px 34px rgba(0,0,0,0.14);
}

.creavibc-tour-nav-left{ grid-column: 1; justify-self: start; }
.creavibc-tour-nav-right{ grid-column: 3; justify-self: end; }

.creavibc-tour-nav.is-disabled,
.creavibc-tour-nav:disabled{
  opacity: 0.35;
  cursor: default;
  transform: none;
  box-shadow: none;
  background: rgba(255,255,255,0.70);
  border-color: rgba(0,0,0,0.08);
}

/* Only show chevrons when horizontal scroll exists */
.creavibc-tour-rail:not(.has-scroll) .creavibc-tour-nav{
  opacity: 0;
  pointer-events: none;
}

/* =========================
   Steps row
   ========================= */
.creavibc-tour-steps{
  display: flex;
  align-items: flex-start;
  overflow: auto hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;

  padding: 0 2px;
  gap: 0;

  position: relative;
  z-index: 1;
}

.creavibc-tour-steps::-webkit-scrollbar{
  height: 0;
  width: 0;
}

/* Step buttons */
.creavibc-tour-step{
  position: relative;
  flex: 0 0 auto;

  display: grid;
  grid-template-rows: 18px auto auto;
  justify-items: center;

  padding: 0 12px;
  min-width: 108px;
  max-width: 300px;

  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.creavibc-tour-step:focus{ outline: none; }
.creavibc-tour-step:focus-visible .creavibc-tour-dot{
  box-shadow: 0 0 0 3px rgba(120, 2, 159, 0.18);
}

/* Dot */
.creavibc-tour-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  margin-top: 9px;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}

/* Label */
.creavibc-tour-label{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 780;
  color: var(--cbs-muted);
  line-height: 1.15;
  white-space: nowrap;
}

.creavibc-tour-publish-btn .creavibc-tour-label{
  margin-top: 0;
}

/* Sub label (only on active step) */
.creavibc-tour-sub{
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.25;
  color: var(--cbs-subtle);
  text-align: center;

  max-height: 0;
  opacity: 0;
  transform: translateY(-2px);
  overflow: hidden;

  transition: opacity .16s ease, transform .16s ease, max-height .20s ease;
}

/* Done */
.creavibc-tour-step.is-done .creavibc-tour-dot{
  background: rgba(120, 2, 159, 0.46);
}

/* Active */
.creavibc-tour-step.is-active .creavibc-tour-dot{
  background: var(--cbs-accent-strong);
  transform: scale(1.15);
  box-shadow: 0 10px 22px rgba(120, 2, 159, 0.18);
}

.creavibc-tour-step.is-active .creavibc-tour-label{
  color: var(--cbs-ink);
  font-weight: 880;
}

.creavibc-tour-step.is-active .creavibc-tour-sub{
  max-height: 52px;
  opacity: 1;
  transform: translateY(0);
  max-width: 300px;
}

/* =========================
   Publish pill (separate)
   ========================= */
.creavibc-tour-publish{
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(0,0,0,0.08);
}

.creavibc-tour-publish-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  height: 34px;
  padding: 0 12px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.76);

  color: var(--cbs-ink);
  font-size: 12px;
  font-weight: 880;

  cursor: pointer;

  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .14s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.creavibc-tour-publish-btn:hover{
  background: rgba(255,255,255,0.96);
  transform: translateY(-1px);
}

.creavibc-tour-publish-btn:active{
  transform: translateY(0);
}

.creavibc-tour-publish-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 2, 159, 0.18), 0 10px 24px rgba(0,0,0,0.08);
}

.creavibc-tour-publish-btn .creavibc-tour-dot{
  width: 10px;
  height: 10px;
  margin-top: 0;
  transform: none;
  box-shadow: none;
}

.creavibc-tour-publish-btn.is-active{
  border-color: rgba(120, 2, 159, 0.22);
  background: rgba(120, 2, 159, 0.08);
}

.creavibc-tour-publish-btn.is-active .creavibc-tour-dot{
  background: var(--cbs-accent-strong);
}

/* =========================
   Focus highlight on section
   ========================= */
.creavibc-tour-focus{
  outline: 2px solid rgba(120, 2, 159, 0.16);
  outline-offset: 3px;
  border-radius: 18px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.10);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 860px){
  #creavibc-tour-bar.creavibc-tour-bar{
    border-radius: 14px;
    padding: 11px 12px;
  }

  .creavibc-tour-rail-inner{
    grid-template-columns: 34px 1fr 34px;
    gap: 4px;
  }

  .creavibc-tour-nav{
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .creavibc-tour-nav > span{
    font-size: 17px;
  }

  .creavibc-tour-step{
    min-width: 96px;
    padding: 0 10px;
  }

  .creavibc-tour-label{
    font-size: 11.5px;
  }

  .creavibc-tour-sub{
    font-size: 10.8px;
  }
}