/**
 * Visibility System - CSS-Based User Type Control
 * 
 * Uses data attributes on <body> element:
 * - data-logged-in: "true" | "false"
 * - data-user-type: "teacher" | "student" | "guest" | ""
 * - data-is-admin: "true" | "false"
 * 
 * This file centralizes ALL visibility rules in one place.
 */

/* ========================================
   NOT LOGGED IN (data-logged-in="false")
   ======================================== */

/* Hide everything when not logged in */
body[data-logged-in="false"] #logoutBtn,
body[data-logged-in="false"] #dashboardLink,
body[data-logged-in="false"] #listsLink,
body[data-logged-in="false"] #settingsLink,
body[data-logged-in="false"] #gameLink {
  display: none !important;
}

/* ========================================
   LOGGED IN - NAV LINKS
   ======================================== */

/* Dashboard & Lists - Only for teachers (includes admins) */
body[data-user-type="student"] #dashboardLink,
body[data-user-type="student"] #listsLink,
body[data-user-type="guest"] #dashboardLink,
body[data-user-type="guest"] #listsLink {
  display: none !important;
}

/* ========================================
   SETTINGS SCREEN SECTIONS
   ======================================== */

/* Upload & Download sections - Only for teachers (includes admins) */
body:not([data-user-type="teacher"]) #uploadListsSection,
body:not([data-user-type="teacher"]) #downloadListsSection {
  display: none !important;
}

/* Upload & Download nav items in settings sidebar */
body:not([data-user-type="teacher"]) .settings-nav-list li:has(a[href="#uploadListsSection"]),
body:not([data-user-type="teacher"]) .settings-nav-list li:has(a[href="#downloadListsSection"]) {
  display: none !important;
}

/* Admin section & nav item - Only for admins */
body:not([data-is-admin="true"]) #adminManagementSection,
body:not([data-is-admin="true"]) #adminNavItem {
  display: none !important;
}

/* Test Feedback section - Only for teachers (includes admins) */
body:not([data-user-type="teacher"]) #testFeedbackSection {
  display: none !important;
}

/* Test Feedback nav item in settings sidebar */
body:not([data-user-type="teacher"]) .settings-nav-list li:has(a[href="#testFeedbackSection"]) {
  display: none !important;
}

/* ========================================
   VOICE & THEME SECTIONS
   ======================================== */

/* Voice and Theme sections - Visible to everyone when logged in */
/* (No rules needed - visible by default) */

