/* MTP Student Hub: accessibility layer (09.03.26.000)
   Loads on every student surface this plugin renders. Structural fixes
   only; palette corrections live at the source of each color. Selectors
   are prefixed with `body` so they outrank the inline <style> blocks the
   shortcodes print after this sheet. */

/* Visually hidden, still read */
body .mtp-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Visible focus on every interactive element in every SH widget (WCAG 2.4.7) */
body .mtp-mini-dash :focus-visible,body #mtp-sd :focus-visible,body .mtp-sd :focus-visible,body .mtp-ms-wrap :focus-visible,body .mtp-xpr :focus-visible,body #mtp-profile-form :focus-visible,body .mtp-pf :focus-visible,body .mtp-reg-wrapper :focus-visible,body .mtp-ap :focus-visible,body .shu-ch :focus-visible,body .mtp-sd-badge-rules :focus-visible{outline:3px solid #0077C8!important;outline-offset:2px!important;box-shadow:0 0 0 5px #fff!important}
/* Dark widgets: gold ring on a dark halo so it reads on both */
body .mtp-mini-dash.md-dark :focus-visible,body #mtp-sd :focus-visible,body .mtp-sd :focus-visible,body .mtp-xpr :focus-visible,body .mtp-reg-wrapper :focus-visible,body .mtp-ap :focus-visible{outline-color:#ffd166!important;box-shadow:0 0 0 5px #1a1816!important}
body .mtp-ms-wrap .mtp-ms-deg label:focus-within,body .mtp-pf .mtp-pf-deg label:focus-within,body .mtp-reg-checkbox label:focus-within{outline:3px solid #0077C8;outline-offset:2px}

/* Radios styled as pills stay in the tab order (WCAG 2.1.1) */
body .mtp-ms-deg input,body .mtp-pf-deg input{display:block!important;position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;opacity:0}
body .mtp-ms-deg label,body .mtp-pf-deg label{position:relative}
body .mtp-ms-fieldset,body .mtp-pf-fieldset{border:0;padding:0;margin:0;min-width:0}
body .mtp-ms-fieldset legend,body .mtp-pf-fieldset legend{padding:0}

/* Click targets that became buttons keep their look */
body .mtp-mini-dash .md-strip[role="button"]{cursor:pointer}
body .mtp-xpr-section-head[role="button"],body .mtp-xpr-course-head[role="button"]{cursor:pointer}

/* Type floor: nothing a student reads under 12px (13px on phones) */
body .sd-toggle-chev{font-size:12px!important}
body .sd-toggle-txt,body .sd-enroll-lbl,body .mtp-xpr-stat-l,body .mtp-xpr-tab,body .mtp-ms-label,body .mtp-ms-locked-lbl,body .md-s-plbl,body .md-s-mlbl,body .mtp-pf-label,body .mtp-pf-hint,body .mtp-sd-badge-section small,body .mtp-reg-step-label,body .mtp-ap-quote-author{font-size:12px!important}
body .mtp-xpr-course-pct,body .mtp-xpr-course-sub,body .mtp-sd-card .sd-pct,body .mtp-sd-card .sd-sub{font-size:12px!important}

/* Text on the brand gold reads (5.7:1) instead of white (2.3:1) */
body #mtp-pf-save,body .mtp-pf-save,body .mtp-ms-btn-gold,body .mtp-reg-submit,body .mtp-ap-btn:not(.mtp-ap-btn-outline),body .shu-ch-btn.primary{color:#1a1816!important}

/* Gold on the mid-grey toggle strip reads at 12px only when lightened */
body .sd-toggle-txt,body .mtp-sd-badge-section-title{color:#e6cc78!important}
/* Mini dashboard: the whole strip stays clickable for a mouse; keyboard gets a real button */
body .md-toggle-btn{display:inline-flex;align-items:center;gap:6px;margin-left:auto;background:transparent;border:1px solid currentColor;border-radius:8px;padding:6px 10px;font:inherit;font-size:12px;font-weight:700;color:inherit;cursor:pointer;min-height:36px}
body .md-toggle-btn .md-toggle-chev{display:inline-block;transition:transform .2s}
body .mtp-mini-dash.md-open .md-toggle-btn .md-toggle-chev{transform:rotate(180deg)}

/* Phone tier: 44px targets */
@media(max-width:540px){
  body .mtp-mini-dash a,body .mtp-mini-dash [role="button"],body #mtp-sd a,body #mtp-sd button,body .mtp-sd a,body .mtp-sd button,body .mtp-ms-wrap button,body .mtp-ms-wrap select,body .mtp-ms-wrap input[type="text"],body .mtp-xpr button,body .mtp-xpr [role="button"],body #mtp-profile-form select,body #mtp-profile-form button,body #mtp-profile-form input,body .mtp-reg-form input,body .mtp-reg-form button,body .mtp-reg-form a,body .mtp-ap a,body .mtp-ap button,body .shu-ch button{min-height:44px}
  body .mtp-xpr-tab{min-height:44px;min-width:44px}
  body .shu-ch-sw,body .shu-ch-item{min-width:44px;min-height:44px}
  body .shu-ch-btn,body #shu-ch-upload{min-height:44px}
  body .mtp-reg-login-link a,body .mtp-reg-checkbox a{display:inline-block;padding:14px 6px}
  body .mtp-reg-checkbox label{min-height:44px;display:flex;align-items:center;gap:10px}
  body .mtp-reg-checkbox input[type="checkbox"]{width:24px;height:24px;min-height:0;flex-shrink:0}
  body .md-toggle-btn{min-height:44px}
  body .mtp-ms-deg label,body .mtp-pf-deg label{min-height:44px;display:inline-flex;align-items:center}
  body .sd-toggle-chev,body .sd-toggle-txt,body .md-s-plbl,body .md-s-mlbl,body .mtp-ms-label,body .mtp-xpr-stat-l,body .mtp-xpr-tab,body .mtp-pf-label{font-size:13px!important}
}

/* Motion: honour the system setting across every SH surface (WCAG 2.3.3) */
@media(prefers-reduced-motion:reduce){
  body .mtp-mini-dash *,body #mtp-sd *,body .mtp-sd *,body .mtp-ms-wrap *,body .mtp-xpr *,body #mtp-profile-form *,body .mtp-reg-wrapper *,body .mtp-ap *,body .shu-ch *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
