/* =========================
   Global Design Theme Overrides
   ========================= */

/* Base typography & body */
html, body {
  font-family: 'Roboto', Arial, sans-serif !important;
  font-size: 16px !important;
  color: #212121 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.text {
  width: 98% !important;
}

.header, .navigator{
    background: none !important;
}


/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500 !important;
  color: #212121 !important;
  margin-bottom: 0.5em !important;
}
h1 { font-size: 2.5rem !important; }
h2 { font-size: 2rem !important; }
h3 { font-size: 1.75rem !important; }
h4 { font-size: 1.5rem !important; }
h5 { font-size: 1.25rem !important; }
h6 { font-size: 1rem !important; }

p {
  margin-bottom: 1rem !important;
  color: #424242 !important;
}

/* =========================
   Layout containers
   ========================= */

#splitmenupanel,
#jetwrapper {
  margin: 0 !important;     /* kill any inherited margins */
}

nav#menu.splitpanelmenu{
  position: static !important;   
  height: 100vh !important;
  top: 0px !important;
  padding-top: 60px !important;
  margin: 0px !important;
}

.jetWrapper{
    
  padding-left: 20px;
  padding-right: 20px;
  margin: 0px !important;
 }

.jetWrapper, .viewer, .splitpanelmenu{
    
  border-radius: 0px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.mainWrapper {
  justify-content: center;   /* centers the children horizontally */
  gap: 0px !important;
  position: relative !important;
  top: 0px !important;
  width: 80% !important;
  margin: auto !important;
  background: none !important;
  padding: 16px !important;
  padding-top: 10px !important; /* allow for banner overlap */
}

.viewer, .page, .WidgetPage, .mQuestionPage, .JournalPage,
.ShortAnswerPage, .LongAnswerPage, .organizerPage, .flashcard {
  border: none !important;
  padding: 24px !important;
  overflow-y: auto !important;
  box-shadow: none !important;
}

/* =========================
   Banner, Footer
   ========================= */
.banner {
  position: absolute !important;
  top: 10px !important;
  left: 0 !important;
  right: 0 !important;
  background: transparent !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 64px !important;
  z-index: 10 !important;
  
}

.d_footer, .footer {
  background: #eeeeee !important;
  padding: 16px !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  color: #616161 !important;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.15) !important;
}

/* =========================
   Forms / Fields
   ========================= */
input, select, textarea, .d_field {
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  padding: 2px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
}
input:focus, select:focus, textarea:focus, .d_field:focus-within {
  border-color: #1976d2 !important;
  box-shadow: 0 0 0 3px rgba(25,118,210,0.25) !important;
  outline: none !important;
}

/* =========================
   Buttons
   ========================= */

.checkButton{
    
    background-color: black !important;
    color: white !important;
    width: 70px !important;
    height: 50px !important;
}
button, .d_button, .checkButton {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25) !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}
button:hover, .d_button:hover, .checkButton:hover {
  background-color: #1565c0 !important;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3) !important;
}
button:disabled, .d_button:disabled {
  background-color: #bdbdbd !important;
  color: #f5f5f5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* =========================
   Checkboxes
   ========================= */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 28px !important;
  height: 28px !important;
  border: 2px solid #1976d2;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-right: 25px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
input[type="checkbox"]:hover {
  border-color: #1565c0;
  box-shadow: 0 2px 6px rgba(25,118,210,0.3);
}
input[type="checkbox"]:checked {
  background-color: #1976d2 !important;
  border-color: #1976d2 !important;
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 14px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  margin-right: 25px;
}

/* =========================
   Radios (only inner dot styled)
   ========================= */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #555;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-right: 10px;
  transition: border-color 0.25s ease;
}
input[type="radio"]:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 5px rgba(25,118,210,0.3);
}
input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1976d2;
  transform: translate(-50%, -50%);
}

/* =========================
   Navigation & Menus
   ========================= */
