/* Shared Lab accessibility contract: readable controls in every subject. */
:where(
  .ai-course-lab,
  [data-french-active-module="lab"],
  [data-geography-active-module="lab"],
  [data-clock-active-module="lab"],
  .maths-lab,
  .maths-batch-lab,
  .approved-division-lab,
  .pyramid-division-lab,
  .division-module-page
) button {
  min-height: 44px;
}

:where(
  .ai-course-lab,
  [data-french-active-module="lab"],
  [data-geography-active-module="lab"],
  [data-clock-active-module="lab"],
  .maths-lab,
  .maths-batch-lab,
  .approved-division-lab,
  .pyramid-division-lab,
  .division-module-page
) button:disabled {
  /* Answered options stay calm and readable: soft lilac paper, light border, no dark outline
     (Saadia, 2026-10-03: never the beige fill with a black outline, anywhere in TGO). */
  opacity: 1 !important;
  color: #37343b !important;
  background-color: #f5f3f8 !important;
  border-color: #dcd6e6 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

:where(
  .ai-course-lab,
  [data-french-active-module="lab"],
  [data-geography-active-module="lab"],
  [data-clock-active-module="lab"],
  .maths-lab,
  .maths-batch-lab,
  .approved-division-lab,
  .pyramid-division-lab,
  .division-module-page
) button:disabled :where(span, strong, small, b, i) {
  color: inherit !important;
  opacity: 1 !important;
}

:where(
  .ai-course-lab,
  [data-french-active-module="lab"],
  [data-geography-active-module="lab"],
  [data-clock-active-module="lab"],
  .maths-lab,
  .maths-batch-lab,
  .approved-division-lab,
  .pyramid-division-lab,
  .division-module-page
) button:is(.is-correct, [aria-pressed="true"]):disabled {
  color: #1d2a22 !important;
  background-color: #e6f8ee !important;
  border-color: #18a058 !important;
}

:where(
  .ai-course-lab,
  [data-french-active-module="lab"],
  [data-geography-active-module="lab"],
  [data-clock-active-module="lab"],
  .maths-lab,
  .maths-batch-lab,
  .approved-division-lab,
  .pyramid-division-lab,
  .division-module-page
) button.is-wrong:disabled {
  color: #3a1d1a !important;
  background-color: #ffefed !important;
  border-color: #e0483d !important;
}

:where(.lab-supported-reveal, .is-supported-reveal) {
  border: 2px solid #f2c94c;
  background: #fff6d6;
  color: #29272e;
}

:where(.lab-supported-reveal, .is-supported-reveal) strong {
  color: inherit;
}

@media (forced-colors: active) {
  :where(
    .ai-course-lab,
    [data-french-active-module="lab"],
    [data-geography-active-module="lab"],
    [data-clock-active-module="lab"],
    .maths-lab,
    .maths-batch-lab,
    .approved-division-lab,
    .pyramid-division-lab,
    .division-module-page
  ) button:disabled {
    border: 2px solid GrayText !important;
  }
}
