/**
 * Academy LMS Custom Interactive Lesson Layout
 * Namespace: .academy-interactive-lesson
 */

.academy-interactive-lesson {
  font-family: 'Neue Montreal', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 680px;
  margin: 0 auto;
  color: #1a1c1b;
  line-height: 1.62;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.011em;
}

.academy-interactive-lesson * {
  box-sizing: border-box;
}

/* Brand Banner Styling */
.academy-interactive-lesson .lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 18px;
  border-bottom: 1px solid #ecefee;
  margin-bottom: 18px;
}

.academy-interactive-lesson .lesson-header img.brand-logo {
  height: 34px;
  width: auto;
}

.academy-interactive-lesson .lesson-header .brand-meta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: #8a938f;
}

/* Headings & Meta Tags */
.academy-interactive-lesson .mtag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #0e8c7f;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.academy-interactive-lesson h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 8px 0 22px;
  color: #0b0c0c;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.academy-interactive-lesson h2 {
  font-size: 21px;
  margin: 24px 0 12px;
  color: #0b0c0c;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 0;
  border: 0;
}

.academy-interactive-lesson p {
  margin: 0 0 16px;
  color: #33403c;
}

.academy-interactive-lesson ul,
.academy-interactive-lesson ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.academy-interactive-lesson li {
  margin-bottom: 9px;
  color: #33403c;
}

.academy-interactive-lesson b,
.academy-interactive-lesson strong {
  font-weight: 600;
  color: #1a1c1b;
}

/* Callout Component Blocks */
.academy-interactive-lesson .callout-box {
  border-radius: 18px;
  padding: 20px 22px;
  margin: 20px 0;
}

/* Callout Types (Reused across units) */
.academy-interactive-lesson .callout-box.callout-info {
  background: #f6f8f7;
  border: 1px solid #e6eae8;
}

.academy-interactive-lesson .callout-box.callout-info b {
  color: #0e8c7f;
}

.academy-interactive-lesson .callout-box.callout-success {
  background: #f2fbf6;
  border-left: 4px solid #19a974;
  border-radius: 6px 18px 18px 6px;
}

.academy-interactive-lesson .callout-box.callout-warning {
  background: #fffbf0;
  border-left: 4px solid #f5c518;
  border-radius: 6px 18px 18px 6px;
}

.academy-interactive-lesson .callout-box.callout-danger {
  background: #fdf5f4;
  border-left: 4px solid #e0635c;
  border-radius: 6px 18px 18px 6px;
}

.academy-interactive-lesson .callout-box.callout-reflect {
  background: #ffffff;
  border: 1px dashed #bfd8d3;
}

.academy-interactive-lesson .callout-box.callout-blue {
  background: #f4f7fb;
  border: 1px solid #dce6f2;
}

.academy-interactive-lesson .callout-box.callout-blue b,
.academy-interactive-lesson .callout-box.callout-blue a {
  color: #2c5c92;
  text-decoration: none;
}

/* Framed Context Elements */
.academy-interactive-lesson .framed-panel {
  background: #fbfaf6;
  border: 1px solid #ece6d4;
  border-radius: 18px;
  padding: 18px 22px;
  margin: 20px 0;
}

.academy-interactive-lesson .framed-panel .panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  color: #9a7b16;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.academy-interactive-lesson .framed-panel .panel-title::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f5c518, #e0a90a);
  display: inline-block;
  flex: 0 0 auto;
}

.academy-interactive-lesson .framed-panel p {
  font-size: 15.5px;
  color: #3b4742;
  margin-bottom: 10px;
}

.academy-interactive-lesson .framed-panel a {
  color: #9a7b16;
  font-weight: 500;
  text-decoration: underline;
}

/* Semantic Details / Accordions */
.academy-interactive-lesson details {
  margin: 11px 0;
  background: #ffffff;
  border: 1px solid #e6eae8;
  border-radius: 14px;
  padding: 13px 17px;
  transition: all 0.2s ease;
}

