/* ============================================
   dialogues.css
   DENTAL ENGLISH DIALOGUES — SECTION STYLES
   Extends main.css (global foundation)
   ============================================ */
   
html {
    scroll-behavior: smooth;
}

.ded-stage-icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.ded-dialogue-stages-list {
  margin: 16px 0 20px;
  padding-left: 40px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  color: #2a2f55;
}

.ded-dialogue-stages-list li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.ded-bullet-list {
  margin: 16px 20px 20px;
  padding-left: 22px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  color: #2a2f55;
}

.ded-bullet-list li {
  margin-bottom: 6px;
  padding-left: 2px;
}

.line-tight {
  display: block;
  margin-bottom: 4px; /* half-line spacing */
}

.cs-section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: #333;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

/* ============================================
   DIALOGUES GRID (flexbox, not CSS grid)
   ============================================ */

.dialogues-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;

  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Each row (1 card or 3 cards) */
.dialogues-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Single card row */
.dialogues-row--single .ded-article-card {
  width: 250px;
}

/* Rows of three */
.dialogues-row--triple .ded-article-card {
  width: 250px;
}

/* ============================
   LABELS (Implants / Veneers / Full‑Arch)
   ============================ */

.dialogues-label {
  text-align: center;
  margin: 1rem 0 0.5rem;
}

.dialogues-label h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ded-grey-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem; /* slightly more space for a thicker underline */
  text-decoration: none;
}

.dialogues-label h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 140%;   /* makes the underline longer than the text */
  left: -20%;     /* centers the longer underline */
  height: 3px;   /* thicker underline */
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--ded-yellow) 20%,
    var(--ded-yellow) 80%,
    transparent 100%
  );
  border-radius: 2px; /* softens the edges for a smoother taper */
}

/* ============================
   DIALOGUE PAGE TEMPLATE
   ============================ */

.dialogue-header {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.dialogue-section {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 1rem;
}

.dialogue-vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.dialogue-vocab-table th,
.dialogue-vocab-table td {
  border: 1px solid var(--ded-grey-light);
  padding: 0.75rem;
}

.dialogue-clinical-notes {
  background: var(--ded-color-surface-alt);
  border-left: 4px solid var(--ded-blue-primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
}

.dialogue-exercises {
  margin-top: 2rem;
}


.ded-article-card--crown {
    text-align: center;
}

.ded-article-card--scenario {
    text-align: center;
}

/* === DIALOGUE CARDS (matching DED article cards) === */

.ded-dialogue-card {
  position: relative;
  display: block;
  background: var(--ded-color-surface);
  border: 1px solid var(--ded-color-border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  text-decoration: none !important;
  color: var(--ded-text-main);

  /* NEW */
  width: 250px;
  text-align: center;

  /* Top + bottom yellow bars (DED signature) */
  border-top: 4px solid var(--ded-yellow);
  border-bottom: 3px solid var(--ded-yellow);

  /* Slight elevation */
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);

  overflow: hidden;
  transition: transform var(--ded-transition),
              box-shadow var(--ded-transition),
              border-color var(--ded-transition);
}


/* Background image layer */
.ded-dialogue-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: blur(1px);
  z-index: 0;
}

/* Text above background */
.ded-dialogue-card h3,
.ded-dialogue-card p {
  position: relative;
  z-index: 1;
}

.ded-dialogue-card:hover {
  transform: translateY(-3px);
  border-color: var(--ded-blue-primary);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* Mobile */
@media (max-width: 900px) {
  .dialogues-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
   START ROLEPLAY BUTTON
   ============================ */
   
.ded-start-roleplay-btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--ded-blue-dark);
  cursor: pointer;
  background-color: var(--ded-blue-primary);
  color: var(--ded-white);
  transition: background-color 0.25s ease, transform 0.15s ease;
  margin-top: 1.5rem;
  width: 100%;
  text-align: center;
}

/* Hover + focus */
.ded-start-roleplay-btn:hover,
.ded-start-roleplay-btn:focus {
  background-color: var(--ded-blue-dark);
  border-color: #b8c7d2;
  transform: translateY(-2px);
}

/* Active press */
.ded-start-roleplay-btn:active {
  transform: translateY(0);
  background-color: #d1dde7;
}

/* Disabled state (for when roleplay is running) */
.ded-start-roleplay-btn.disabled {
  background-color: #b8c2c9;
  cursor: not-allowed;
  transform: none;
}

/* ============================
   DIM + BLUR + COUNTDOWN
   ============================ */

/* OVERLAY WRAPPER — full‑screen dim + blur + scroll lock */
.ded-roleplay-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  pointer-events: all; /* ⭐ blocks clicks + scroll */
}

