﻿/* ============================================================================
   iCampus Student Portal — modern outer-page theme (login, forgot password, home)
   Loads AFTER DDS_CSS/Login_CSS/resources/logCss/style.css. Presentation only:
   no control IDs, classes, validators or the BotDetect CAPTCHA are touched.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Spectral:wght@500;600;700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
    --sp-navy:  #071E38;
    --sp-navy2: #0B2D52;
    --sp-blue:  #0E4A86;
    --sp-maroon:#9C231B;
    --sp-line:  #E4E2DD;
    --sp-ink:   #22242A;
    --sp-muted: #6C6B64;
}

body.loginBody {
    font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--sp-ink);
    background: #EEF1F5;
    min-height: 100vh;
}

/* full-bleed brand backdrop, drop any campus photo from style.css */
.loginOverlay {
    background: linear-gradient(135deg, rgba(7,30,56,.94), rgba(110,26,20,.90)) !important;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;   /* top-align: a tall card no longer clips the UAT ribbon above the viewport */
    justify-content: center;
    padding: 12px 16px 14px;
    overflow-y: auto;
}
.loginOverlay .container-fluid,
.loginOverlay .container { padding: 0 !important; max-width: none; width: 100%; }
.loginOverlay .centerBody {
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 880px !important;
    width: 100% !important;
    flex: 0 0 auto !important;
}

/* neutralise WOW.js entrance hiding so panels always show */
.loginOverlay .wow { visibility: visible !important; animation: none !important; opacity: 1 !important; transform: none !important; }

/* the card — own flex layout, don't rely on the old bootstrap columns */
.centerBody .box-shadow-right {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(7,30,56,.45);
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
}
/* brand panel: flow from the top so nothing clips; centre the form panel instead */
.centerBody .box-shadow-right > .bg-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* flow from top — heading never clips */
    align-items: flex-start;
}
.centerBody .box-shadow-right > .bg-left > * { flex: 0 0 auto; width: 100%; }
.centerBody .box-shadow-right > .bg-left > .sp-brand-logo { width: auto; }
.centerBody .box-shadow-right > .bg-right {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* pack the form and centre it in the (taller) card */
}
.centerBody .box-shadow-right > .bg-right > * { flex: 0 0 auto; width: 100%; max-width: 100%; }
.centerBody .box-shadow-right > [class*="col-"] { max-width: none; flex: 1 1 100%; }
.centerBody .box-shadow-right > .bg-left  { flex: 1 1 55%; max-width: 55%; }
.centerBody .box-shadow-right > .bg-right { flex: 1 1 45%; max-width: 45%; }
@media (max-width: 767px) {
    .loginOverlay { padding: 14px 10px; }
    .centerBody .box-shadow-right { align-items: flex-start; }
    .centerBody .box-shadow-right > .bg-left,
    .centerBody .box-shadow-right > .bg-right { flex: 1 1 100%; max-width: 100%; }
    /* login / buttons panel first on mobile */
    .centerBody .box-shadow-right > .bg-right { order: -1; }
    .centerBody .box-shadow-right > .bg-left  { order: 0; display: block; justify-content: flex-start; padding: 22px !important; }
    .box-shadow-right .bg-right,
    .box-shadow-right .loginField { padding: 22px !important; }
    .loginField .col-12 { margin-bottom: 6px !important; }
    .loginField hr { margin: 10px 0 14px; }
    .loginField .btn-block { margin-bottom: 10px !important; }
}

/* left / brand panel */
.box-shadow-right .bg-left,
.box-shadow-right .loginInfo {
    background: linear-gradient(160deg, var(--sp-navy) 0%, var(--sp-navy2) 55%, #6E1A14 100%) !important;
    color: #fff;
    padding: 16px 26px 18px !important;
}

/* ---- Campus photo — fills the top of the brand panel ----
   ONE static, optimised image, set per client/deployment via the LoginBannerImage app setting
   in Web.config (path relative to site root). The pages expose it as the --sp-hero variable.
   (~1600px wide, JPG, ideally < 250 KB). No slideshow, no transitions.
   If the file is missing the panel simply shows the brand gradient. */
.box-shadow-right .loginInfo {
    position: relative;
    padding-top: 170px !important;          /* == ::before height, so copy never touches the photo */
}
.box-shadow-right .loginInfo > * {
    position: relative;
    z-index: 1;                             /* copy always sits above the photo */
}
.box-shadow-right .loginInfo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 170px;
    z-index: 0;
    background-color: var(--sp-navy);       /* fallback while / if image absent */
    background-image:
        linear-gradient(180deg, rgba(7,30,56,0) 0%, rgba(7,30,56,0) 48%, rgba(7,30,56,.18) 66%, var(--sp-navy2) 92%, var(--sp-navy2) 100%),
        var(--sp-hero, none);
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center 42%;
    background-size: 100% 100%, cover;
}

