#genieIframe {
  height: 100%;
  margin: 0 !important;
}

#desktopIframeContainer {
  height: 100%;
}

.genie-ai-column {
  border-radius: 8px;
  padding: 0 20px;
  height: fit-content;
  position: sticky;
  top: 117px;
}

.genie-ai-column h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
}

.genie-ai-column iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 8px;
}

#toggleButton {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100000;
  padding: 8px 16px;
  background: #FF6B00 !important;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px 0 0 5px;
}

#iframeContainer {
  position: fixed;
  right: -25%;
  top: 0;
  width: 25%;
  height: 100%;
  transition: right 0.3s ease;
  z-index: 99999;
  background: white;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

@media (min-width: 769px) and (max-width: 1023px) {
  #iframeContainer {
    width: 45%;
    right: -45%;
  }
}

#iframeContainer.show {
  right: 0;
}

#iframeContainer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  #toggleButton {
    right: 50%;
    bottom: 0;
    top: auto;
    transform: translateX(50%);
    border-radius: 5px 5px 0 0;
  }

  #iframeContainer {
    right: 0;
    bottom: -100%;
    top: auto;
    width: 100%;
    height: 100%;
    transition: bottom 0.3s ease;
  }

  #iframeContainer.show {
    bottom: 0;
  }
}

/* Desktop three-column layout - Lesson pages only */
@media (min-width: 1024px) {
  .single-sfwd-lessons .bb-grid.grid {
    display: grid;
    grid-template-columns: 370px minmax(380px, 1fr) minmax(0, 1fr);
    gap: 0;
  }

  .single-sfwd-lessons .genie-ai-desktop {
    display: block;
    height: 100%;
  }

  .single-sfwd-lessons .genie-ai-mobile {
    display: none;
  }
}

/* Mobile toggle layout - Lesson pages only */
@media (max-width: 1023px) {
  .single-sfwd-lessons .genie-ai-desktop {
    display: none;
  }

  .single-sfwd-lessons .genie-ai-mobile {
    display: block;
  }
}