/* ============== Walkthrough overlay ============== */
.walkthrough-overlay[x-cloak] {
  display: none !important;
}

.walkthrough-launcher[x-cloak] {
  display: none !important;
}

.walkthrough-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.walkthrough-overlay__scrim {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

.walkthrough-popover {
  position: fixed;
  left: 0;
  top: 0;
  width: min(calc(100vw - 2rem), 22rem);
  max-width: 22rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.25);
  color: rgb(15 23 42);
  padding: 1rem;
  pointer-events: auto;
}

.walkthrough-popover--error {
  border-color: rgb(251 146 60);
}

.walkthrough-popover__dismiss {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(100 116 139);
  font-size: 1.25rem;
  line-height: 1;
}

.walkthrough-popover__dismiss:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}

.walkthrough-popover__title {
  padding-right: 2rem;
  margin: 0;
  color: rgb(15 23 42);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.walkthrough-popover__error {
  margin: 0.625rem 0 0;
  border-left: 3px solid rgb(251 146 60);
  background: rgb(255 247 237);
  color: rgb(154 52 18);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.5rem 0.625rem;
}

.walkthrough-popover__body {
  margin-top: 0.5rem;
  color: rgb(51 65 85);
  font-size: 0.875rem;
  line-height: 1.5;
}

.walkthrough-popover__body p {
  margin: 0;
}

.walkthrough-popover__body p + p {
  margin-top: 0.5rem;
}

.walkthrough-popover__help {
  display: inline-flex;
  margin-top: 0.75rem;
  color: rgb(67 56 202);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.walkthrough-popover__help:hover {
  color: rgb(55 48 163);
  text-decoration: underline;
}

.walkthrough-popover__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.walkthrough-button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}

.walkthrough-button--primary {
  border-color: rgb(79 70 229);
  background: rgb(79 70 229);
  color: white;
}

.walkthrough-button--primary:hover {
  background: rgb(67 56 202);
}

.walkthrough-button--ghost {
  border-color: rgb(203 213 225);
  background: white;
  color: rgb(51 65 85);
}

.walkthrough-button--ghost:hover {
  background: rgb(248 250 252);
}

.walkthrough-help-icon {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  margin-left: 0.125rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(71 85 105);
  cursor: pointer;
  vertical-align: middle;
}

.walkthrough-help-icon span {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(226 232 240);
  color: rgb(71 85 105);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  transition: background 120ms ease, color 120ms ease;
}

.walkthrough-help-icon:hover span {
  background: rgb(199 210 254);
  color: rgb(67 56 202);
}

.walkthrough-help-icon:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}

.walkthrough-launcher {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: rgb(15 23 42 / 0.55);
  padding: 1rem;
}

.walkthrough-launcher__card {
  width: min(100%, 42rem);
  margin: 2rem auto;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.25);
  color: rgb(15 23 42);
}

.walkthrough-launcher__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(226 232 240);
  padding: 1rem;
}

.walkthrough-launcher__title {
  margin: 0;
  color: rgb(15 23 42);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.walkthrough-launcher__subtitle {
  margin: 0.25rem 0 0;
  color: rgb(71 85 105);
  font-size: 0.875rem;
  line-height: 1.45;
}

.walkthrough-launcher__close {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(100 116 139);
  font-size: 1.375rem;
  line-height: 1;
}

.walkthrough-launcher__close:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}

.walkthrough-launcher__body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.walkthrough-launcher__group {
  display: grid;
  gap: 0.5rem;
}

.walkthrough-launcher__module {
  margin: 0;
  color: rgb(71 85 105);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.walkthrough-launcher__list {
  display: grid;
  gap: 0.75rem;
}

.walkthrough-launcher__item {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  padding: 1rem;
}

.walkthrough-launcher__item-main {
  min-width: 0;
}

.walkthrough-launcher__item-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.walkthrough-launcher__item-title {
  margin: 0;
  color: rgb(15 23 42);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.walkthrough-launcher__description {
  margin: 0.5rem 0 0;
  color: rgb(71 85 105);
  font-size: 0.875rem;
  line-height: 1.45;
}

.walkthrough-launcher__minutes {
  margin: 0.5rem 0 0;
  color: rgb(100 116 139);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.walkthrough-launcher__scope-tag,
.walkthrough-launcher__progress-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.walkthrough-launcher__scope-tag {
  background: rgb(238 242 255);
  color: rgb(67 56 202);
}

.walkthrough-launcher__scope-tag--brief {
  background: rgb(236 253 245);
  color: rgb(4 120 87);
}

.walkthrough-launcher__progress-pill--in-progress {
  background: rgb(254 243 199);
  color: rgb(146 64 14);
}

.walkthrough-launcher__progress-pill--completed {
  background: rgb(241 245 249);
  color: rgb(71 85 105);
}

.walkthrough-launcher__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.walkthrough-launcher__actions .walkthrough-button {
  min-height: 2.75rem;
}

.walkthrough-launcher__empty,
.walkthrough-launcher__error {
  border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
  background: rgb(248 250 252);
  color: rgb(71 85 105);
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 1rem;
}

.walkthrough-launcher__error {
  border-color: rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(185 28 28);
}

/* ============== Global help icon (top nav) ============== */
.walkthrough-global-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}

.walkthrough-global-help:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.walkthrough-global-help:focus-visible {
  outline: 2px solid rgb(165 180 252);
  outline-offset: 2px;
}

.avbase-navbar-support-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.avbase-navbar-support-controls .walkthrough-global-help,
.avbase-navbar-report {
  width: 2rem;
  height: 2rem;
  margin-right: 0;
}

.avbase-navbar-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgb(229 231 235);
  transition:
    background 120ms ease,
    border-color 120ms ease;
}

.avbase-navbar-report:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgb(243 244 246);
}

.avbase-navbar-report:focus-visible {
  outline: 2px solid rgb(165 180 252);
  outline-offset: 2px;
}

.avbase-navbar-report__icon {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
}

.walkthrough-debug-surface {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: grid;
  width: min(22rem, calc(100vw - 2rem));
  gap: 0.5rem;
  border: 1px solid rgb(148 163 184);
  border-radius: 0.375rem;
  background: rgb(255 255 255 / 0.96);
  color: rgb(51 65 85);
  font-size: 0.75rem;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 0.625rem;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.14);
}

.walkthrough-debug-surface__row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.walkthrough-debug-target,
.walkthrough-debug-surface button,
.walkthrough-debug-surface input,
.walkthrough-debug-surface span {
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.walkthrough-debug-target,
.walkthrough-debug-surface button {
  border: 1px solid rgb(148 163 184);
  background: white;
  color: rgb(51 65 85);
  font-weight: 700;
  line-height: 1;
  padding: 0.375rem 0.5rem;
}

.walkthrough-debug-surface input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgb(203 213 225);
  padding: 0.25rem 0.375rem;
}

.walkthrough-debug-pill {
  border: 1px solid rgb(203 213 225);
  background: rgb(248 250 252);
  padding: 0.25rem 0.375rem;
}

@media (width >= 40rem) {
  .walkthrough-popover {
    max-width: 24rem;
    width: 24rem;
  }

  .walkthrough-launcher {
    padding: 1.5rem;
  }

  .walkthrough-launcher__item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .walkthrough-launcher__actions {
    justify-content: flex-end;
  }
}
