/* ============= SLIDE-OUT SIDEBAR ============= */
.sidebar {
  width: 250px;
  height: 100vh;
  background-color: #f8f9fa;
  transition: transform 0.3s ease-in-out, left 0.3s ease-in-out;
  z-index: 1001;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.sidebar-opened {
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 103px; /* below black navbar */
    left: -250px;
    height: calc(100vh - 103px);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);
    transform: none;
  }

  .sidebar.open {
    left: 0;
  }

  /* Sidebar toggle button (Hamburger) */
  .sidebar-toggle-btn {
    position: fixed;
    top: 80px; /* ✅ Final confirmed safe position */
    left: 15px;
    z-index: 1101;
    background-color: #343a40;
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: block;
    transition: left 0.3s ease-in-out;
  }

  body.sidebar-opened .sidebar-toggle-btn {
    left: 265px; /* Positioned next to open sidebar */
  }

  .sidebar .nav-link,
  .sidebar .nav-item a {
    font-size: 18px;
    padding: 12px 20px;
    display: block;
  }

  .sidebar .nav-item i {
    font-size: 20px;
    margin-right: 10px;
  }
}

@media (min-width: 769px) {
  .sidebar-toggle-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  #quickTourBtn,
  #hideTourBtn {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .navbar-collapse.show ~ .sidebar-toggle-btn {
    display: none !important;
  }
}

/* Responsive table container */
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper table {
  min-width: 600px; /* or wider if needed */
}

/* ========== Step Navigation Styles ========== */
.step-nav-wrapper {
  width: 380px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.step-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 10px 0;
}

.step-btn {
  background: #ccc;
  border: none;
  padding: 16px 18px;
  border-radius: 10px;
  color: #333;
  font-weight: 800;
  text-align: left;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #aaa;
  font-size: 18px;
  line-height: 1.3;
  font-family: 'Segoe UI', sans-serif;
}

.step-nav .step-btn {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}


.step-btn i {
  opacity: 0.8;
  margin-right: 8px;
}

.step-btn:hover {
  background-color: #bbb;
  box-shadow: inset 0 0 0 2px #999;
}

.step-btn.active {
  background-color: #51AB55;
  color: white;
  box-shadow: inset 0 0 0 2px #218838;
}

/* ========== Video Panel Styles ========== */
.video-panel {
  width: 580px !important;
  max-width: 100%;
  flex-grow: 0 !important;
  margin: 0 auto; /* center horizontally */
  padding: 0;
}

.video-wrapper {
  background-color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 580px;
  max-width: 580px !important; reduce size */
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.video-wrapper iframe {
  width: 100%; !important;
  height: 100%; !important;
  border: none;
}

/* ========== Desktop Layout Fix ========== */
@media (min-width: 768px) {
  #onboardingSteps .card-body {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 20px;
  }

  .step-nav-wrapper {
    width: 380px;
    max-width: 100%;
  }
}

/* ========== Mobile Layout Fix ========== */
@media (max-width: 767px) {
  #onboardingSteps {
    padding: 9px;
    margin: 0 auto;
    max-width: 95%;
  }

  .step-nav {
    gap: 5px;
    margin-bottom: 10px;
  }

  .step-nav-wrapper {
    padding: 0 12px !important;
    margin-top: 10px !important;
    margin-bottom: 13px !important;
  }

  .step-btn {
    font-size: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .step-btn i {
    font-size: 14px;
  }

  .step-btn small {
    font-size: 13px;
  }

  .video-panel {
    margin-top: 12px !important;
    padding: 0 6px !important;
  }

  .video-wrapper {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
}
