@import url('/css/shared/font-standard.css');
@import url('./control-tokens.css');

html.bb-drill-standard {
  --font-tech: 'Ultra', Georgia, serif;
  --font-body: 'Geist', sans-serif;
  --bb-control-font: 'Geist', sans-serif;
}

/* Keep the shared shell controls usable on phones as well as desktops. */
.bb-drill-standard .drill-sticky__top { width: 44px; height: 44px; }
.bb-drill-standard .bb-mission-close { min-width: 44px; min-height: 44px; }
.bb-drill-standard .bb-opt { position: relative; }
.bb-drill-standard .bb-opt input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bb-drill-standard .bb-return-logo { min-width: 44px; min-height: 44px; }
.bb-drill-standard .bb-footer-actions a,
.bb-drill-standard #bbNavAuth .bb-nav-pill,
.bb-drill-standard .bb-trust-marker a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px !important;
  min-width: 44px;
}
.bb-drill-standard :is(.cert-modal-card,.exam-action-card) {
  box-sizing: border-box;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.bb-drill-standard .bb-qtext,
.bb-drill-standard .bb-breakdown { overflow-wrap: anywhere; }
.bb-drill-standard .info-grid:has(> .info-box:only-child) { grid-template-columns: 1fr; }

/* Non-lab drill components, including answers generated by the shared engine. */
.bb-drill-standard .hero {
  padding: var(--bb-space-6) 0 !important;
  min-height: 0;
}
.bb-drill-standard .hero-text { padding: 0 var(--bb-space-4) !important; }
.bb-drill-standard .hero h1 { font-size: 32px !important; line-height: 1.2 !important; letter-spacing: 0 !important; }
.bb-drill-standard .hero p { font-size: var(--bb-lead-size) !important; line-height: 1.65 !important; color: var(--bb-lead-color) !important; font-weight: 500; overflow-wrap: break-word; }
.bb-drill-standard .bb-opt {
  box-sizing: border-box;
  min-height: var(--bb-control-action-height);
  border-radius: var(--bb-control-radius);
  gap: var(--bb-space-3);
  font-family: var(--bb-control-font);
  line-height: 1.4;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.bb-drill-standard .bb-opt:focus-within { outline: 2px solid var(--bb-control-accent); outline-offset: 3px; }
.bb-drill-standard .bb-qcard { border-radius: 8px; }
.bb-drill-standard .bb-qbody { padding: var(--bb-space-6); }
.bb-drill-standard .info-box { padding: var(--bb-space-4); }
.bb-drill-standard .bb-quiz { gap: var(--bb-space-6); }
.bb-drill-standard :is(.cert-modal-card,.exam-action-card) { border-radius: 8px; }
.bb-drill-standard .filter-group { flex-wrap: wrap; border-radius: 8px; gap: var(--bb-space-1); }
.bb-drill-standard body > nav > .bb-container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: var(--bb-space-3);
  height: 100%;
}
.bb-drill-standard body > nav .nav-tools { margin-right: 140px; min-width: 0; }
@media (max-width: 560px) {
  .bb-drill-standard .bb-qbody { padding: var(--bb-space-4); }
  .bb-drill-standard .hero h1 { font-size: 28px !important; }
  .bb-drill-standard body > nav .nav-tools { margin-right: 116px; }
  .bb-drill-standard body > nav .nav-tools .bb-action {
    width: auto;
    min-width: 0;
    padding: 6px 8px;
    font-size: var(--bb-control-compact-size);
  }
  .bb-drill-standard body > nav .logo { flex: 0 0 44px; }
  .bb-drill-standard :is(.cert-modal-actions,.exam-action-actions) { flex-wrap: wrap; }
  .bb-drill-standard .filter-label { flex-basis: 100%; margin: 0 0 var(--bb-space-1); }
}

html { font-synthesis: none; }

/* Drill secondary actions share one phone menu; keep full-size touch targets. */
.bb-drill-standard .bb-drill-actions,
.bb-drill-standard .bb-drill-actions-menu { display: contents; }
.bb-drill-standard .bb-drill-actions > summary { display: none !important; }
@media (max-width: 560px) {
  html.bb-drill-standard .bb-return-host .bb-return-pair { flex-wrap: nowrap !important; gap: 6px !important; }
  html.bb-drill-standard .bb-return-host .bb-return-link { padding: 8px !important; white-space: nowrap; }
  html.bb-drill-standard .bb-drill-actions { display: block; position: relative; }
  html.bb-drill-standard .bb-drill-actions > summary { display: inline-flex !important; list-style: none; cursor: pointer; }
  html.bb-drill-standard .bb-drill-actions > summary::-webkit-details-marker { display: none; }
  html.bb-drill-standard .bb-drill-actions:not([open]) .bb-drill-actions-menu { display: none; }
  html.bb-drill-standard .bb-drill-actions[open] .bb-drill-actions-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 1100;
    display: grid; gap: 6px; padding: 8px; width: 180px;
    background: var(--bb-control-surface); border: 1px solid var(--bb-control-border); border-radius: 6px;
  }
}

