/*
 * UAL Password Self Service accessibility and presentation overrides.
 * Deploy to the application's /public/resources/ directory.
 */

html,
body,
button,
input,
select,
textarea,
table,
td,
th {
    font-family: Helvetica, Arial, sans-serif;
}

body {
    font-size: 16px;
}

#centerbody,
#centerbody p,
#centerbody li,
#centerbody td,
#centerbody th,
#centerbody label,
#centerbody input,
#centerbody select,
#centerbody textarea,
#centerbody button,
#footer,
#footer .infotext,
#footer .footer-segment {
    font-size: 16px;
}

#centerbody .loginFieldLabel,
#centerbody .loginFieldLabel label,
#centerbody label {
    font-size: 16px;
    font-weight: 700;
}

#centerbody #page-content-title {
    font-size: 30px;
    line-height: 1.2;
}

#centerbody .pss-section {
    margin-top: 2rem;
    max-width: 760px;
}

#centerbody .pss-section h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

#centerbody .inputfield {
    box-sizing: border-box;
    min-height: 2.5rem;
}

#centerbody a:focus-visible,
#centerbody button:focus-visible,
#centerbody input:focus-visible,
#centerbody select:focus-visible,
#centerbody textarea:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Locale controls are removed from the JSP fragments rather than hidden by broad selectors. */


/* Mobile-specific overrides must follow the desktop accessibility rules.
   In particular, reduce the 30px page title and prevent the title/header
   from being clipped on narrow screens. */
@media only screen and (max-width: 600px) {
    #centerbody #page-content-title {
        font-size: 24px !important;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    #centerbody .pss-section {
        width: 100%;
        max-width: 100%;
        margin-top: 1.25rem;
    }

    #centerbody .pss-section h2 {
        font-size: 20px !important;
        line-height: 1.3;
    }

    #centerbody,
    #centerbody p,
    #centerbody li,
    #centerbody label {
        overflow-wrap: break-word;
    }

    #centerbody input,
    #centerbody select,
    #centerbody textarea,
    #centerbody button {
        font-size: 16px;
    }
}


/* Desktop-matched mobile typography. Keep this after the base
   accessibility rules so the phone layout uses the same font family
   and a proportional heading/body hierarchy. */
@media only screen and (max-width: 600px) {
    html,
    body,
    #centerbody,
    #centerbody p,
    #centerbody li,
    #centerbody label,
    #centerbody button,
    #centerbody input,
    #centerbody select,
    #centerbody textarea {
        font-family: Arial, Helvetica, sans-serif !important;
    }

    #centerbody {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    #centerbody p,
    #centerbody li {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    #centerbody h1,
    #centerbody h2,
    #centerbody h3,
    #centerbody #page-content-title,
    #centerbody .pss-section h2 {
        font-weight: 700 !important;
        line-height: 1.25 !important;
    }

    #centerbody h1,
    #centerbody #page-content-title {
        font-size: 24px !important;
    }

    #centerbody h2,
    #centerbody .pss-section h2 {
        font-size: 21px !important;
    }

    #centerbody h3 {
        font-size: 17px !important;
    }

    #centerbody strong,
    #centerbody b {
        font-weight: 700 !important;
    }
}


/* SSPR Configuration - "What happens next?" mobile-only heading.
   Targets the inline-styled paragraph from Display_ForgottenPassword.
   All original V3 rules remain unchanged. */
@media only screen and (max-width: 600px) {
    #centerbody p[style*="font-size: 24px"] {
        font-size: 25px !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        text-align: left !important;
    }

    #centerbody p[style*="font-size: 24px"] strong,
    #centerbody p[style*="font-size: 24px"] b {
        font-weight: 700 !important;
    }
}