/* Hidden state */
.ded-roleplay-overlay.hidden {
  display: none !important;
}

/* COUNTDOWN TEXT — centered by parent */
.ded-roleplay-countdown {
  font-size: 4rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);

  pointer-events: none; /* text doesn't block anything */
}

.ded-pause-btn {
    margin-top: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ded-pause-btn svg {
    width: 64px;
    height: 64px;
    fill: white;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.ded-pause-btn:hover svg {
    opacity: 1;
}

/* -----------------------------------------
   Host Setup Panel Controls
----------------------------------------- */

.host-controls {
    display: none;
}

#host-setup-panel {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #3498db;
    max-width: 420px;
}

/* Field wrapper */
.ded-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

/* Labels */
.ded-field label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* Checkbox styling */
#wildcards-toggle {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Create Session button */
#create-session-btn {
    margin-top: 10px;
    padding: 10px 16px;
    background: #3498db; /* New modern blue */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

#create-session-btn:hover {
    background: #2d89c6; /* Slightly darker hover */
}

#create-session-btn:active {
    background: #2475aa; /* Pressed state */
}


/* -----------------------------------------
   Custom Difficulty Dropdown
----------------------------------------- */

.ded-dropdown {
    position: relative;
    width: 100%;
    font-size: 0.95rem;
}

.ded-dropdown-selected {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ded-dropdown-selected:hover {
    border-color: #999;
}

.ded-dropdown-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 20;
}

.ded-option {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}

