/* NMGD 1.3.2 — Ana eğitim sayfası: sabit yükseklikte, sürüklenebilir ders listesi. */
/* Yalnızca bu eklentinin eklediği sınıflar hedeflenir; site header/footer etkilenmez. */
body.single-product .nmgd-module-title,
body.single-product .nmgd-lesson-grid {
  --nmgd-accent: #307f78;
  --nmgd-soft: #eef8f5;
  --nmgd-border: #cde7df;
  --nmgd-text: #294b47;
}
body.single-product .nmgd-module-title[data-nmgd-module="2"],
body.single-product .nmgd-lesson-grid[data-module="2"] {
  --nmgd-accent: #4668ad;
  --nmgd-soft: #f0f4fc;
  --nmgd-border: #d6dff3;
  --nmgd-text: #2d456d;
}
body.single-product .nmgd-module-title[data-nmgd-module="3"],
body.single-product .nmgd-lesson-grid[data-module="3"] {
  --nmgd-accent: #8362a0;
  --nmgd-soft: #f7f3fb;
  --nmgd-border: #e5d9ef;
  --nmgd-text: #594370;
}
/* Modül başlığı: her ders grubunun ayrı başlık kartı */
body.single-product .nmgd-module-title {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  position: relative;
  border: 1px solid var(--nmgd-border) !important;
  border-inline-start: 5px solid var(--nmgd-accent) !important;
  border-radius: 16px 16px 0 0 !important;
  background: var(--nmgd-soft) !important;
  color: inherit !important;
  padding: 17px 20px !important;
  margin: 18px 0 0 !important;
  box-sizing: border-box;
  font-size: clamp(18px,2vw,24px) !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: -.012em;
}
body.single-product .nmgd-module-title .nmgd-module-count {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--nmgd-border);
  background: #fff;
  color: var(--nmgd-text);
  padding: 6px 11px;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
