/**
 * dr-page-les-6.css
 * Darja Rihla — Nederlandse les 6: Recreatie en vrijetijd
 * Theme: Purple/violet entertainment & leisure
 */

:root {
  --l6-bg: #0a0612;
  --l6-purple: #9d4edd;
  --l6-violet: #c77dff;
  --l6-blue: #3a86ff;
  --l6-pink: #ff006e;
  --l6-ink: #f8f7ff;
  --l6-muted: #8a7a9a;
}

/* ──── BACKGROUND EMOJI ──── */
body:has(.dr-les6-page) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Ctext x='0' y='60' font-size='48' opacity='0.08'%3E🎮 🎬 📚 🎵 🏃 ⚽ 🎨 🧘 🎭 🎮 🎬 📚 🎵 🏃 ⚽ 🎨 🧘 🎭 🎮 🎬%3C/text%3E%3Ctext x='0' y='150' font-size='48' opacity='0.08'%3E📚 🎵 🏃 ⚽ 🎨 🧘 🎭 🎮 🎬 📚 🎵 🏃 ⚽ 🎨 🧘 🎭 🎮 🎬 📚 🎵%3C/text%3E%3Ctext x='0' y='240' font-size='48' opacity='0.08'%3E🏃 ⚽ 🎨 🧘 🎭 🎮 🎬 📚 🎵 🏃 ⚽ 🎨 🧘 🎭 🎮 🎬 📚 🎵 🏃 ⚽%3C/text%3E%3C/svg%3E");
  background-attachment: fixed;
}

/* ──── FULL-WIDTH OVERRIDE (Gutenberg) ──── */
body:has(.dr-les6-page) .dr-single-shell { display: block !important; }

body:has(.dr-les6-page) .dr-single-template-main,
body:has(.dr-les6-page) .dr-single-body-wrap,
body:has(.dr-les6-page) .dr-single-shell,
body:has(.dr-les6-page) .dr-single-content-wrap,
body:has(.dr-les6-page) .dr-single-content-wrap > .wp-block-post-content {
  width: 100% !important; max-width: none !important;
  margin: 0 !important; padding-inline: 0 !important; padding-block: 0 !important;
  background: var(--l6-bg) !important; color: var(--l6-ink) !important;
}

body:has(.dr-les6-page) .wp-block-html,
body:has(.dr-les6-page) .wp-block-html > .dr-les6-page,
body:has(.dr-les6-page) .dr-les6-page {
  width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
}

/* ──── NAVIGATION ──── */
.dr-les6-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: linear-gradient(135deg, rgba(10, 6, 18, 0.98) 0%, rgba(50, 20, 70, 0.95) 100%);
  border-top: 3px solid var(--l6-purple);
  border-bottom: 1px solid rgba(157, 78, 221, 0.3);
  backdrop-filter: blur(8px);
  padding: 0;
  margin: 0;
}

.dr-les6-nav-inner {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  max-width: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dr-les6-nav-links {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid rgba(157, 78, 221, 0.3);
  color: var(--l6-violet);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.dr-les6-nav-links:hover,
.dr-les6-nav-links.is-done {
  background: rgba(157, 78, 221, 0.3);
  border-color: var(--l6-purple);
  color: var(--l6-ink);
}

/* ──── SECTIONS ──── */
.dr-les6-page > section {
  padding: 48px 24px;
  margin: 0;
  background: var(--l6-bg);
  border-bottom: 1px solid rgba(157, 78, 221, 0.15);
}

.dr-les6-page h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--l6-purple);
  margin: 0 0 24px 0;
  text-align: center;
}

.dr-les6-page h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--l6-violet);
  margin: 16px 0 8px 0;
}

.dr-les6-page p {
  font-size: 14px;
  color: var(--l6-muted);
  line-height: 1.6;
  margin: 0 0 16px 0;
}

/* ──── CAROUSEL CONTAINER ──── */
.dr-les6-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.dr-les6-carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(157, 78, 221, 0.2);
  border: 1px solid var(--l6-purple);
  color: var(--l6-violet);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s;
}

.dr-les6-carousel-btn:hover {
  background: rgba(157, 78, 221, 0.4);
  color: var(--l6-ink);
}