.ded-option:hover {
    background: #f0f0f0;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.color-dot.green { background: #3cb371; }
.color-dot.yellow { background: #f4c542; }
.color-dot.red { background: #e74c3c; }
.color-dot.black { background: #333; }

/* ============================
   /* ============================================================
   ⭐ WILDCARD MODAL OVERLAY
============================================================ */
#wildcard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

#wildcard-modal.hidden {
  display: none;
}

.wildcard-modal-inner {
  background: transparent;
  padding: 0;
  border-radius: 12px;
  width: auto;
  max-width: 90%;
}


/* ============================================================
   ⭐ FLIP CARD CONTAINER (500 × 305)
============================================================ */
.flip-container {
  width: 500px;
  height: 305px;
  position: relative;
  perspective: 1200px;
  cursor: pointer;
  margin: 0 auto;
}

.flip-face {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.6s ease, opacity 0.4s ease;
  transform-style: preserve-3d;
}

/* FRONT IMAGE */
.flip-front img,
.wildcard-face {
  width: 500px;
  height: 305px;
  object-fit: cover;
  display: block;
}

/* FRONT SIDE */
.flip-front {
  transform: rotateY(0deg);
}

/* BACK SIDE */
.flip-back {
  transform: rotateY(-180deg);
  background: white;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* WHEN FLIPPED */
.flip-container.flipped .flip-front {
  transform: rotateY(180deg);
}

.flip-container.flipped .flip-back {
  transform: rotateY(0deg);
}


/* ============================================================
   ⭐ BACK SIDE TEXT AREA
============================================================ */
.wildcard-back-text {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #222;
}

.wildcard-back-text h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wildcard-back-text h3 {
  margin: 12px 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}

.wildcard-back-text p {
  margin: 0 0 8px 0;
}

.wildcard-back-text ul {
  margin: 0 0 8px 0;
  padding-left: 18px;
}

.wildcard-back-text li {
  margin-bottom: 4px;
}


/* ============================================================
   ⭐ TIMER (TOP OR BOTTOM)
============================================================ */
.wildcard-timer-box {
  text-align: center;
  margin-top: 10px;
}

#wildcard-timer {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff; /* ⭐ Make timer white */
}



/* ============================================================
   ⭐ UTILITY
============================================================ */
.hidden {
    display: none;
}



/* ============================
   INDIVIDUAL DIALOGUE PAGES
   ============================ */

.ded-guides-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ded-guides-icon {
  width: 30px;
  height: auto;
}

/* Wider layout for Dialogue pages */
.ded-page--dialogue {
  max-width: 1080px;   /* sweet spot */
  margin: 0 auto;
  padding: 0 24px;     /* optional breathing room */
}

/* WRAPPER */
.ded-stage {
  border: 1px solid var(--ded-blue-dark);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  background: #ffffff;
  transition: box-shadow 0.25s ease;
}

.ded-stage.is-open {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* HEADER */
.ded-stage-header {
  width: 100%;
  background: #f8f9fc;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  transition: background 0.25s ease, padding 0.25s ease;
}

.ded-stage-header:hover {
  background: #eef2ff;
}

.ded-stage.is-open .ded-stage-header {
  background: #e6edff;
  padding: 20px 20px;
}

/* LABEL + TITLE */
.ded-stage-label {
  font-weight: 700;
  color: var(--ded-orange);
  margin-right: 12px;
}

.ded-stage-title {
  font-weight: 700;
  color: #333;
}

/* ARROW */
.ded-stage-arrow {
  font-size: 16px;
  width: 16px;
  display: inline-block;
  margin-right: 8px;
  color: var(--ded-orange);
}

.ded-stage-header .ded-stage-arrow::before {
  content: "▶";
}

.ded-stage.is-open .ded-stage-arrow::before {
  content: "▼";
}

.ded-header-gear {
  width: 20px;
  height: auto;
  display: block !important;
  margin: 0 auto 12px auto;
}


/* ========================================= */
/* DED SYSTEM GUIDE ACCORDION (FINAL CSS)    */
/* ========================================= */

/* WRAPPER */
.ded-guide-section {
  border: 1px solid var(--ded-blue-dark);
  border-radius: 12px;
  margin-bottom: 20px;
  background: #ffffff;
  transition: box-shadow 0.25s ease;
  overflow: hidden;               /* 🔥 FIX: ensures rounded corners display */
}

.ded-guide-section.is-open {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}


/* MAIN GUIDE HEADER */
.ded-guide-header {
  width: 100%;
  background: #f8f9fc;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  transition: background 0.25s ease, padding 0.25s ease;
  border-radius: 12px 12px 0 0;
}

.ded-guide-header:hover {
  background: #eef2ff;
}

/* ⭐ OPEN STATE — BUTTON AREA ONLY */
.ded-guide-section.is-open > .ded-guide-header {
  background: #e6edff;
  padding: 18px 20px;
}



/* MAIN GUIDE CONTENT (collapsible) */
.ded-guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 20px;
}

.ded-guide-section.is-open .ded-guide-content {
  max-height: 2000px;
  padding: 0 20px 20px;
}


/* ========================================= */
/* DED SYSTEM GUIDE — UPDATED SUBSECTION HEADERS */
/* (Matches CS accordion structure) */
/* ========================================= */

.ded-guide-subheader {
  width: 100%;
  background: #f2f5ff; /* lighter + closer to CS ultra-light */
  border: none;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  transition: background 0.25s ease, padding 0.25s ease;
  margin-top: 5px; /* prevents border overlap */
}

.ded-guide-subheader:hover {
  background: #eef2ff; /* same hover feel as CS */
  border-radius: 8px;
  border: 1px solid var(--ded-blue-dark);
}

.ded-guide-subsection.is-open .ded-guide-subheader {
  background: #e6edff; /* open-state background */
  padding: 16px 18px;
  margin-top: 6px;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--ded-blue-dark);
  border-bottom: none;
}


/* SUBSECTION CONTENT (matches CS structure) */
.ded-guide-subcontent {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #ffffff;
  padding: 0 20px;
}

.ded-guide-subsection.is-open .ded-guide-subcontent {
  padding: 20px;
  border: 1px solid var(--ded-blue-dark);
  border-top: none;
  border-radius: 0 0 8px 8px;
}




/* SUBSECTION CONTENT — ONLY THIS ANIMATES */
.ded-guide-subcontent {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #ffffff;
  padding: 0 20px;
}

.ded-guide-subsection.is-open .ded-guide-subcontent {
  padding: 20px;
}


/* OPTIONAL: round bottom corners on last subsection */
.ded-guide-subsection:last-child .ded-guide-subcontent {
  border-radius: 0 0 12px 12px;   /* 🔥 FIX: bottom corners look clean */
}

/* ========================================= */
/* CS CLINICAL SCENARIO ACCORDION (NEW CSS)  */
/* ========================================= */

/* WRAPPER */
.cs-guide-section {
  border: 1px solid var(--cs-teal-primary);
  border-radius: 12px;
  margin-bottom: 20px;
  background: #ffffff;
  transition: box-shadow 0.25s ease;
  overflow: hidden;
}

.cs-guide-section.is-open {
  box-shadow: 0 6px 18px var(--cs-teal-shadow);
}


/* MAIN CS HEADER */
.cs-guide-header {
  width: 100%;
  background: #fff;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  transition: background 0.25s ease, padding 0.25s ease;
  border-radius: 12px 12px 0 0;
}

.cs-guide-header:hover {
  background: var(--cs-teal-ultra-light); /* slightly darker hover */
}

/* OPEN STATE */
.cs-guide-section.is-open > .cs-guide-header {
  background: #d1efeb;
  padding: 18px 20px;
}


/* ICON */
.cs-guide-header img {
  width: 22px;
  height: 22px;
  margin-right: 10px;
}


/* MAIN CONTENT */
.cs-guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 20px;
}

.cs-guide-section.is-open .cs-guide-content {
  max-height: 2000px;
  padding: 0 20px 20px;
}


/* SUBSECTION HEADERS */
.cs-guide-subheader {
  width: 100%;
  background: #f2fcfa;
  border: none;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cs-teal-text);
  transition: background 0.25s ease, padding 0.25s ease;
  margin-top: 5px;
}