/* Sol tanıtım videosu + sağ sabit ders listesi */
body.single-product .nmgd-lesson-grid {
  display: grid !important;
  grid-template-columns: minmax(180px,32%) minmax(0,1fr) !important;
  align-items: start !important;
  position: relative;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 22px !important;
  padding: 15px !important;
  background: #fff !important;
  border: 1px solid var(--nmgd-border) !important;
  border-top: 0 !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: 0 11px 26px rgba(28,42,51,.055) !important;
  box-sizing: border-box;
}
body.single-product .nmgd-lesson-grid .nmgd-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative !important;
  top: auto !important;
  aspect-ratio: 16/10;
  min-height: 210px;
  width: 100%;
  border: 1px solid var(--nmgd-border);
  border-radius: 13px;
  background: var(--nmgd-soft);
  color: var(--nmgd-text);
  overflow: hidden;
  box-shadow: 0 6px 19px rgba(0,0,0,.045);
  box-sizing: border-box;
  cursor: pointer;
}
body.single-product .nmgd-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 10px;
  box-sizing: border-box;
  font-size: 13px;
  text-align: center;
  line-height: 1.4;
}
body.single-product .nmgd-preview-placeholder[hidden] { display: none !important; }
body.single-product .nmgd-preview-placeholder strong { font-size: 13px; font-weight: 700; }
body.single-product .nmgd-preview-placeholder > span:last-child { opacity:.75; font-size:11px; }
body.single-product .nmgd-preview-icon {
  display:flex; align-items:center; justify-content:center;
  width:48px; height:48px; border-radius:50%;
  border:1px solid var(--nmgd-border); background:#fff;
  color:var(--nmgd-accent); font-size:18px;
  box-shadow:0 3px 12px rgba(0,0,0,.05);
}
body.single-product .nmgd-preview-stage .nmgd-preview-media,
body.single-product .nmgd-preview-stage > iframe,
body.single-product .nmgd-preview-stage > video {
  position:absolute !important; inset:0;
  width:100% !important; height:100% !important;
  display:block !important; border:0 !important;
  margin:0 !important; padding:0 !important;
  object-fit:contain !important; background:#101010;
  border-radius:inherit;
}
body.single-product .nmgd-preview-stage .nmgd-preview-badge {
  position:absolute; z-index:2; left:9px; top:9px;
  padding:5px 9px; border-radius:6px;
  background:rgba(0,0,0,.72); color:#fff;
  font-size:11px; line-height:1.2;
}
body.single-product .nmgd-preview-stage .nmgd-preview-progress {
  position:absolute; z-index:2; bottom:0; left:0;
  width:0; height:3px; background:var(--nmgd-accent);
  transition:width 5s linear;
}
body.single-product .nmgd-is-playing .nmgd-preview-progress { width:100%; }
/* Görselin boyu neyse ders listesi de aynı boydadır; sayfayı uzatmaz. */
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list {
  counter-reset:nmgdlessons;
  height:var(--nmgd-list-height,210px) !important;
  max-height:var(--nmgd-list-height,210px) !important;
  min-height:0 !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:2px 5px 4px 0 !important;
  list-style:none !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
  scroll-behavior:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--nmgd-accent) #edf0f2;
  cursor:grab;
  touch-action:pan-y;
  box-sizing:border-box !important;
  -webkit-overflow-scrolling:touch;
}
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list::-webkit-scrollbar { width:8px; }
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list::-webkit-scrollbar-track { background:#edf0f2; border-radius:999px; }
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list::-webkit-scrollbar-thumb { background:var(--nmgd-accent); border-radius:999px; }
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list.nmgd-is-dragging,
body.single-product .nmgd-lesson-grid > .nmgd-lesson-list.nmgd-is-dragging * {
  cursor:grabbing !important;
  user-select:none !important;
  -webkit-user-select:none !important;
}
/* Kartlar birbirinden ayrılır, numaralar ve yumuşak vurgu renkleri ile okunur. */
body.single-product .nmgd-lesson-list > li {
  counter-increment:nmgdlessons;
  list-style:none !important;
  display:block !important;
  position:relative !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:12px 12px 12px 55px !important;
  background:#fff !important;
  border:1px solid var(--nmgd-border) !important;
  border-inline-start:3px solid var(--nmgd-accent) !important;
  border-radius:11px !important;
  box-shadow:0 2px 6px rgba(19,33,48,.035) !important;
  color:inherit !important;
  font-size:14px !important;
  line-height:1.55 !important;
  box-sizing:border-box !important;
  transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
body.single-product .nmgd-lesson-list > li:nth-child(2n) { background:var(--nmgd-soft) !important; }
body.single-product .nmgd-lesson-list > li:hover,
body.single-product .nmgd-lesson-list > li:focus-within {
  background:var(--nmgd-soft) !important;
  box-shadow:0 4px 12px rgba(19,33,48,.075) !important;
  transform:translateX(2px);
}
body.single-product .nmgd-lesson-list > li::before {
  content:counter(nmgdlessons,decimal-leading-zero) !important;
  display:grid !important;
  place-items:center;
  position:absolute !important;
  top:50% !important;
  transform:translateY(-50%);
  left:11px !important;
  width:31px !important;
  height:31px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:8px;
  background:var(--nmgd-soft);
  color:var(--nmgd-accent);
  font-size:12px !important;
  font-weight:800 !important;
  font-variant-numeric:tabular-nums;
  opacity:1 !important;
}
body.single-product .nmgd-lesson-list > li::after { content:none !important; }
body.single-product .nmgd-lesson-list > li a { color:inherit; }
body.single-product .nmgd-lesson-list:focus-visible { outline:2px solid var(--nmgd-accent); outline-offset:3px; }
body.single-product .nmgd-lesson-grid .nmgd-scroll-hint {
  position:absolute;
  bottom:19px;
  right:28px;
  z-index:1;
  display:none;
  pointer-events:none;
  color:var(--nmgd-text);
  background:rgba(255,255,255,.94);
  border:1px solid var(--nmgd-border);
  box-shadow:0 2px 7px rgba(0,0,0,.04);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  border-radius:999px;
  padding:5px 9px;
}
body.single-product .nmgd-lesson-grid.nmgd-can-scroll:not(.nmgd-scroll-at-bottom) .nmgd-scroll-hint { display:block; }
body.single-product .nmgd-lesson-grid.nmgd-is-grabbing .nmgd-scroll-hint { display:none !important; }
@media (max-width:760px) {
  body.single-product .nmgd-module-title { font-size:18px !important; padding:14px 15px !important; }
  body.single-product .nmgd-lesson-grid { grid-template-columns:minmax(0,1fr) !important; padding:12px !important; gap:12px !important; }
  body.single-product .nmgd-lesson-grid .nmgd-preview-stage { width:100%; max-width:none; min-height:210px; }
  body.single-product .nmgd-lesson-list > li { font-size:13px !important; padding:11px 12px 11px 50px !important; }
  body.single-product .nmgd-lesson-grid .nmgd-scroll-hint { right:26px; bottom:21px; }
}
@media (prefers-reduced-motion:reduce) {
  body.single-product .nmgd-preview-stage .nmgd-preview-progress,
  body.single-product .nmgd-lesson-list > li { transition:none !important; transform:none !important; }
}

/* Oynatılamayan / seçilmemiş videoda açıklamanın okunabilir kalması */
body.single-product .nmgd-lesson-grid .nmgd-preview-placeholder span:last-child { max-width:100%; overflow-wrap:anywhere; }

/* NMGD 1.3.4: missing preview distinguishes source configuration from hover malfunction. */
body.single-product .nmgd-lesson-grid[data-preview-status="missing"] .nmgd-preview-stage {
  border-style: dashed;
}
body.single-product .nmgd-lesson-grid[data-preview-status="missing"] .nmgd-preview-placeholder > span:last-child {
  font-weight: 600;
}

/* v1.3.7: Kaynak eşleştirme uyarısı yalnızca Modül 3 */
body.single-product .nmgd-lesson-grid[data-module="3"] .nmgd-lesson-source-unmatched {list-style:none!important; font-style:normal; line-height:1.6; font-size:13px; cursor:default;}


/* v1.3.9 – Mobil eğitim modülleri: video > dersler > satın alma.
   Masaüstündeki çalışan iki sütun ve satın alma düzeni değişmez. */
body.single-product .nmgd-mobile-lessons-label,
body.single-product .nmgd-mobile-actions { display: none !important; }

@media (max-width: 760px) {
  body.single-product .nmgd-module-title {
    margin-top: 18px !important;
    padding: 13px 14px !important;
    border-radius: 15px 15px 0 0 !important;
    gap: 7px !important;
    font-size: 17px !important;
    line-height: 1.4 !important;
  }
  body.single-product .nmgd-module-title .nmgd-module-count {
    margin-inline-start: 0 !important;
    padding: 4px 9px !important;
    font-size: 11px !important;
  }
  body.single-product .nmgd-lesson-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    margin-bottom: 20px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    border-radius: 0 0 15px 15px !important;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-preview-stage {
    display: flex !important;
    order: 1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px !important;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-mobile-lessons-label {
    order: 2 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 3px 0;
    box-sizing: border-box;
    color: var(--nmgd-text);
    font-size: 12px;
    font-weight: 700;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-lesson-list {
    order: 3 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    width: 100% !important;
    height: clamp(180px, 38dvh, 320px) !important;
    max-height: clamp(180px, 38dvh, 320px) !important;
    min-height: 0 !important;
    padding: 2px 5px 3px 0 !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }
  body.single-product .nmgd-lesson-grid .nmgd-lesson-list > li {
    padding: 11px 11px 11px 50px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    border-radius: 10px !important;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-mobile-actions {
    order: 5 !important;
    display: block !important;
    width: 100%;
    border-top: 1px solid var(--nmgd-border);
    padding-top: 12px;
    margin-top: 3px;
    box-sizing: border-box;
  }
  /* v1.3.10: fiyat, butonlardan önce tam satır; sağdaki sıkışık fiyat gizli. */
  body.single-product .nmgd-lesson-grid > .nmgd-mobile-actions .nmgd-mobile-price {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    float: none !important;
    position: static !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    margin: 0 0 12px !important;
    border: 1px solid var(--nmgd-border);
    border-radius: 11px;
    background: var(--nmgd-soft);
    box-sizing: border-box !important;
    color: var(--nmgd-text);
    text-align: center !important;
    line-height: 1.3;
    gap: 5px;
  }
  body.single-product .nmgd-mobile-price-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: .015em;
    opacity: .82;
  }
  body.single-product .nmgd-mobile-price-value {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-mobile-actions .nmgd-mobile-buttons {
    display: grid !important;
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: both !important;
  }
  body.single-product .nmgd-mobile-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px;
    width: 100%;
  }
  body.single-product .nmgd-mobile-action {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: auto;
    width: 100%;
    padding: 12px 7px !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: 1px solid var(--nmgd-accent) !important;
    border-radius: 11px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-align: center;
    cursor: pointer;
    box-shadow: none !important;
    background: #fff !important;
    color: var(--nmgd-accent) !important;
    text-transform: none !important;
  }
  body.single-product .nmgd-mobile-action-buy {
    background: var(--nmgd-accent) !important;
    color: #fff !important;
  }
  body.single-product .nmgd-mobile-action:focus-visible {
    outline: 2px solid var(--nmgd-accent);
    outline-offset: 3px;
  }
  body.single-product .nmgd-lesson-grid > .nmgd-scroll-hint { display: none !important; }
  body.single-product .nmgd-mobile-original-action,
  body.single-product .nmgd-mobile-original-price,
  body.single-product .nmgd-mobile-original-price.price,
  body.single-product .nmgd-mobile-original-price.module-price,
  body.single-product .nmgd-mobile-original-price.course-price {
    display: none !important;
    visibility: hidden !important;
  }
}
@media (max-width: 340px) {
  body.single-product .nmgd-mobile-buttons { grid-template-columns: 1fr; }
}

/* NMGD v1.3.11 – Sadece ana eğitim sayfasının mobil modül kartları.
 * Orijinal .nfslp-modules__card-footer altta gereksiz ikinci sütun/boşluk
 * oluşturuyordu. Mobil fiyat ve çalışan satın alma kısayolları eklendiyse
 * footer'ı görsel yerleşimden çıkar; özgün kontroller DOM'da kalır. */
@media (max-width: 760px) {
  body.single-product .nfslp-modules__card.nmgd-mobile-footer-replaced .nfslp-modules__card-footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
}


/* v1.3.15: replace external player's English Unmute control with a Turkish action. */
body.single-product .nmgd-preview-stage .nmgd-preview-sound-button {
  position:absolute; z-index:5; left:50%; top:50%; transform:translate(-50%,-50%);
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-height:40px; padding:10px 17px; border:1px solid rgba(255,255,255,.5);
  border-radius:999px; background:rgba(17,35,32,.9); color:#fff;
  box-shadow:0 5px 18px rgba(0,0,0,.24); font-family:inherit; font-size:13px; font-weight:700; line-height:1.1;
  white-space:nowrap; cursor:pointer; pointer-events:auto;
}
body.single-product .nmgd-preview-stage .nmgd-preview-sound-button:hover,
body.single-product .nmgd-preview-stage .nmgd-preview-sound-button:focus-visible {
  background:#246d61; color:#fff; outline:2px solid rgba(255,255,255,.9); outline-offset:2px;
}
