/* AI Project Universe V6.9 — final mobile navigation, solid translation menu, and data visibility fixes */

/* ---------- Viewer: horizontally swipeable controls + solid custom language menu ---------- */
@media (max-width:760px){
  .viewer .viewer__bar{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    scrollbar-width:thin!important;
  }
  .viewer .viewer__language-control{display:none!important}
  .viewer .apu-v69-language-button{
    flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    padding:0!important;margin:0!important;border:3px solid #111!important;border-radius:9px!important;
    background:#fff!important;color:#111!important;box-shadow:none!important;font:900 21px/1 system-ui,sans-serif!important;
    scroll-snap-align:start!important;cursor:pointer!important;
  }
}
.apu-v69-language-menu{
  position:fixed!important;z-index:2147483646!important;display:none!important;
  width:min(250px,calc(100vw - 20px))!important;max-height:min(420px,calc(100dvh - 24px))!important;
  padding:8px!important;overflow-x:hidden!important;overflow-y:auto!important;
  border:3px solid #fff!important;border-radius:14px!important;background:#080d16!important;color:#fff!important;
  box-shadow:0 22px 60px rgba(0,0,0,.62)!important;-webkit-overflow-scrolling:touch!important;
}
.apu-v69-language-menu.is-open{display:grid!important;gap:6px!important}
.apu-v69-language-menu button{
  width:100%!important;min-height:44px!important;padding:10px 12px!important;text-align:left!important;
  border:1px solid #31445f!important;border-radius:9px!important;background:#122138!important;color:#fff!important;
  font:750 14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif!important;cursor:pointer!important;
}
.apu-v69-language-menu button:hover,.apu-v69-language-menu button:focus-visible,
.apu-v69-language-menu button[aria-current="true"]{background:#1e4d87!important;border-color:#5fa2ef!important;outline:none!important}

/* Native/select menus must remain opaque and readable in every project. */
html select,html select option,html select optgroup{
  opacity:1!important;color:#10151d!important;background:#fff!important;
  font-size:14px!important;text-shadow:none!important;-webkit-text-fill-color:#10151d!important;
}
html[data-apu-theme="dark"] select,html[data-apu-theme="dark"] select option,
html[data-theme="dark"] select,html[data-theme="dark"] select option,
html.dark select,html.dark select option{
  color:#fff!important;background:#0c1728!important;-webkit-text-fill-color:#fff!important;
}

/* ---------- Malaysia Cost-style mobile navbar for Computer Vision and SentiScope ---------- */
.apu-v69-malaysia-nav,.apu-v69-malaysia-menu{display:none}
@media (max-width:54rem){
  html[data-apu-v69-native-nav="true"],html[data-apu-v69-native-nav="true"] body{
    width:100%!important;min-width:0!important;height:auto!important;min-height:100%!important;max-height:none!important;
    overflow-x:hidden!important;overflow-y:auto!important;position:static!important;touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html[data-apu-v69-native-nav="true"] .apu-v69-malaysia-nav{
    position:sticky!important;top:0!important;z-index:2147483300!important;
    display:grid!important;grid-template-columns:54px minmax(0,1fr) 54px!important;align-items:center!important;gap:12px!important;
    width:100%!important;min-height:76px!important;padding:max(10px,env(safe-area-inset-top)) 10px 10px!important;
    background:#f8fbfd!important;color:#102631!important;border-bottom:1px solid #cfe0e6!important;
    box-shadow:0 9px 28px rgba(16,38,49,.12)!important;
  }
  .apu-v69-native-mark{
    width:54px!important;height:54px!important;display:grid!important;place-items:center!important;border-radius:16px!important;
    background:linear-gradient(145deg,#0f7f89,#0fb7a7)!important;color:#fff!important;
    font:900 16px/1 system-ui,sans-serif!important;box-shadow:0 12px 30px rgba(15,127,137,.22)!important;
  }
  .apu-v69-native-brand{min-width:0!important}
  .apu-v69-native-brand strong,.apu-v69-native-brand small{
    display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  }
  .apu-v69-native-brand strong{color:#122b35!important;font:850 18px/1.15 system-ui,-apple-system,"Segoe UI",sans-serif!important}
  .apu-v69-native-brand small{margin-top:5px!important;color:#63808e!important;font:650 11px/1.15 system-ui,sans-serif!important;letter-spacing:.04em!important;text-transform:uppercase!important}
  .apu-v69-native-toggle{
    width:54px!important;height:54px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
    padding:0!important;border:1px solid #bfd2dc!important;border-radius:16px!important;background:#fff!important;color:#173442!important;
    font:900 25px/1 system-ui,sans-serif!important;cursor:pointer!important;box-shadow:0 8px 22px rgba(16,38,49,.08)!important;
  }
  html[data-apu-v69-menu-open="true"] .apu-v69-native-toggle{background:#e8f5f6!important;color:#087d84!important}
  .apu-v69-malaysia-menu{
    position:relative!important;z-index:2147483200!important;display:none!important;width:100%!important;
    padding:12px 10px 16px!important;background:#fff!important;border-bottom:1px solid #cfe0e6!important;
    box-shadow:0 16px 34px rgba(16,38,49,.10)!important;
  }
  .apu-v69-malaysia-menu.is-open{display:grid!important;gap:8px!important}
  .apu-v69-malaysia-menu a{
    display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;
    min-height:52px!important;padding:9px 12px!important;border:1px solid transparent!important;border-radius:15px!important;
    background:#f8fbfc!important;color:#5c7886!important;text-decoration:none!important;
    font:740 15px/1.25 system-ui,-apple-system,"Segoe UI",sans-serif!important;
  }
  .apu-v69-malaysia-menu a span:first-child{
    width:34px!important;height:34px!important;display:grid!important;place-items:center!important;border-radius:10px!important;
    background:#e8f5f6!important;color:#087d84!important;font-size:16px!important;
  }
  .apu-v69-malaysia-menu a[aria-current="page"]{
    background:#dff2f5!important;color:#04789a!important;border-color:#c6e6eb!important;font-weight:850!important;
  }
  .apu-v69-malaysia-menu a.apu-v69-exit-link{margin-top:4px!important;background:#101a27!important;color:#fff!important;border-color:#263b55!important}
  .apu-v69-malaysia-menu a.apu-v69-exit-link span:first-child{background:#243b5b!important;color:#fff!important}

  /* Remove all earlier bars/drawers for these two projects, leaving exactly one navbar. */
  html[data-scroll-theme="computer-vision"] :is(.apu-final-mobile-drawer,.apu-final-mobile-scrim,.apu-v52-cv-bar,.apu-v52-cv-scrim,.apu-v54-cv-mobile-bar,.apu-v54-cv-mobile-drawer,.apu-v54-cv-mobile-scrim),
  html[data-scroll-theme="sentiment-analysis"] :is(.apu-v5-mobile-project-bar,.apu-v5-mobile-nav-drawer,.apu-mobile-header-v65,.apu-mobile-drawer-v65,.apu-mobile-scrim-v65){display:none!important}

  /* Computer Vision: eliminate the giant empty viewport before the real content. */
  html[data-scroll-theme="computer-vision"] #root,
  html[data-scroll-theme="computer-vision"] #root>div,
  html[data-scroll-theme="computer-vision"] #root>div>div,
  html[data-scroll-theme="computer-vision"] main,
  html[data-scroll-theme="computer-vision"] main>div,
  html[data-scroll-theme="computer-vision"] main [class~="h-full"]{
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;overflow:visible!important;position:static!important;inset:auto!important;
  }
  html[data-scroll-theme="computer-vision"] #root>div{display:block!important}
  html[data-scroll-theme="computer-vision"] #root>div>div{display:block!important}
  html[data-scroll-theme="computer-vision"] [data-slot="sidebar"],
  html[data-scroll-theme="computer-vision"] #root aside,
  html[data-scroll-theme="computer-vision"] #root header.h-14{display:none!important}
  html[data-scroll-theme="computer-vision"] main{
    display:block!important;flex:none!important;padding:22px 14px max(72px,env(safe-area-inset-bottom))!important;
    background:var(--background,#f5f8fc)!important;
  }
  html[data-scroll-theme="computer-vision"] .apu-v69-cv-compact,
  html[data-scroll-theme="computer-vision"] .apu-v69-cv-compact *{
    min-height:0!important;height:auto!important;max-height:none!important;
  }
  html[data-scroll-theme="computer-vision"] .apu-v69-cv-empty-spacer{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important}
  html[data-scroll-theme="computer-vision"] main h1{margin-top:0!important}

  /* Sentiment: same compact Malaysia-style shell and no duplicate side rail. */
  html[data-scroll-theme="sentiment-analysis"] #root,
  html[data-scroll-theme="sentiment-analysis"] #root>div,
  html[data-scroll-theme="sentiment-analysis"] main{
    width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;overflow:visible!important;position:static!important;
  }
  html[data-scroll-theme="sentiment-analysis"] #root aside{display:none!important}
  html[data-scroll-theme="sentiment-analysis"] main{padding:18px 12px max(72px,env(safe-area-inset-bottom))!important}
}

/* ---------- AcademIQ: remove only the top exit cross, keep its drawer close control ---------- */
@media (max-width:54rem){
  html[data-scroll-theme="student-performance"] .apu-final-mobile-bar{
    grid-template-columns:44px minmax(0,1fr)!important;
  }
  html[data-scroll-theme="student-performance"] .apu-final-mobile-exit{display:none!important}
}

/* ---------- AI Architect: visible contact entry + reliable vertical drawer ---------- */
@media (max-width:767px){
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer{
    overflow:hidden!important;background:#071322!important;border-right:1px solid #2f4765!important;
  }
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav{
    min-height:0!important;height:100%!important;padding:12px 12px max(24px,env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;overflow-y:auto!important;scrollbar-gutter:stable!important;
  }
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav>a{
    flex:0 0 auto!important;min-height:50px!important;color:#d8e4f4!important;opacity:1!important;
  }
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav>a.apu-v69-contact-link{
    position:sticky!important;bottom:0!important;z-index:4!important;margin-top:8px!important;
    border:1px solid #38bdf8!important;border-radius:12px!important;background:linear-gradient(135deg,#0e7490,#4338ca)!important;
    color:#fff!important;box-shadow:0 -10px 24px rgba(4,12,25,.72)!important;font-weight:850!important;
  }
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav>a.apu-v69-contact-link *{color:#fff!important;opacity:1!important}
}

/* ---------- Model evaluation: complete local data, never blank ---------- */
.apu-v69-model-evaluation{
  width:100%;min-height:100dvh;padding:24px clamp(12px,3vw,28px) 80px;
  color:#e7eef9;background:
    linear-gradient(rgba(34,211,238,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(34,211,238,.045) 1px,transparent 1px),#030711;
  background-size:44px 44px;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.apu-v69-model-inner{width:min(1160px,100%);margin:0 auto}
.apu-v69-model-eyebrow{margin:0 0 8px;color:#22d3ee;font:800 11px/1.25 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.apu-v69-model-evaluation h1{margin:0;color:#fff;font-size:clamp(2rem,7vw,4rem);line-height:1.02;letter-spacing:-.04em}
.apu-v69-model-lead{max-width:850px;margin:14px 0 24px;color:#9aacc5;line-height:1.65}
.apu-v69-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.apu-v69-metric,.apu-v69-panel{border:1px solid #253c5b;border-radius:15px;background:#0d1829;box-shadow:0 14px 36px rgba(0,0,0,.2)}
.apu-v69-metric{padding:18px}.apu-v69-metric small{display:block;color:#768ba8;font:750 10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.1em;text-transform:uppercase}.apu-v69-metric strong{display:block;margin-top:9px;color:#fff;font-size:2rem;line-height:1}
.apu-v69-model-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px;margin-top:16px}.apu-v69-panel{padding:18px}.apu-v69-panel h2{margin:0 0 14px;color:#fff;font-size:1.05rem}
.apu-v69-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.apu-v69-table{width:100%;min-width:520px;border-collapse:collapse;color:#dce8f8;font-size:.84rem}.apu-v69-table th,.apu-v69-table td{padding:10px 11px;border-bottom:1px solid #203652;text-align:left}.apu-v69-table th{color:#8fa4bf;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em}.apu-v69-table tbody tr:hover{background:#10223a}.apu-v69-good{color:#60e7ad!important;font-weight:800}.apu-v69-warn{color:#facc15!important;font-weight:800}.apu-v69-bad{color:#fb7185!important;font-weight:800}
.apu-v69-matrix{width:100%;border-collapse:separate;border-spacing:6px;text-align:center;font:750 12px/1 ui-monospace,SFMono-Regular,Consolas,monospace}.apu-v69-matrix th{padding:6px;color:#7890ae}.apu-v69-matrix td{height:52px;border:1px solid #2b496d;border-radius:9px;background:#10233b;color:#dbeafe}.apu-v69-matrix td.is-correct{background:#0c3a34;color:#62f0b3;border-color:#176153}
.apu-v69-error-list{display:grid;gap:10px}.apu-v69-error{padding:13px;border:1px solid #263b58;border-radius:11px;background:#081321}.apu-v69-error p{margin:0 0 8px;color:#dce7f7;font-size:.9rem;line-height:1.5}.apu-v69-tags{display:flex;flex-wrap:wrap;gap:7px}.apu-v69-tag{padding:5px 8px;border-radius:999px;background:#132a47;color:#b8d6ff;font:700 10px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}
.apu-v69-model-note{margin-top:16px;padding:14px;border:1px solid #1d5360;border-radius:12px;background:#08252c;color:#b7f2f6;line-height:1.55}
@media(max-width:760px){.apu-v69-model-evaluation{padding:18px 12px 70px}.apu-v69-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.apu-v69-model-grid{grid-template-columns:1fr}.apu-v69-metric{padding:15px}.apu-v69-metric strong{font-size:1.55rem}.apu-v69-panel{padding:14px}.apu-v69-matrix{min-width:330px}}

/* V6.9 sizing safeguards */
.apu-v69-malaysia-nav,.apu-v69-malaysia-nav *,
.apu-v69-malaysia-menu,.apu-v69-malaysia-menu *,
.apu-v69-language-menu,.apu-v69-language-menu *,
.apu-v69-model-evaluation,.apu-v69-model-evaluation *{box-sizing:border-box!important}
.apu-v69-model-evaluation,.apu-v69-model-inner,.apu-v69-model-grid,.apu-v69-panel,.apu-v69-table-wrap{min-width:0!important;max-width:100%!important}
html[data-scroll-theme="sentiment-analysis"][data-apu-model-evaluation="true"],
html[data-scroll-theme="sentiment-analysis"][data-apu-model-evaluation="true"] body{overflow-x:hidden!important}