.cs-guide-subheader:hover {
  background: #d9f2ef;
  border-radius: 8px;
  border: 1px solid var(--cs-teal-primary);
}

.cs-guide-subsection.is-open .cs-guide-subheader {
  background: #d1efeb;
  padding: 16px 18px;
  margin-top: 6px;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--cs-teal-primary);
  border-bottom: none;
}


/* SUBSECTION CONTENT */
.cs-guide-subcontent {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #ffffff;
  padding: 0 20px;
}

.cs-guide-subsection.is-open .cs-guide-subcontent {
  padding: 20px;
  border: 1px solid var(--cs-teal-primary);
  border-top: none;
  border-radius: 0 0 8px 8px;
}


/* LAST SUBSECTION CLEAN CORNERS */
.cs-guide-subsection:last-child .cs-guide-subcontent {
  border-radius: 0 0 12px 12px;
}


/* CONTENT AREA */
.ded-stage-content {
  display: none;
  padding: 20px 30px;
  animation: fadeIn 0.35s ease;
  position: relative; /* ← REQUIRED */
}

.ded-stage.is-open .ded-stage-content {
  display: block;
}

.ded-scenario-card {
  padding: 32px 24px;
  margin-bottom: 40px;
  background: var(--ded-color-surface-alt);
  border-radius: 8px;
  border: 1px solid var(--ded-blue-primary);
}


body.scroll-lock {
  overflow: hidden;
}

/* FINISH TURN BUTTON */
.ded-finish-turn-btn {
  margin-top: 20px;
  padding: 12px 22px;
  background: #2c2c2c;              /* dark neutral */
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.25s ease, 
              transform 0.2s ease,
              box-shadow 0.25s ease;
}

.ded-finish-turn-btn:hover {
  background: #737373;              /* lighter hover */
  transform: translateY(-2px);      /* subtle lift */
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.ded-finish-turn-btn:active {
  transform: translateY(0);         /* tap feedback */
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ded-finish-turn-btn.hidden {
  display: none;
}

/* BLOCKS INSIDE */
.ded-stage-block {
  margin-bottom: 24px;
}

.ded-stage-block h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: #222;
}

/* ANIMATION */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ⭐ DIFFICULTY SELECTOR + WILDCARD TOGGLE
============================================================ */

/* Switch wrapper */
.ded-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

/* Hide the real checkbox */
.ded-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider background (OFF state) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bfc7d1; /* softer grey-blue */
    transition: 0.3s;
    border-radius: 24px;
}

/* Slider knob */
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

/* Checked state (ON) */
.ded-switch input:checked + .slider {
    background-color: #3498db; /* your new main blue */
}

/* Knob shift */
.ded-switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* OVERVIEW BTNS & CONTENT */