.academy-interactive-lesson details[open] {
  border-color: #0e8c7f;
  box-shadow: 0 4px 12px rgba(14, 140, 127, 0.05);
}

.academy-interactive-lesson summary {
  cursor: pointer;
  font-weight: 500;
  color: #0b0c0c;
  outline: none;
  list-style: none;
}

.academy-interactive-lesson summary::-webkit-details-marker {
  display: none;
}

.academy-interactive-lesson summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: #0e8c7f;
  transition: transform 0.2s ease;
}

.academy-interactive-lesson details[open] summary::before {
  transform: rotate(90deg);
}

.academy-interactive-lesson details p {
  margin: 11px 0 0;
  color: #4a5650;
  font-size: 15.5px;
}

/* SVGs and Figures */
.academy-interactive-lesson figure {
  margin: 22px 0;
  text-align: center;
}

.academy-interactive-lesson figure svg,
.academy-interactive-lesson figure img {
  width: 100%;
  max-width: 540px;
  height: auto;
}

.academy-interactive-lesson figcaption {
  font-size: 13px;
  color: #8a938f;
  margin-top: 10px;
  font-weight: 400;
}

/* Swap/Compare Grid Boxes */
.academy-interactive-lesson .swap-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.academy-interactive-lesson .swap-grid > div {
  flex: 1;
  min-width: 230px;
  border-radius: 14px;
  padding: 15px 17px;
  font-size: 15px;
}

.academy-interactive-lesson .swap-grid .swap-no {
  background: #fdf5f4;
  border: 1px solid #f3d3d0;
}

.academy-interactive-lesson .swap-grid .swap-yes {
  background: #f2fbf6;
  border: 1px solid #bfe6d2;
}

/* Pagination Dots */
.academy-interactive-lesson .lesson-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 8px 0 24px;
  flex-wrap: wrap;
}

.academy-interactive-lesson .lesson-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: #d6dedb;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.academy-interactive-lesson .lesson-dots button.on {
  background: #0e8c7f;
  width: 26px;
  border-radius: 5px;
}

.academy-interactive-lesson .lesson-dots button.done {
  background: #9ad9d0;
}

/* Step Layout & Animation */
.academy-interactive-lesson .lesson-step {
  display: none;
}

/* No-JS Fallback: render steps sequentially */
.academy-interactive-lesson.no-js .lesson-step {
  display: block;
  border-bottom: 1px solid #ecefee;
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.academy-interactive-lesson .lesson-step.on {
  display: block;
  animation: lessonFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .academy-interactive-lesson .lesson-step {
    animation: none !important;
  }
}

/* Footer & Navigation Controls */
.academy-interactive-lesson .lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid #ecefee;
}

.academy-interactive-lesson.no-js .lesson-nav,
.academy-interactive-lesson.no-js .lesson-dots {
  display: none;
}

.academy-interactive-lesson .lesson-nav button {
  border: 0;
  cursor: pointer;
  font-family: 'Neue Montreal', 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 980px;
  letter-spacing: -0.01em;
  transition: opacity 0.2s, background-color 0.2s;
}

.academy-interactive-lesson .lesson-nav .btn-next {
  background: #0b0c0c;
  color: #ffffff;
}

.academy-interactive-lesson .lesson-nav .btn-next:hover:not(:disabled) {
  opacity: 0.85;
}

.academy-interactive-lesson .lesson-nav .btn-prev {
  background: #f0f2f1;
  color: #33403c;
}

.academy-interactive-lesson .lesson-nav button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.academy-interactive-lesson .nav-status-text {
  font-size: 12.5px;
  color: #9298a0;
  font-weight: 400;
}

/* Custom Footer details */
.academy-interactive-lesson .lesson-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #ecefee;
  font-size: 11px;
  letter-spacing: .02em;
  color: #9298a0;
  font-weight: 400;
}

.academy-interactive-lesson .lesson-footer img.footer-badge {
  height: 18px;
  opacity: 0.5;
}