/* CoderFlow tour overlay. Everything is scoped to .cf-tour-* so the product UI is untouched. */
.cf-tour-root {
  --cf-tour-blue: #4073F3;
  --cf-tour-cyan: #00D4FF;
  --cf-tour-ink: #000000;
  --cf-tour-slate: #64748B;
  --cf-tour-cloud: #F8FAFC;
  --cf-tour-navy: #0A0E27;
  --cf-tour-font: 'Inter', system-ui, -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-family: var(--cf-tour-font);
}

.cf-tour-spotlight {
  position: fixed;
  z-index: 2147482990;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 3px var(--cf-tour-cyan), 0 0 0 9999px rgba(10, 14, 39, 0.42);
  animation: cf-tour-fade 0.2s ease;
}

.cf-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482990;
  background: rgba(10, 14, 39, 0.55);
}

.cf-tour-card {
  position: fixed;
  z-index: 2147483000;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px 22px 18px;
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--cf-tour-ink);
  font-family: var(--cf-tour-font);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 18px 48px rgba(10, 14, 39, 0.28), 0 2px 6px rgba(10, 14, 39, 0.12);
  animation: cf-tour-fade 0.2s ease;
  /* A word longer than the card is wide (a German compound) breaks instead of overflowing. */
  overflow-wrap: break-word;
}

@keyframes cf-tour-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cf-tour-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(135deg, var(--cf-tour-blue) 0%, var(--cf-tour-cyan) 100%);
}

.cf-tour-card.is-centered {
  top: 50%;
  left: 50%;
  width: min(480px, calc(100vw - 32px));
  padding: 30px 30px 24px;
  transform: translate(-50%, -50%);
}

.cf-tour-card * { box-sizing: border-box; }

/* The language selector: a globe, the language's own name and a chevron, in
   one control, so it fits beside the close button for any number of
   languages. Its row keeps the 38px the earlier row of buttons took, so
   cards keep their size and place. */