/* OVERVIEW TAB BUTTON ROW */
.overview-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* OVERVIEW TAB BUTTONS */
.overview-tab-btn {
  padding: 10px 16px;
  background: #e8ecff;
  border: 1px solid #328EB4;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2a2f55;
  cursor: pointer;
  transition: all 0.25s ease;
}

.overview-tab-btn:hover {
  background: #a0d1e5;
  border-color: #328EB4;
}

.overview-tab-btn.is-active {
  background: #6BB7D6;
  border-color: #328EB4;
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 90, 255, 0.3);
}

/* YELLOW VARIANT */
.overview-tab-btn--yellow {
  background: var(--ded-yellow-light);
  border: 1px solid var(--ded-yellow-dark);
  color: #5a4a1f; /* readable warm brown */
}

.overview-tab-btn--yellow:hover {
  background: var(--ded-yellow);
  border-color: var(--ded-yellow-dark);
  color: #5a4a1f;
}

.overview-tab-btn--yellow.is-active {
  background: var(--ded-yellow-dark);
  border-color: var(--ded-yellow-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 192, 103, 0.4);
}

.ded-guides-highlight {
  color: var(--ded-yellow-dark);
  font-weight: 700; /* optional: gives it a nice emphasis */
}


/* OVERVIEW CARD CONTENT */
.overview-card {
  display: none; /* 🔥 all cards hidden by default */
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  animation: fadeIn 0.3s ease;
}

/* When JS activates a card */
.overview-card:not(.hidden) {
  display: block;
}



/* PURPOSE + OVERVIEW */
.overview-card--overview-purpose,
.overview-card--overview-main {
  background: var(--ded-blue-ultra-light);
  border-color: var(--ded-blue-light);

  /* MATCH CONTENT AREA */
  padding: 20px 30px;
  animation: fadeIn 0.35s ease;
  position: relative;
}


/* STAGE + REFLECTION + OBSERVER */
.overview-card--overview-stage,
.overview-card--overview-reflection,
.overview-card--overview-observer {
  background: var(--ded-yellow-ultra-light);
  border-color: var(--ded-yellow-light);

  /* MATCH CONTENT AREA */
  padding: 20px 30px;
  animation: fadeIn 0.35s ease;
  position: relative;
}

/* UNIVERSAL CLOSE BAR FOR ACCORDIONS */
.ded-close-bar {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ded-grey-dark);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ded-close-bar:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.ded-close-icon {
  font-size: 16px;
  display: inline-block;
}

.ded-panel-footer {
  margin-bottom: -20px; /* or -30px depending on your padding */
  margin-top: 5px;
  margin-left: -30px;
  margin-right: -30px;
  padding: 8px 0;
  background: var(--ded-blue-light);
  text-align: center;
  border-radius: 0 0 10px 10px;
}

/* ========================================= */
/* CS CLINICAL SCENARIOS — CLOSE BAR + FOOTER */
/* ========================================= */

/* CLOSE BAR */
.cs-close-bar {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ded-grey-dark);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-close-bar:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.cs-close-icon {
  font-size: 16px;
  display: inline-block;
}


/* FOOTER (Teal version of DED footer) */
.cs-panel-footer {
  margin-bottom: -20px; /* or -30px depending on your padding */
  margin-top: 5px;
  margin-left: -30px;
  margin-right: -30px;
  padding: 8px 0;
  background: var(--cs-teal-ultra-light);
  text-align: center;
  border-radius: 0 0 10px 10px;
}


/* PREPARATION TAB BUTTON (YELLOW VARIANT) */
.overview-tab-btn--prep {
  background: var(--ded-yellow-light);
  border: 1px solid var(--ded-yellow-dark);
  color: #5a4a1f;
}

.overview-tab-btn--prep:hover {
  background: var(--ded-yellow);
  border-color: var(--ded-yellow-dark);
  color: #5a4a1f;
}

/* ACTIVE STATE FOR PREP TAB */
.overview-tab-btn--prep.is-active {
  background: var(--ded-yellow-dark);
  border-color: var(--ded-yellow-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 192, 103, 0.4);
}

.prep-file {
  display: inline-block;
  padding: 6px 10px;
  margin: 4px 0;
  background: var(--ded-yellow-light);
  border: 1px solid var(--ded-yellow-dark);
  border-radius: 6px;
  color: #5a4a1f;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.prep-file:hover {
  background: var(--ded-yellow);
  color: #5a4a1f;
}

.ded-guide-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.85;
}