.dr-les6-track {
  flex: 1;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.dr-les6-track::-webkit-scrollbar {
  height: 6px;
}

.dr-les6-track::-webkit-scrollbar-track {
  background: rgba(157, 78, 221, 0.1);
  border-radius: 3px;
}

.dr-les6-track::-webkit-scrollbar-thumb {
  background: rgba(157, 78, 221, 0.4);
  border-radius: 3px;
}

/* ──── FLIP CARDS ──── */
.dr-les6-flipcard {
  flex-shrink: 0;
  width: 200px;
  height: 240px;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
}

.dr-les6-flipcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 12px;
}

.dr-les6-flipcard.is-flipped .dr-les6-flipcard-inner {
  transform: rotateY(180deg);
}

.dr-les6-flipcard-front,
.dr-les6-flipcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 12px;
  gap: 8px;
}

.dr-les6-flipcard-front {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.2) 0%, rgba(255, 0, 110, 0.1) 100%);
  border: 1px solid var(--l6-purple);
}

.dr-les6-flipcard-back {
  background: linear-gradient(135deg, rgba(58, 134, 255, 0.15) 0%, rgba(157, 78, 221, 0.2) 100%);
  border: 1px solid var(--l6-blue);
  transform: rotateY(180deg);
}

.dr-les6-flipcard-nl {
  font-size: 16px;
  font-weight: 700;
  color: var(--l6-violet);
  text-align: center;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s;
}

.dr-les6-flipcard-nl:hover {
  color: var(--l6-ink);
}

.dr-les6-flipcard-tounsi {
  font-size: 14px;
  color: var(--l6-blue);
  font-style: italic;
}

.dr-les6-flipcard-meaning {
  font-size: 12px;
  color: var(--l6-muted);
}

.dr-les6-audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 0, 110, 0.2);
  border: 1px solid var(--l6-pink);
  color: var(--l6-pink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dr-les6-audio-btn:hover {
  background: rgba(255, 0, 110, 0.4);
  color: var(--l6-ink);
}

/* ──── DOTS ──── */
.dr-les6-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 0 0;
}

.dr-les6-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(157, 78, 221, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.dr-les6-dots .dot.is-active {
  background: var(--l6-purple);
  transform: scale(1.3);
}

/* ──── PHRASES ──── */
.dr-les6-phrases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.dr-les6-phrase-card {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.15) 0%, rgba(255, 0, 110, 0.1) 100%);
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dr-les6-phrase-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--l6-violet);
  line-height: 1.5;
}