nav, nav#menu, nav#menux, nav#menu.splitpanelmenu {
  padding: 12px !important;
  box-shadow: 2px 0 6px rgba(0,0,0,0.15) !important;
  height: 100vh !important;
  max-height: 100vh !important;
}
nav li a, nav#menu li a, nav#menux li a {
  display: block !important;
  padding: 10px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
}
nav li a:hover, nav#menu li a:hover, nav#menux li a:hover {
  background-color: #e3f2fd !important;
    color:black !important;
}

/* =========================
   Cards / Panels
   ========================= */
.d_div, .d_panel, .colorboxDiv, .overlay {
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25) !important;
  padding: 16px !important;
}

/* =========================
   Overlays / Popups
   ========================= */
.overlay, .popup, .tooltip {
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35) !important;
  padding: 24px !important;
}
.popup {
  max-height: 80vh !important;
  overflow-y: auto !important;
}

/* =========================
   Distractors, Instructions, Stems
   ========================= */
.d_instructions, .instructions {
  font-weight: 500 !important;
  font-size: 1rem !important;
  color: #424242 !important;
}
.d_stem, .stem {
  font-weight: 500 !important;
  font-size: 1.1rem !important;
  color: #212121 !important;
}

.distractorHost{
    display: flex !important;
}

.d_distractor, .distractor {
  
  flex: 1; /* take up remaining space */
  padding: 12px 16px !important;
  margin-bottom: 8px !important;
  border-radius: 6px !important;
  border: 1px solid #e0e0e0 !important;
  background: #fafafa !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}
.d_distractor:hover, .distractor:hover {
  backgroundx: #282828 !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2) !important;
}

/*override palette */

.distractorHost div.chip_instructions{
    color:black !important;
    
}

/* =========================
   Media & Images
   ========================= */
.d_image, .image, .ImagePage .image, .flashcard .image {
  border-radius: 8px !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
  background: #fff !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.d_image:hover, .image:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35) !important;
}

/* =========================
   Responsive refinements
   ========================= */
@media (max-width: 800px) {
     
 .mainwrapper {
    display: block; /* jetwrapper will take full width */
  }
    
    

  nav#menu.splitpanelmenu {
    position: fixed !important;
    top: 0 !important;
    left: 0!important;
    width: 100vw !important;        /* slide-out width */
    height: 100vh !important;     /* full screen height */
    box-shadow: 2px 0 6px rgba(0,0,0,0.2);
    overflow-y: auto;
    z-index: 100 !important;
  }

  .jetwrapper {
    width: 100%; /* full width content behind overlay */
  }
    
  .header, .banner {
    height: 56px !important;
    font-size: 1rem !important;
  }
  .viewer, .page {
    padding: 12px !important;
  }
  
}

/* ============================================================
   MOBILE OVERRIDES — FIX NESTED SCROLL REGIONS ON iPHONE
   Ensures: BODY is the only scroller, pages/nav no longer trap touch
   ============================================================ */
@media (max-width: 680px) {

  /* -------------------------------------------
     1. MENU / NAV MUST NOT BE A 100vh SCROLLER
     ------------------------------------------- */
  nav,
  nav#menu,
  nav#menux,
  nav#menu.splitpanelmenu {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* -------------------------------------------
     2. PAGE + VIEWER MUST NOT CREATE SCROLLBARS
        BODY must be the ONLY vertical scroll area
     ------------------------------------------- */
  .viewer,
  .page,
  .WidgetPage,
  .mQuestionPage,
  .JournalPage,
  .ShortAnswerPage,
  .LongAnswerPage,
  .organizerPage,
  .flashcard {
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 0 !important;
    box-shadow: none !important;
  }

  /* -------------------------------------------
     3. MAIN WRAPPER MUST NOT CLIP CONTENT
     ------------------------------------------- */
  .mainWrapper {
    display: block !important;
    width: 100vw !important;
    margin: 0 auto !important;
    padding: 8px !important;
    box-shadow: none !important;
  }

  .jetWrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* -------------------------------------------
     4. IMAGES SHOULD NOT CAPTURE TOUCH EVENTS
        (Prevents iOS treating drags as image drags)
     ------------------------------------------- */
  img,
  .image,
  .ImagePage .image,
  .interviewImage {
    -webkit-user-drag: none !important;
    touch-action: pan-y !important;
  }
}


