#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    filter: alpha(opacity=70);
    -moz-opacity: 0.7;
    -khtml-opacity: 0.7;
    opacity: 0.7;
    z-index: 100;
    display: none;
}

.cnt223 a {
    text-decoration: none;
}

.popup-onload {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: none;
    position: fixed;
    inset: 0;
    z-index: 101;
    background-color: #00000099;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.cnt223 {
    position: relative;
    z-index: 103;
    width: auto;
    max-width: 94vw;
    max-height: 94vh;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    line-height: 0;
}

.popup-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: 94vh;
    object-fit: contain;
    border-radius: 8px;
}

a.close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 105;
    font-size: 28px;
    line-height: 1;
    color: #222;
    background: #fff;
    border-radius: 50%;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

a.close:hover {
    color: #fff;
    background: #f58220;
    transform: scale(1.05);
}

@media only screen and (max-width: 600px) {
    .popup-onload {
        padding: 15px;
    }

    .cnt223 {
        max-width: 94vw;
        max-height: 94vh;
    }

    .popup-image {
        max-width: 94vw;
        max-height: 94vh;
        border-radius: 6px;
    }

    a.close {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}

/* ==========================================================
   ACE Form Submission Result Popup
   ========================================================== */
.ace-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 18, 35, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ace-result-overlay.is-visible {
    display: flex;
}
.ace-result-popup {
    width: min(460px, 100%);
    position: relative;
    padding: 38px 34px 32px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    transform: translateY(18px) scale(.96);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.ace-result-overlay.is-visible .ace-result-popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.ace-result-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9f8ef;
    color: #18a957;
    font-size: 38px;
    font-weight: 700;
}
.ace-result-popup.is-error .ace-result-icon {
    background: #fff0f0;
    color: #dc3545;
}
.ace-result-popup h3 {
    margin: 0 0 10px;
    color: #092b52;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 700;
}
.ace-result-popup p {
    margin: 0 auto 24px;
    max-width: 370px;
    color: #687586;
    font-size: 15px;
    line-height: 1.7;
}
.ace-result-close {
    min-width: 145px;
    border: 0;
    border-radius: 8px;
    padding: 12px 25px;
    background: #f58220;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}
.ace-result-close:hover {
    transform: translateY(-2px);
    opacity: .92;
}
.ace-form-loading {
    position: relative;
    pointer-events: none !important;
    opacity: .7 !important;
}
.ace-submit-spinner {
    display: inline-block;
    margin-right: 7px;
    animation: ace-submit-spin .8s linear infinite;
}
@keyframes ace-submit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@media (max-width: 480px) {
    .ace-result-popup {
        padding: 32px 22px 26px;
        border-radius: 16px;
    }
    .ace-result-icon {
        width: 66px;
        height: 66px;
        font-size: 32px;
    }
    .ace-result-popup h3 {
        font-size: 22px;
    }
}

/* ==========================================================
   ACE Student Login (navbar dropdown + Test Login popup)
   ========================================================== */
.ace-student-login-wrap {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: 15px;
}
.ace-student-login {
    position: relative;
}
.ace-student-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 30px;
    background: var(--main-color, #f58220);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
}
.ace-student-login-btn:hover,
.ace-student-login-btn:focus {
    opacity: .92;
    outline: none;
}
.ace-student-login-arrow {
    font-size: 12px;
    transition: transform .2s ease;
}
.ace-student-login-btn[aria-expanded="true"] .ace-student-login-arrow {
    transform: rotate(180deg);
}
.ace-student-login-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 33, 71, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 999;
}
.ace-student-login-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ace-student-login-menu li {
    display: block;
}
.ace-student-login-menu a,
.ace-student-login-menu span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--heading-color, #002147);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.ace-student-login-menu a:hover {
    background: #f6f8fb;
    color: var(--main-color, #f58220);
}
.ace-student-login-menu .ace-student-login-disabled span {
    color: #a3adb8;
    cursor: not-allowed;
}
.ace-student-login-menu .ace-student-login-disabled em {
    font-style: normal;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 20px;
    background: #eef1f5;
    color: #8b95a1;
    font-size: 11px;
    font-weight: 600;
}

@media only screen and (max-width: 991px) {
    /* Mobile header row: [logo] [ Student Login ] [toggle] */
    .navbar-area .nav-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }
    .navbar-area .nav-container .logo { order: 1; flex: 0 0 auto; padding-top: 0; }
    .ace-student-login-wrap {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
        margin: 0 10px;
        padding-left: 0;
        width: auto;
        justify-content: center;
    }
    .responsive-mobile-menu {
        order: 3;
        flex: 0 0 auto;
        margin-left: auto;   /* keeps the toggle at the far right, with or without the login button */
        width: auto;
        position: static;
        display: flex;
        align-items: center;
    }
    .responsive-mobile-menu .menu.toggle-btn {
        position: relative;
        top: 0;
        left: 0;
        right: auto;
        margin: 0;
    }
    .navbar-area .nav-container .navbar-collapse { order: 4; flex: 0 0 100%; }
    .ace-student-login-btn {
        height: 38px;
        padding: 0 14px;
        gap: 6px;
        font-size: 13px;
        white-space: nowrap;
        max-width: 100%;
    }
    .ace-student-login-menu {
        left: 50%;
        right: auto;
        transform: translate(-50%, 8px);
        min-width: 220px;
    }
    .ace-student-login-menu.is-open { transform: translate(-50%, 0); }
}
@media only screen and (max-width: 420px) {
    .ace-student-login-wrap { margin: 0 6px; }
    .ace-student-login-btn { padding: 0 10px; font-size: 12px; gap: 5px; }
    .ace-student-login-btn > .fa-user-circle-o { display: none; }
}

/* ==========================================================
   ACE Test Login email/username verification gate
   ========================================================== */
.ace-verify-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 18, 35, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ace-verify-overlay.is-visible {
    display: flex;
}
.ace-verify-popup {
    width: min(380px, 100%);
    position: relative;
    padding: 30px 26px 26px;
    text-align: left;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    transform: translateY(18px) scale(.96);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.ace-verify-overlay.is-visible .ace-verify-popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.ace-verify-popup h3 {
    margin: 0 0 8px;
    color: #092b52;
    font-size: 19px;
    font-weight: 700;
}
.ace-verify-sub {
    margin: 0 0 18px;
    color: #5a6472;
    font-size: 13.5px;
    line-height: 1.5;
}
.ace-verify-label {
    display: block;
    margin-bottom: 6px;
    color: #092b52;
    font-size: 13px;
    font-weight: 600;
}
.ace-verify-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    font-size: 14px;
    color: #092b52;
    box-sizing: border-box;
}
.ace-verify-input:focus {
    outline: none;
    border-color: var(--main-color, #f58220);
}
.ace-verify-input.has-error {
    border-color: #e0483e;
}
.ace-verify-error {
    min-height: 18px;
    margin: 8px 0 0;
    color: #e0483e;
    font-size: 12.5px;
}
.ace-verify-submit {
    width: 100%;
    height: 46px;
    margin-top: 14px;
    border: none;
    border-radius: 30px;
    background: var(--main-color, #f58220);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}
.ace-verify-submit:hover {
    opacity: .92;
}
.ace-verify-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #8b95a1;
    cursor: pointer;
}
.ace-verify-close:hover {
    color: #092b52;
}
@media only screen and (max-width: 350px) {
    .ace-student-login-wrap { margin: 0 4px; }
    .ace-student-login-btn { padding: 0 8px; font-size: 11px; gap: 4px; }
}