.dr-les6-phrase-card .dr-les6-audio-btn {
  width: 100%;
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ──── DIALOGUE ──── */
.dr-les6-dialogue {
  background: rgba(157, 78, 221, 0.08);
  border-left: 4px solid var(--l6-purple);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dr-les6-dialogue-line {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.dr-les6-speaker {
  font-weight: 700;
  min-width: 60px;
  color: var(--l6-violet);
}

.dr-les6-text {
  color: var(--l6-muted);
}

.dr-les6-peter .dr-les6-speaker {
  color: var(--l6-pink);
}

.dr-les6-ines .dr-les6-speaker {
  color: var(--l6-blue);
}

/* ──── TYPING EXERCISE ──── */
.dr-les6-typo-card {
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid var(--l6-purple);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
  flex-shrink: 0;
}

.dr-les6-typo-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--l6-violet);
}

.dr-les6-typo-input {
  padding: 10px 12px;
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 6px;
  background: rgba(10, 6, 18, 0.5);
  color: var(--l6-violet);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.dr-les6-typo-input:focus {
  outline: none;
  border-color: var(--l6-purple);
  background: rgba(10, 6, 18, 0.8);
  box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.2);
}

.dr-les6-typo-input.is-correct {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.dr-les6-typo-input.is-wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.dr-les6-typo-submit {
  padding: 8px 16px;
  background: var(--l6-purple);
  border: none;
  border-radius: 6px;
  color: var(--l6-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dr-les6-typo-submit:hover:not(:disabled) {
  background: var(--l6-violet);
  color: var(--l6-bg);
}

.dr-les6-typo-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dr-les6-typo-feedback {
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
}

.dr-les6-typo-feedback.is-correct {
  color: #4ade80;
}

.dr-les6-typo-feedback.is-wrong {
  color: #f87171;
}

/* ──── QUIZ ──── */
.dr-les6-quiz-progress {
  margin-bottom: 24px;
}

.dr-les6-quiz-bar {
  height: 4px;
  background: rgba(157, 78, 221, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dr-les6-quiz-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--l6-purple), var(--l6-violet));
  width: 0%;
  transition: width 0.3s ease;
}

.dr-les6-quiz-q-num {
  font-size: 12px;
  color: var(--l6-muted);
  margin-bottom: 12px;
}

.dr-les6-quiz-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--l6-violet);
  margin-bottom: 12px;
  line-height: 1.5;
}

.dr-les6-quiz-hint {
  font-size: 12px;
  color: var(--l6-muted);
  background: rgba(157, 78, 221, 0.1);
  border-left: 2px solid var(--l6-purple);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.dr-les6-quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.dr-les6-quiz-opt {
  padding: 12px;
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 6px;
  color: var(--l6-violet);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.dr-les6-quiz-opt:hover:not(:disabled) {
  background: rgba(157, 78, 221, 0.25);
  border-color: var(--l6-purple);
}

.dr-les6-quiz-opt:disabled {
  cursor: not-allowed;
}

.dr-les6-quiz-opt.is-correct {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
  color: #4ade80;
}

.dr-les6-quiz-opt.is-wrong {
  background: rgba(248, 113, 113, 0.2);
  border-color: #f87171;
  color: #f87171;
}

.dr-les6-quiz-feedback {
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 12px;
}

.dr-les6-quiz-feedback.is-correct {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.dr-les6-quiz-feedback.is-wrong {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.dr-les6-quiz-score {
  margin-top: 24px;
  padding: 16px;
  background: rgba(157, 78, 221, 0.1);
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--l6-violet);
}

.dr-les6-quiz-score strong {
  color: var(--l6-ink);
  font-size: 18px;
}

.dr-les6-reset-btn {
  margin-left: 12px;
  padding: 6px 12px;
  background: var(--l6-purple);
  border: none;
  border-radius: 4px;
  color: var(--l6-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dr-les6-reset-btn:hover {
  background: var(--l6-violet);
  color: var(--l6-bg);
}

/* ──── RECAP GRID ──── */
.dr-les6-recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.dr-les6-recap-card {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.1) 0%, rgba(58, 134, 255, 0.05) 100%);
  border: 1px solid rgba(157, 78, 221, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.dr-les6-recap-card h3 {
  margin: 0 0 12px 0;
}

.dr-les6-recap-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--l6-muted);
}

.dr-les6-recap-card li {
  line-height: 1.5;
}

.dr-les6-recap-card strong {
  color: var(--l6-violet);
}

.dr-les6-recap-card p {
  font-size: 13px;
  margin: 0;
}

/* ──── NEXT LESSON ──── */
.dr-les6-next-lesson {
  text-align: center;
  padding: 32px 20px;
  background: rgba(157, 78, 221, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(157, 78, 221, 0.2);
  margin: 32px 0;
}

.dr-les6-next-lesson p {
  margin: 8px 0;
  font-size: 14px;
}

.dr-les6-next-lesson p:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--l6-violet);
}

.dr-les6-next-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--l6-purple);
  border: none;
  border-radius: 20px;
  color: var(--l6-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.dr-les6-next-btn:hover {
  background: var(--l6-violet);
  color: var(--l6-bg);
}

/* ──── POPUP ──── */
.dr-les6-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  padding: 20px;
}

.dr-les6-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.dr-les6-popup-box {
  position: relative;
  background: var(--l6-bg);
  border: 1px solid var(--l6-purple);
  border-radius: 12px;
  padding: 28px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dr-les6-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(157, 78, 221, 0.2);
  border: none;
  color: var(--l6-violet);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dr-les6-popup-close:hover {
  background: rgba(157, 78, 221, 0.4);
  color: var(--l6-ink);
}

.dr-les6-popup-kicker {
  font-size: 20px;
  margin-bottom: 12px;
}

.dr-les6-popup-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--l6-violet);
  margin: 0 0 16px 0;
}

.dr-les6-popup-body {
  font-size: 13px;
  color: var(--l6-muted);
  line-height: 1.7;
}

.dr-les6-popup-body p {
  margin: 12px 0;
}

.dr-les6-popup-body strong {
  color: var(--l6-ink);
}

.dr-les6-tounsi {
  font-style: italic;
  color: var(--l6-blue);
}

/* ──── RESPONSIVE ──── */
@media (max-width: 768px) {
  .dr-les6-page > section {
    padding: 32px 16px;
  }

  .dr-les6-page h2 {
    font-size: 22px;
  }

  .dr-les6-flipcard {
    width: 160px;
    height: 200px;
  }

  .dr-les6-phrases {
    grid-template-columns: 1fr;
  }

  .dr-les6-recap-grid {
    grid-template-columns: 1fr;
  }

  .dr-les6-popup-box {
    padding: 20px;
  }
}