/* ============================
   SESSION PAGE CSS
   ============================ */

/* ------------------------------
   CONTAINER
------------------------------ */


.ded-session-container {
    position: relative;
    width: 600px;                 /* fixed width */
    max-width: 90%;               /* still responsive on mobile */
    min-height: 500px; /* or whatever height feels right */
    margin: 30px auto;
    padding: 40px 30px;

    /* Background image */
    background-image: url('/dialogues/assets/WG.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Shape + border */
    border-radius: 14px;
    border: 1px solid #328EB4;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);

    text-align: left;
    overflow: hidden; /* important for rounded overlay */
}

/* ⭐ Soft opacity overlay */
.ded-session-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.80); /* adjust opacity here */
    backdrop-filter: blur(1px);
    z-index: 0;
}

/* ⭐ Make all content sit ABOVE the overlay */
.ded-session-container > * {
    position: relative;
    z-index: 1;
}



/* ------------------------------
   GLOBAL (scoped inside container)
------------------------------ */
.ded-session-container body {
    font-family: var(--ded-font-sans, 'Inter', Arial, sans-serif);
    background: #f7f8fa;
    color: #222;
    line-height: 1.5;
}

.ded-session-container .screen {
    margin-top: 50px;
    max-width: 480px;
}

/* ------------------------------
   HEADINGS
------------------------------ */
.ded-session-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2a2f55;                 /* DED deep blue */
    margin-bottom: 30px;
    margin-top: 20px !important;
}

.ded-session-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 10px;
    margin-top: 5px;
}

.ded-session-container h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 6px;
    margin-top: 8px;
}

/* ------------------------------
   INPUTS
------------------------------ */
.ded-session-container input {
    padding: 12px 14px;
    margin-bottom: 10px;
    width: 260px;
    border: 1px solid #328EB4;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ded-session-container input:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
    outline: none;
}

/* ------------------------------
   BUTTONS
------------------------------ */
.ded-session-container button {
    padding: 10px 16px;
    background: #e8ecff;
    border: 1px solid #328EB4;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2a2f55;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.ded-session-container button:hover {
    background: #a0d1e5;
    border-color: #328EB4;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.ded-session-container button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ------------------------------
   LOBBY USER LIST
------------------------------ */
.ded-session-container #lobby-user-list li {
    background: #ffffff;
    width: 200px;
    padding: 10px 16px;
    margin-bottom: 10px;
    border-radius: 50px;
    border: 1px solid #328EB4;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0A3A4A;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Optional: add a small dot/avatar */
.ded-session-container #lobby-user-list li::before {
    content: "";
    width: 10px;
    height: 10px;
    background: #328EB4;
    border-radius: 50%;
    display: inline-block;
}


/* ------------------------------
   ERROR MESSAGE
------------------------------ */
.ded-session-container #error-screen p,
.ded-session-container #join-error {
    color: #d00000;
    font-weight: 600;
}

/* ============================
   STUDENT DETAILS PAGE CSS
   ============================ */
   
.ded-session-container--student {
    background-image: url('/dialogues/assets/registration-back.jpg') !important;
    background-position: calc(50% + 100px) center !important;
}


.ded-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ⭐ aligns cards left */
    gap: 5px;               /* spacing between cards */
    margin-top: 20px;
}

.ded-label {
    font-weight:550;
}

.ded-session-container--student h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2a2f55;                 /* DED deep blue */
    margin-bottom: 30px;
    margin-top: 20px !important;
}

.ded-session-container--student h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 10px;
    margin-top: 5px;
}

.ded-session-container--student h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 6px;
    margin-top: 8px;
}

.ded-session-container--student p {
    font-size: 1rem;
    line-height: 1.55;
    color: #333;
    margin-bottom: 8px;
}

/* ============================================
   ADMIN GROUPS — PAGE BACKGROUND
   ============================================ */

body.admin-groups-page {
    background-image: url('/dialogues/assets/admin-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

#existingScreen {
    display: none;
}



/* ============================================
   ADMIN GROUPS — MAIN CONTAINER
============================================ */

.admin-groups-container {
    max-width: 1100px;
    margin: 20px auto 40px;
    padding: 20px;

    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
    border-radius: 14px;
    border: 1px solid rgba(50, 142, 180, 0.25);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);

    font-family: Arial, sans-serif;
    position: relative;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-groups-container {
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: center;
}

/* Full-width mode */
body.fullwidth-mode .admin-groups-container {
    transform: scaleX(1.0);
}

/* Normal mode (slightly narrower) */
body:not(.fullwidth-mode) .admin-groups-container {
    transform: scaleX(0.92);
}



/* ============================================
   TYPOGRAPHY
============================================ */

.admin-groups-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2a2f55;
    margin: 10px 0 5px;
}

