/* IIT Companion - branded WordPress login */

/* Without this, a full-width element plus its padding measures wider than the
   screen, which is what pushed the form off the side on phones. */
body.login,
body.login *,
body.login *::before,
body.login *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body.login {
    max-width: 100%;
    background: #eef2f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Soft brand-tinted glow behind the card, the same idea as the CBT portal. */
body.login::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(520px circle at 18% 12%, rgba(0, 45, 116, 0.16), transparent 60%),
        radial-gradient(460px circle at 84% 82%, rgba(255, 176, 0, 0.20), transparent 60%);
    pointer-events: none;
}

body.login #login {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(420px, 100%);
    padding: 24px 20px 40px 20px;
    margin: 0 auto;
}

/* Logo */

.login h1 {
    margin-bottom: 6px;
}

.login h1 a {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 76px !important;
    height: 76px !important;
    margin: 0 auto 14px auto !important;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 45, 116, 0.22);
    text-indent: -9999px;
    overflow: hidden;
    display: block;
}

/* Heading above the form */

.iitc-login-intro {
    text-align: center;
    margin: 0 0 18px 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.iitc-login-intro h2 {
    margin: 0 0 4px 0;
    font-size: 21px;
    font-weight: 700;
    color: #002d74;
    line-height: 1.25;
}

.iitc-login-intro p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #667085;
}

/* Card */

.login form {
    background: #ffffff;
    border: 1px solid #e2e7f0;
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(16, 24, 40, 0.10);
    padding: 26px 26px 24px 26px;
    margin-top: 0;
}

.login form .forgetmenot {
    font-weight: 400;
}

.login label {
    color: #344054;
    font-size: 14px;
    font-weight: 600;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    color: #101828;
    background: #ffffff;
    box-shadow: none;
    margin-bottom: 14px;
    min-height: 44px;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #002d74;
    box-shadow: 0 0 0 3px rgba(0, 45, 116, 0.12);
    outline: none;
}

.login .button.wp-hide-pw {
    border: 0;
    background: transparent;
    color: #667085;
    box-shadow: none;
    top: 2px;
}

.login .button.wp-hide-pw:hover {
    color: #002d74;
}

/* Submit */

.login .button-primary {
    width: 100%;
    float: none;
    display: block;
    background: #002d74;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    text-shadow: none;
    font-size: 15px;
    font-weight: 700;
    height: auto;
    line-height: 1.2;
    padding: 13px 20px;
    margin-top: 6px;
    transition: background 0.15s ease;
}

.login .button-primary:hover,
.login .button-primary:focus {
    background: #0448b3;
    box-shadow: none;
}

.login .button-primary:focus {
    box-shadow: 0 0 0 3px rgba(0, 45, 116, 0.22);
}

/* Links below the card */

.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 14px 0 0 0;
}

.login #nav a,
.login #backtoblog a {
    color: #475467;
    font-size: 14px;
    text-decoration: none;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #002d74;
    text-decoration: underline;
}

/* Notices */

.login .message,
.login #login_error,
.login .notice {
    border-radius: 8px;
    border-left-width: 4px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    padding: 12px 14px;
    font-size: 14px;
}

.login #login_error {
    border-left-color: #d92d20;
}

.login .message {
    border-left-color: #002d74;
}

/* Tagline */

.iitc-login-tagline {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #667085;
    font-size: 13px;
    margin: 4px auto 28px auto;
    width: 100%;
    max-width: min(420px, 100%);
    padding: 0 20px;
}

.login .language-switcher {
    margin-top: 6px;
}

@media (max-width: 480px) {
    body.login #login {
        max-width: 100%;
        padding: 18px 14px 32px 14px;
    }
    .login form {
        padding: 22px 18px 20px 18px;
        border-radius: 12px;
    }
    .login h1 a {
        width: 66px !important;
        height: 66px !important;
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login .button-primary {
        transition: none;
    }
}