/* Brand logo plate (left panel, optional) */
.loginInfo .sp-brand-logo {
    display: inline-block;
    background: #fff;
    border-radius: 9px;
    padding: 7px 11px;
    margin-bottom: 10px;
}
.loginInfo .sp-brand-logo img { height: 26px; width: auto; display: block; }

.loginInfo h3 {
    font-family: 'Spectral', Georgia, serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: 5px;
}
.loginInfo > h3 + * { font-size: 12px; line-height: 1.4; color: #DCE2EC; }

/* ---- Environment banner (shown only for non-production DeploymentMode) ---- */
.sp-env-ribbon {
    display: block;
    background: var(--sp-maroon);
    color: #fff;
    font: 700 13px/1.3 'Public Sans', system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 10px 24px -10px rgba(156,35,27,.6);
}
.sp-env-ribbon i { margin-right: 6px; }

.sp-expired-note {
    background: #EAF0F8;
    border: 1px solid #C6DAF0;
    color: #0E4A86;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* show/hide password toggle (injected by sp-login.js) */
.sp-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9A998F;
    cursor: pointer;
    z-index: 5;
    font-size: 14px;
}
.sp-eye:hover { color: var(--sp-blue); }
.login-box .sp-eye { right: 46px; }   /* NewRegistration/Login has an append icon */

.sp-env-badge {
    display: inline-block;
    background: var(--sp-maroon);
    color: #fff;
    font: 800 12px/1 'Public Sans', system-ui, sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 6px 11px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.4);
    vertical-align: middle;
    margin-left: 10px;
}

/* ---- Right panel: University logo primary, iCampus as "powered by" ---- */
/* Bootstrap's .m-auto on the logo div is `margin:auto !important` — in a flex
   column it eats ALL free space and leaves a big gap under the logo on sparse
   pages (Default, ForgotPassword). Pin the vertical margins, keep it centred. */
.loginField .sp-brand-primary {
    margin: 2px auto 4px !important;
    align-self: center;
}
.loginField .sp-brand-primary img { max-height: 52px; width: auto; }
.loginField > .col-12[style] { margin-top: 14px !important; }
.loginField .sp-powered {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--sp-line);
    text-align: center;
    color: var(--sp-muted);
    font-size: 12px;
    letter-spacing: .04em;
}
.loginField .sp-powered img { max-height: 28px; width: auto; vertical-align: middle; margin-left: 8px; opacity: .95; }
.loginField .sp-powered .sp-dds { margin-top: 4px; font-size: 10.5px; letter-spacing: .03em; }
.loginField .sp-powered .sp-dds a { color: var(--sp-muted); text-decoration: none; }
.loginField .sp-powered .sp-dds a:hover { color: var(--sp-maroon); text-decoration: underline; }
.loginInfo p { color: #DCE2EC; font-size: 12px; line-height: 1.4; margin-bottom: 5px; }
/* Safety net: some deployed Web.config values for ClientWelcomeMsgDetails contain
   the blurb twice (legacy malformed markup). Only the first paragraph of the
   welcome text (a direct child <p> of .loginInfo) is shown, so a doubled value
   can't bloat the brand panel. Fix the config to a single <p> for the real fix. */
.loginInfo > p:nth-of-type(n+2) { display: none; }

/* attention pulse for the "New Registration" CTA on Default.aspx */
@keyframes sp-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(238,29,37,.55); }
    50%      { box-shadow: 0 0 0 10px rgba(238,29,37,0); }
}
.loginField .sp-blink {
    animation: sp-blink 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .loginField .sp-blink { animation: none; }
}