.admin-groups-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 10px;
}

/* ============================================
   TABS
============================================ */

.admin-groups-tabs {
    display: flex;
    gap: 10px;
}

.admin-groups-tabs button {
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid rgba(50, 142, 180, 0.5);
    background: #f5fbff;
}

/* ============================================
   PANELS (Assign + Existing)
============================================ */

.admin-panel,
.admin-existing-screen {
    width: 100%;
    padding: 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(2px);

    border-radius: 12px;
    border: 1px solid rgba(50, 142, 180, 0.25);
    box-sizing: border-box;
}

#existingScreen {
    display: none;
}

.selected-student {
    outline: 2px solid #0a84ff;
    background: #e8f2ff !important;
    border-color: #0a84ff !important;
}


/* ============================================
   BUTTONS — DED STYLE
============================================ */

.admin-groups-container button {
    padding: 12px 20px;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #328EB4;
    background: #e8ecff;
    color: #2a2f55;
    cursor: pointer;

    transition: background 0.25s ease,
                border-color 0.25s ease,
                transform 0.15s ease,
                box-shadow 0.25s ease;

    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.admin-groups-container button:hover {
    background: #a0d1e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.admin-groups-container button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ============================================
   UNASSIGNED STUDENTS — GRID
============================================ */

#unassignedList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#unassignedList li {
    background: #f0f4f7;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    cursor: grab;
    border: 1px solid #d0d7de;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

#unassignedList li:hover {
    background: #e8f6ff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* ============================================
   GROUPS WORKSPACE — SCROLLABLE
============================================ */

#groupsScrollArea {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 10px;
}

/* ============================================
   GROUP CARDS — RESPONSIVE HYBRID LAYOUT
============================================ */

/* Desktop: grid */
.groups-workspace {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

/* Tablet */
@media (max-width: 900px) {
    .groups-workspace {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .groups-workspace {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   GROUP CARD — LAYOUT & VISUAL STYLE
============================================ */

.group-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(50, 142, 180, 0.35);
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s ease, transform 0.15s ease;

    /* Layout for pinned delete button */
    display: flex;
    flex-direction: column;
    min-height: 180px; /* prevents collapse */
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}


/* ============================================
   GROUP NAME (editable)
============================================ */

.group-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a2f55;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: text;
}

.group-name:focus {
    outline: none;
    border-color: #0a84ff;
    background: rgba(10, 132, 255, 0.08);
}


/* ============================================
   STUDENT LIST — GRID INSIDE CARD
============================================ */

.group-students {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    padding: 8px;
    margin: 0;
    list-style: none;

    border: 1px dashed rgba(50, 142, 180, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);

    /* Prevent stretching when rows differ */
    align-items: start;

    /* Push delete button to bottom */
    flex-grow: 1;
}

.group-students li {
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    cursor: grab;
    border: 1px solid #d0d7de;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.group-students li:hover {
    background: #e8f6ff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}


/* ============================================
   DRAG STATES
============================================ */

.sortable-chosen {
    background: #d7ecff !important;
    box-shadow: 0 6px 14px rgba(0,0,0,0.18) !important;
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.5;
}

/* ============================================
   DELETE GROUP BUTTON
============================================ */

.group-delete-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #d33;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-delete-btn:hover svg {
    stroke: #ff4444;
}

.existing-groups-list ul {
    margin-top: 10px;
    padding-left: 0;
}

.existing-groups-list li {
    display: inline-block;
    background: #eef5ff;
    border: 1px solid #d0d7de;
    color: #2a4d8f;
    padding: 8px 20px;
    margin: 4px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.fullwidth-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
}

.fullwidth-btn:hover {
    opacity: 1;
}

/* FULL WIDTH MODE */
.fullwidth-mode .admin-groups-container {
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 0 10px;
}

.fullwidth-mode body {
    overflow-x: hidden;
}

.admin-groups-page {
    letter-spacing: 0.7px;
}


