/* =========================================
   TEXT SIZE BRIDGE
   Supports old body classes + new widget html classes
   ========================================= */

/*
  New widget classes:
  html.a11y-bigger-text
  html.a11y-extra-big-text

  Old bridge classes:
  body.a11y-large-text
  body.a11y-larger-text
*/

/* Level 1 */

html.a11y-bigger-text body,
body.a11y-large-text {
    font-size: 120% !important;
}

html.a11y-bigger-text p,
html.a11y-bigger-text a,
html.a11y-bigger-text span,
html.a11y-bigger-text small,
html.a11y-bigger-text strong,
html.a11y-bigger-text li,
html.a11y-bigger-text button,
html.a11y-bigger-text label,
html.a11y-bigger-text input,
html.a11y-bigger-text textarea,
html.a11y-bigger-text select,
body.a11y-large-text p,
body.a11y-large-text a,
body.a11y-large-text span,
body.a11y-large-text small,
body.a11y-large-text strong,
body.a11y-large-text li,
body.a11y-large-text button,
body.a11y-large-text label,
body.a11y-large-text input,
body.a11y-large-text textarea,
body.a11y-large-text select {
    line-height: 1.7 !important;
}

html.a11y-bigger-text h1,
body.a11y-large-text h1 {
    line-height: 1.2 !important;
}

html.a11y-bigger-text h2,
body.a11y-large-text h2 {
    line-height: 1.3 !important;
}

html.a11y-bigger-text h3,
html.a11y-bigger-text h4,
body.a11y-large-text h3,
body.a11y-large-text h4 {
    line-height: 1.35 !important;
}

/* Level 2 */

html.a11y-extra-big-text body,
body.a11y-larger-text {
    font-size: 135% !important;
}

html.a11y-extra-big-text p,
html.a11y-extra-big-text a,
html.a11y-extra-big-text span,
html.a11y-extra-big-text small,
html.a11y-extra-big-text strong,
html.a11y-extra-big-text li,
html.a11y-extra-big-text button,
html.a11y-extra-big-text label,
html.a11y-extra-big-text input,
html.a11y-extra-big-text textarea,
html.a11y-extra-big-text select,
body.a11y-larger-text p,
body.a11y-larger-text a,
body.a11y-larger-text span,
body.a11y-larger-text small,
body.a11y-larger-text strong,
body.a11y-larger-text li,
body.a11y-larger-text button,
body.a11y-larger-text label,
body.a11y-larger-text input,
body.a11y-larger-text textarea,
body.a11y-larger-text select {
    line-height: 1.8 !important;
}

html.a11y-extra-big-text h1,
body.a11y-larger-text h1 {
    line-height: 1.2 !important;
}

html.a11y-extra-big-text h2,
body.a11y-larger-text h2 {
    line-height: 1.3 !important;
}

html.a11y-extra-big-text h3,
html.a11y-extra-big-text h4,
body.a11y-larger-text h3,
body.a11y-larger-text h4 {
    line-height: 1.35 !important;
}

/* Prevent the accessibility widget itself from becoming oversized */

html.a11y-bigger-text #a11y-trigger,
html.a11y-bigger-text #a11y-panel,
html.a11y-bigger-text #a11y-panel *,
html.a11y-bigger-text #a11y-dict-popup,
html.a11y-bigger-text #a11y-dict-popup *,
html.a11y-bigger-text #a11y-struct-modal,
html.a11y-bigger-text #a11y-struct-modal *,
html.a11y-extra-big-text #a11y-trigger,
html.a11y-extra-big-text #a11y-panel,
html.a11y-extra-big-text #a11y-panel *,
html.a11y-extra-big-text #a11y-dict-popup,
html.a11y-extra-big-text #a11y-dict-popup *,
html.a11y-extra-big-text #a11y-struct-modal,
html.a11y-extra-big-text #a11y-struct-modal *,
body.a11y-large-text #a11y-trigger,
body.a11y-large-text #a11y-panel,
body.a11y-large-text #a11y-panel *,
body.a11y-large-text #a11y-dict-popup,
body.a11y-large-text #a11y-dict-popup *,
body.a11y-large-text #a11y-struct-modal,
body.a11y-large-text #a11y-struct-modal *,
body.a11y-larger-text #a11y-trigger,
body.a11y-larger-text #a11y-panel,
body.a11y-larger-text #a11y-panel *,
body.a11y-larger-text #a11y-dict-popup,
body.a11y-larger-text #a11y-dict-popup *,
body.a11y-larger-text #a11y-struct-modal,
body.a11y-larger-text #a11y-struct-modal * {
    font-size: revert !important;
    line-height: normal !important;
}

/* Keep form controls usable at large text sizes */

html.a11y-bigger-text input,
html.a11y-bigger-text textarea,
html.a11y-bigger-text select,
html.a11y-extra-big-text input,
html.a11y-extra-big-text textarea,
html.a11y-extra-big-text select,
body.a11y-large-text input,
body.a11y-large-text textarea,
body.a11y-large-text select,
body.a11y-larger-text input,
body.a11y-larger-text textarea,
body.a11y-larger-text select {
    min-height: 44px;
}

/* Mobile safety */

@media (max-width: 760px) {
    html.a11y-extra-big-text body,
    body.a11y-larger-text {
        font-size: 128% !important;
    }
}