/* "Student Portal Home" link on the brand panel */
.loginInfo .sp-home-link {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 8px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}
.loginInfo .sp-home-link:hover { background: rgba(255,255,255,.12); color: #fff; }
/* collapse the bootstrap spacing in the "For More Details / contact" block */
.loginInfo > .col-12 { padding: 0 !important; }
.loginInfo > .col-12 .row { margin-left: 0 !important; margin-right: 0 !important; }
.loginInfo > .col-12 [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; }
.loginInfo > .col-12 .mb-4 { margin-bottom: 0 !important; }
.loginInfo .border-bottom {
    border-color: rgba(255,255,255,.18) !important;
    padding-top: .45rem !important;
    padding-bottom: .45rem !important;
    margin-bottom: .35rem;
}
.loginInfo .btn.btn-sm { margin: .35rem 0 !important; }
.loginInfo a.btn-danger {
    background: transparent;
    border: 1px solid rgba(255,255,255,.55);
    color: #fff;
    border-radius: 10px;
}
.loginInfo a.btn-danger:hover { background: rgba(255,255,255,.12); }
.loginInfo a[style*="yellow"] { color: #fff !important; }

/* right / form panel */
.box-shadow-right .bg-right,
.box-shadow-right .loginField {
    background: #fff !important;
    padding: 14px 24px !important;
}
.loginLogo { margin-bottom: 2px; }
.loginLogo img { max-height: 34px; width: auto; }
.loginField hr { border-top: 1px solid var(--sp-line); margin: 6px 0 6px; }
.loginField .sp-portal-title {
    font-family: 'Spectral', Georgia, serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--sp-navy);
    text-align: center;
    letter-spacing: .02em;
    margin-bottom: 6px;
}

/* inputs */
.loginField .input-group { margin-bottom: 6px !important; display: flex; }
.loginField .input-group-text {
    background: #F5F6F4;
    border: 1px solid #D9D7D1;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    color: var(--sp-muted);
    min-width: 44px;
    justify-content: center;
}
.loginField .form-control {
    height: 36px;
    border: 1px solid #D9D7D1;
    border-radius: 0 10px 10px 0;
    box-shadow: none;
    color: var(--sp-ink);
    font-size: 13.5px;
}
.loginField .form-control:focus {
    border-color: var(--sp-blue);
    box-shadow: 0 0 0 3px rgba(14,74,134,.12);
}
/* ---- BotDetect CAPTCHA row — tidy, centred ---- */
.loginField .input-group.sp-captcha {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center !important;
}
/* the standalone refresh chip next to the captcha is redundant — hide it */
.loginField .sp-captcha > .input-group-prepend { display: none !important; }

.loginField .sp-captcha > .BDC_CaptchaDiv,
.loginField .sp-captcha > .BDC_CaptchaDiv.form-control {
    display: inline-flex !important;
    flex: 0 0 auto !important;   /* stop Bootstrap's .form-control from stretching it full-width */
    align-items: center;
    gap: 8px;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.loginField .BDC_CaptchaImageDiv { line-height: 0; }
.loginField .BDC_CaptchaImageDiv > a { display: block; line-height: 0; }
.loginField .BDC_CaptchaImage {
    display: block;
    height: 34px !important;
    width: auto !important;
    border: 1px solid #D9D7D1;
    border-radius: 8px;
    background: #fff;
}
.loginField .BDC_CaptchaIconsDiv {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.loginField .BDC_CaptchaIconsDiv > a { display: block; line-height: 0; }
.loginField .BDC_CaptchaIconsDiv img { width: 16px; height: 16px; opacity: .75; }
.loginField .BDC_CaptchaIconsDiv img:hover { opacity: 1; }

/* buttons */
.loginField .btn { border-radius: 10px; font-weight: 600; }
.loginField .btn:not(.btn-block) { height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.loginField .btn-block { height: auto; padding: 8px 12px !important; font-size: .94rem !important; line-height: 1.3; }
.loginField .btn-block small,
.loginField .btn-block span { font-size: 11px; font-weight: 500; opacity: .92; }
.loginField .btn-complete {
    background: var(--sp-navy);
    border-color: var(--sp-navy);
    color: #fff;
    min-width: 130px;
}
.loginField .btn-complete:hover { background: #04162A; border-color: #04162A; color: #fff; }
.loginField .btn-danger {
    background: var(--sp-maroon);
    border-color: var(--sp-maroon);
    color: #fff;
}
.loginField .btn-danger:hover { background: #7A1B15; border-color: #7A1B15; color: #fff; }
.loginField .btn-info {
    background: #fff;
    border: 1px solid var(--sp-line);
    color: var(--sp-ink);
}
.loginField .btn-info:hover { background: #F5F5F3; color: var(--sp-ink); }

/* validators / message */
.loginField .input-group [style*="color: red"] { font-size: 13px !important; margin-top: 14px !important; }

@media (max-width: 767px) {
    .box-shadow-right .bg-left,
    .box-shadow-right .loginInfo { padding: 30px 24px !important; }
    .centerBody .box-shadow-right > .loginInfo { padding-top: 120px !important; }
    .box-shadow-right .loginInfo::before { height: 120px; }
    .box-shadow-right .bg-right,
    .box-shadow-right .loginField { padding: 30px 24px !important; }
}

/* ---- NewRegistration login extras ---- */
.sp-prov-note {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #EAEFF8;
    margin: 12px 0 4px;
}
.sp-prov-note b { color: #fff; }
.loginField .sp-cred-hint {
    font-size: 11.5px;
    color: #7A1B15;
    background: #FBEBEA;
    border: 1px solid #F0C7C4;
    border-radius: 8px;
    padding: 7px 10px;
    margin-bottom: 12px;
    text-align: center;
}
