/* ─────────────────────────────────────────────
   Listside Onboarding Tour Styles
   Include in base.html or as a linked stylesheet
───────────────────────────────────────────── */

/* Overlay — dims the page */
.ls-tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 35, 0.72);
  z-index: 9000;
  animation: lsFadeIn 0.2s ease;
}

/* Highlight ring around target element */
.ls-tour-highlight {
  position: absolute;
  z-index: 9100;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px #1f7a70,
    0 0 0 8px rgba(31, 122, 112, 0.25),
    0 0 24px rgba(31, 122, 112, 0.4);
  pointer-events: none;
  animation: lsPulse 1.8s ease-in-out infinite;
  transition: all 0.25s ease;
}

@keyframes lsPulse {
  0%, 100% { box-shadow: 0 0 0 4px #1f7a70, 0 0 0 8px rgba(31,122,112,0.25), 0 0 24px rgba(31,122,112,0.4); }
  50%       { box-shadow: 0 0 0 4px #1f7a70, 0 0 0 12px rgba(31,122,112,0.15), 0 0 36px rgba(31,122,112,0.3); }
}

/* Popover wrapper */
.ls-tour-popover-wrap {
  position: fixed;
  z-index: 9200;
  animation: lsSlideUp 0.22s ease;
}

@keyframes lsSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lsFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Popover card */
.ls-tour-popover {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

.ls-tour-popover-inner {
  display: flex;
  gap: 0;
}

/* Left: main content */
.ls-tour-main {
  flex: 1;
  padding: 1.5rem 1.5rem 1.25rem;
  min-width: 0;
}

.ls-tour-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: #1f2e4a;
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.ls-tour-desc {
  font-size: 0.88rem;
  color: #3d4a60;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.ls-tour-desc b { color: #1f2e4a; }

/* Action buttons row */
.ls-tour-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ls-tour-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ls-tour-btn-primary {
  background: #1f2e4a;
  color: #fff;
}
.ls-tour-btn-primary:hover { background: #2e4a6e; }

.ls-tour-btn-action {
  background: #1f7a70;
  color: #fff;
}
.ls-tour-btn-action:hover { background: #165f57; }

.ls-tour-btn-ghost {
  background: #f0f4fa;
  color: #1f2e4a;
  border: 1.5px solid #d0d7e2;
}
.ls-tour-btn-ghost:hover { background: #e2e8f4; }

.ls-tour-btn-skip {
  background: none;
  color: #9aa3b5;
  border: none;
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  margin-left: auto;
}
.ls-tour-btn-skip:hover { color: #dc3545; text-decoration: underline; }

/* Right: progress checklist panel */
.ls-tour-progress {
  width: 200px;
  flex-shrink: 0;
  background: #f5f7fc;
  border-left: 1px solid #e8ecf4;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ls-tour-progress-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ls-tour-step-count {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a99;
}

.ls-tour-progress-bar-wrap {
  height: 4px;
  background: #dde3ef;
  border-radius: 2px;
  overflow: hidden;
}

.ls-tour-progress-bar {
  height: 100%;
  background: #1f7a70;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Checklist items */
.ls-tour-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ls-tour-check-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #9aa3b5;
  line-height: 1.3;
  transition: color 0.15s;
}

.ls-tour-check-item.done {
  color: #1f7a70;
}

.ls-tour-check-item.current {
  color: #1f2e4a;
  font-weight: 600;
}

.ls-tour-check-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

.ls-tour-check-item.done .ls-tour-check-icon {
  color: #1f7a70;
  font-weight: 700;
}

.ls-tour-check-item.current .ls-tour-check-icon {
  color: #1f7a70;
}

/* ── Help menu dropdown ── */
.ls-help-wrap {
  position: relative;
  display: inline-block;
}

.ls-help-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  border: 1px solid #e2e8f0;
  min-width: 190px;
  z-index: 600;
  overflow: hidden;
  animation: lsSlideUp 0.15s ease;
}

.ls-help-menu.open { display: block; }

.ls-help-menu a,
.ls-help-menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #1f2e4a;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.ls-help-menu a:hover,
.ls-help-menu button:hover {
  background: #f5f7fc;
}

.ls-help-menu .ls-help-divider {
  height: 1px;
  background: #e8ecf4;
  margin: 0;
}

/* ── MOBILE ── */
@media (max-width: 576px) {

  /* Popover sits at bottom of screen like a sheet */
  .ls-tour-popover-wrap {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100%;
  }

  .ls-tour-popover {
    border-radius: 16px 16px 0 0;
    width: 100%;
  }

  .ls-tour-popover-inner {
    flex-direction: column;
  }

  /* Hide the full checklist on mobile */
  .ls-tour-checklist {
    display: none;
  }

  /* Slim progress bar + step count only */
  .ls-tour-progress {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e8ecf4;
    padding: 0.6rem 1rem 0.75rem;
    background: #f5f7fc;
    gap: 0.35rem;
  }

  .ls-tour-progress-header {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .ls-tour-step-count {
    white-space: nowrap;
    font-size: 0.68rem;
  }

  .ls-tour-progress-bar-wrap {
    flex: 1;
    height: 5px;
  }

  .ls-tour-main {
    padding: 1.25rem 1rem 0.75rem;
  }

  .ls-tour-title {
    font-size: 1rem;
  }

  .ls-tour-desc {
    font-size: 0.84rem;
  }

/* Help menu opens left-aligned on mobile */
  .ls-help-wrap .ls-help-menu {
    top: calc(100% + 4px);
    bottom: auto;
    left: 0;
    right: auto;
  }
}

 /* ─────────────────────────────────────────────
   Listside Page Intro Popup
   Add to onboarding_tour.css or as separate include
───────────────────────────────────────────── */

.ls-intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 35, 0.65);
  z-index: 8000;
  animation: lsFadeIn 0.2s ease;
}

.ls-intro-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  z-index: 8100;
  width: 92vw;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'DM Sans', sans-serif;
  animation: lsSlideUp 0.22s ease;
}

.ls-intro-header {
  background: #1f2e4a;
  border-radius: 16px 16px 0 0;
  padding: 1.1rem 1.4rem;
}

.ls-intro-header h4 {
  font-family: 'Syne', sans-serif;
  color: #fff;
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.ls-intro-body {
  padding: 1.25rem 1.4rem 0.75rem;
}

.ls-intro-body p {
  font-size: 0.88rem;
  color: #3d4a60;
  line-height: 1.65;
  margin: 0 0 0.85rem;
}

.ls-intro-body p:last-child { margin-bottom: 0; }

.ls-intro-body b { color: #1f2e4a; }

.ls-intro-footer {
  padding: 0.85rem 1.4rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid #f0f2f7;
}

.ls-intro-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #6b7a99;
  cursor: pointer;
  user-select: none;
}

.ls-intro-check input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: #1f7a70;
  cursor: pointer;
}

.ls-intro-close {
  background: #1f2e4a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.ls-intro-close:hover { background: #2e4a6e; }

@media (max-width: 576px) {
  .ls-intro-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
  }

  .ls-intro-header {
    border-radius: 16px 16px 0 0;
  }

  .ls-intro-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ls-intro-close {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
  }
}