.cf-tour-language { display: flex; align-items: center; min-height: 38px; margin: 0 32px 14px 0; }
.cf-tour-language-select {
  max-width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 28px 0 28px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background-color: #FFFFFF;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748B' stroke-width='1.4'%3E%3Ccircle cx='8' cy='8' r='6.3'/%3E%3Cpath d='M1.7 8h12.6M8 1.7c1.9 2 2.6 4.1 2.6 6.3S9.9 12.3 8 14.3M8 1.7C6.1 3.7 5.4 5.8 5.4 8s.7 4.3 2.6 6.3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%231E293B' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: left 9px center, right 10px center;
  background-size: 14px 14px, 10px 6px;
  color: #1E293B;
  font: 600 12px/32px var(--cf-tour-font);
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.cf-tour-language-select:hover { border-color: var(--cf-tour-blue); }
.cf-tour-language-select:focus-visible { outline: 3px solid var(--cf-tour-cyan); outline-offset: 2px; }
.cf-tour-language-select option { color: #1E293B; background: #FFFFFF; }
.cf-tour-dock .cf-tour-language { margin: 4px 8px 4px 0; }
.cf-tour-dock { max-width: calc(100vw - 32px); flex-wrap: wrap; }

.cf-tour-eyebrow {
  margin: 0 0 6px;
  color: var(--cf-tour-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cf-tour-title {
  margin: 0 32px 8px 0;
  color: var(--cf-tour-ink);
  font-family: var(--cf-tour-font);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.cf-tour-card.is-centered .cf-tour-title { font-size: 24px; }

.cf-tour-body { margin: 0; color: #1E293B; font-size: inherit; }
.cf-tour-body + .cf-tour-body { margin-top: 10px; }
.cf-tour-note { margin: 12px 0 0; color: var(--cf-tour-slate); font-size: 13px; }

.cf-tour-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.cf-tour-actions .cf-tour-spacer { flex: 1; }

/* The final card: its actions are rows (the next tour; the contact and docs
   links; More tours, Keep exploring, Restart), and the card is as wide as its
   widest row needs, from the usual 380px up to 600px (tour.js may set it
   wider, to clear its target: fitFinal). A translation's longer
   labels ("Contact us (in English)") then keep their rows instead of each
   taking one more, which made the card taller than the English one and
   pushed it over what it points at. The title, text and the next tour's
   title don't widen it (contain: inline-size); they wrap to the width the
   rows set. With the English labels the rows fit in 380px, so the English
   card keeps its size. On a phone the card is docked full width (below). */
.cf-tour-card.is-final {
  width: fit-content;
  min-width: min(380px, calc(100vw - 32px));
  max-width: min(600px, calc(100vw - 32px));
}
.cf-tour-card.is-final > :not(.cf-tour-actions) { contain: inline-size; }
.cf-tour-finish { flex-direction: column; align-items: flex-start; }
.cf-tour-finish-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.cf-tour-finish-next { width: 100%; contain: inline-size; }

.cf-tour-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 600 14px/1.2 var(--cf-tour-font);
  text-decoration: none;
  cursor: pointer;
}

.cf-tour-button:focus-visible,
.cf-tour-close:focus-visible,
.cf-tour-pill:focus-visible {
  outline: 3px solid var(--cf-tour-cyan);
  outline-offset: 2px;
}

.cf-tour-primary { background: var(--cf-tour-blue); color: #FFFFFF; }
.cf-tour-primary:hover { background: #2F5FDB; color: #FFFFFF; }
.cf-tour-secondary { background: #FFFFFF; border-color: #CBD5E1; color: var(--cf-tour-ink); }
.cf-tour-secondary:hover { border-color: var(--cf-tour-blue); color: var(--cf-tour-blue); }
.cf-tour-link { padding-inline: 4px; background: none; color: var(--cf-tour-slate); }
.cf-tour-link:hover { color: var(--cf-tour-blue); }

.cf-tour-progress { color: var(--cf-tour-slate); font-size: 13px; }

.cf-tour-close {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--cf-tour-slate);
  font: 400 22px/1 var(--cf-tour-font);
  cursor: pointer;
}

.cf-tour-close:hover { background: var(--cf-tour-cloud); color: var(--cf-tour-ink); }

.cf-tour-dock {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147482995;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(64, 115, 243, 0.35);
  border-radius: 999px;
  background: var(--cf-tour-navy);
  box-shadow: 0 6px 18px rgba(10, 14, 39, 0.25);
}

.cf-tour-pill {
  display: inline-flex;
  /* Long labels (in a long language, on a phone) wrap inside the dock. */
  flex-wrap: wrap;
  max-width: 100%;
  text-align: left;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #FFFFFF;
  font: 600 13px/1.2 var(--cf-tour-font);
  cursor: pointer;
}

.cf-tour-home {
  padding: 8px 14px 8px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 999px 999px 0;
  color: #CBD5E1;
  font: 600 13px/1.2 var(--cf-tour-font);
  text-decoration: none;
}

.cf-tour-home:hover { color: #FFFFFF; }
.cf-tour-home:focus-visible { outline: 3px solid var(--cf-tour-cyan); outline-offset: 2px; }

.cf-tour-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cf-tour-cyan);
}

.cf-tour-pill-action { color: var(--cf-tour-cyan); }

/* While a step gets ready: a pulsing dot and a note, also on phones. */
.cf-tour-pill-waiting { display: none; color: var(--cf-tour-cyan); }
.cf-tour-root[data-tour-waiting="true"] .cf-tour-pill-waiting { display: inline; }
.cf-tour-root[data-tour-waiting="true"] .cf-tour-pill > span:not(.cf-tour-pill-dot):not(.cf-tour-pill-waiting) { display: none; }
.cf-tour-root[data-tour-waiting="true"] .cf-tour-pill-dot { animation: cf-tour-pulse 1s ease-in-out infinite; }
@keyframes cf-tour-pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) {
  .cf-tour-root[data-tour-waiting="true"] .cf-tour-pill-dot { animation: none; }
}

.cf-tour-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Phones: dock the card above the UI's bottom navigation bar; the pill
   returns when no step is showing. */
@media (max-width: 760px) {
  .cf-tour-card:not(.is-centered) {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 84px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100dvh - 100px);
  }
  .cf-tour-dock { bottom: 84px; left: 12px; }
  .cf-tour-root[data-tour-status="active"] .cf-tour-dock { display: none; }
  .cf-tour-root[data-tour-status="active"][data-tour-waiting="true"] .cf-tour-dock { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-tour-spotlight, .cf-tour-card { animation: none; }
}

/* While a card's button shows something (cards dragged into place), the card
   and spotlight step aside, and the tour's pointer does the dragging. Its tip
   is at the point it presses. */
.cf-tour-root[data-tour-playing="true"] .cf-tour-card,
.cf-tour-root[data-tour-playing="true"] .cf-tour-spotlight {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cf-tour-cursor {
  position: fixed;
  top: -3px;
  left: -4px;
  z-index: 2147483001;
  width: 26px;
  height: 26px;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(10, 14, 39, 0.35));
  transition: opacity 0.2s ease;
}

.cf-tour-cursor svg { display: block; }

.cf-tour-cursor::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -9px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.4);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.cf-tour-cursor.is-pressed::before { transform: scale(1); }
.cf-tour-cursor.is-leaving { opacity: 0; }

/* The task feedback widget's screenshots are of the app, not of the tour:
   while one is taken (its progress bar is on the page), the overlay hides. */
body:has(> .profound-screenshot-progress) .cf-tour-root { visibility: hidden; }