/* T088: stems and feedback are reading text; answer-choice controls retain their sizing. */
.bb-drill-standard :is(.bb-qtext, .bb-breakdown, .bb-explanation, .info-box p) { font-size: var(--bb-body-size) !important; line-height: 1.65 !important; color: var(--bb-body-color) !important; font-weight: 500; overflow-wrap: break-word; }

/* Question reports stay inside graded feedback. */
.drill-report-link { background: none; border: 0; color: var(--bb-kelly,var(--theme-component-primary-1)); text-decoration:underline; font:inherit; font-size:15px; min-height:44px; cursor:pointer; }
.drill-report-form { margin-top:8px; font-size:15px; }
.drill-report-form[hidden] { display:none; }
.drill-report-form fieldset { border: 0; padding:0; margin:0 0 12px; }
.drill-report-chip { display:inline-flex; align-items:center; gap:6px; padding:8px; min-height:44px; border: 1px solid var(--theme-component-muted-5); border-radius: 18px; margin:4px; cursor:pointer; }
.drill-report-chip:has(input:checked) { border-color: var(--theme-component-primary-1); background: var(--theme-component-surface-20); }
.drill-report-form textarea { display:block; width:100%; box-sizing:border-box; background: var(--bb-panel-bg,var(--theme-component-surface-21)); color: inherit; border: 1px solid var(--theme-component-muted-5); border-radius: 6px; font:inherit; margin:6px 0 12px; }
.drill-report-form button { font:inherit; min-height:44px; padding:8px 16px; cursor:pointer; }

/* Keep the phone dropdown in the header stacking context above the hero. */
@media (max-width:560px) {
 html.bb-standard-site.bb-drill-standard body > .bb-page-header.bb-return-host { position:relative !important; z-index:1200 !important; overflow:visible; }
 html.bb-drill-standard .bb-drill-actions[open] .bb-drill-actions-menu { background:#10251d !important; color:#f1f5f9 !important; }
 html.bb-drill-standard .bb-drill-actions-menu .bb-return-link { color:#f1f5f9 !important; background:#10251d !important; opacity:1 !important; text-shadow:none !important; }
 html.bb-drill-standard[data-bb-theme="patriotic"] .bb-drill-actions-menu .bb-return-link { color:#f1f5f9 !important; }
 html.bb-drill-standard .bb-drill-actions-menu .bb-return-link:is(:hover,:focus-visible) { background:#244438 !important; outline:2px solid #f1f5f9; outline-offset:-2px; }
}

@media(max-width:560px) {
 html.bb-drill-standard[data-bb-theme="patriotic"] .bb-drill-actions[open] .bb-drill-actions-menu, html.bb-drill-standard[data-bb-theme="patriotic"] .bb-drill-actions-menu .bb-return-link { background:#10233f !important; }
 html.bb-drill-standard[data-bb-theme="neon"] .bb-drill-actions[open] .bb-drill-actions-menu, html.bb-drill-standard[data-bb-theme="neon"] .bb-drill-actions-menu .bb-return-link { background:#211735 !important; }
 html.bb-drill-standard[data-bb-theme="reserve"] .bb-drill-actions[open] .bb-drill-actions-menu, html.bb-drill-standard[data-bb-theme="reserve"] .bb-drill-actions-menu .bb-return-link { background:#303426 !important; }
}
