/* START FILE: lib/css/phd-portal-integration.css — existing layout, responsive and visual styles. */
.phd-top-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.phd-student-login {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 999px;
    color: #fff !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    transition: .2s ease
}

.phd-student-login:hover {
    background: #fff;
    color: #28166f !important;
    transform: translateY(-1px)
}

.phd-auth-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    pointer-events: none
}

.phd-auth-popup.is-open {
    visibility: visible;
    pointer-events: auto
}

.phd-auth-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(20, 14, 49, .68);
    opacity: 0;
    transition: opacity .28s ease;
    backdrop-filter: blur(5px)
}

.phd-auth-popup.is-open .phd-auth-backdrop {
    opacity: 1
}

.phd-auth-box {
    position: relative;
    width: min(980px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 32px 38px 28px;
    border-radius: 22px;
    border-top: 5px solid #f68b00;
    background: #fff;
    box-shadow: 0 35px 90px rgba(10, 5, 37, .35);
    transform: translateY(24px) scale(.975);
    opacity: 0;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s ease
}

.phd-auth-popup.is-open .phd-auth-box {
    transform: translateY(0) scale(1);
    opacity: 1
}

.phd-auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 1px solid #e2def0;
    border-radius: 50%;
    background: #fff;
    color: #28166f;
    font-size: 26px;
    line-height: 1;
    cursor: pointer
}

.phd-auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-right: 50px;
    margin-bottom: 22px
}

.phd-auth-brand img {
    width: 190px;
    max-width: 45%;
    height: auto
}

.phd-auth-brand span {
    font-size: 12px;
    font-weight: 800;
    color: #705f96
}

.phd-auth-view h2 {
    margin: 0;
    color: #393279;
    font-size: clamp(25px, 3vw, 24px);
    font-weight: 700;
}

.phd-auth-view>p {
    margin: 7px 0 20px;
    color: #645b79;
    font-size: 15px
}

.phd-flow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    padding: 12px 14px;
    border: 1px solid #e6e2f0;
    border-radius: 12px;
    background: #faf9fd;
    color: #5f5677;
    font-size: 12px;
    font-weight: 750
}

.phd-flow b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eee9fb;
    color: #382185
}

.phd-flow .active {
    color: #24145f
}

.phd-flow .active b {
    background: #382185;
    color: #fff
}

.phd-auth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px 20px
}

.phd-field {
    display: grid;
    gap: 7px
}

.phd-field label {
    color: #17122f;
    font-size: 13px;
    font-weight: 750
}

.phd-field input,
.phd-field select {
    width: 100%;
    min-height: 44px;
    padding: 5px 13px;
    border: 1px solid #d8d3e7;
    border-radius: 11px;
    background: #faf9fd;
    color: #17122f;
    font-size: 15px;
    outline: none
}

.phd-field input:focus,
.phd-field select:focus {
    border-color: #3d238f;
    box-shadow: 0 0 0 3px rgba(61, 35, 143, .12)
}

.phd-phone {
    display: grid;
    grid-template-columns: 64px 1fr
}

.phd-phone span {
    display: grid;
    place-items: center;
    border: 1px solid #d8d3e7;
    border-right: 0;
    border-radius: 11px 0 0 11px;
    background: #f4f1fb;
    color: #5e5379
}

.phd-phone input {
    border-radius: 0 11px 11px 0
}

.phd-consent {
    grid-column: 1/-1;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 11px;
    background: #faf9fd;
    color: #625a75;
    font-size: 12px
}

.phd-consent input {
    margin-top: 2px
}

.phd-auth-actions {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px
}

.phd-auth-actions a {
    color: #28166f;
    font-size: 13px;
    font-weight: 700;
}
.forgot_password{
    font-size: 13px;
}

.phd-auth-submit {
    min-height: 34px;
    padding: 5px 24px;
    border: 0;
    border-radius: 4px;
    background: #f68b00;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(246, 139, 0, .22);
}
.phd-auth-submit_2{
    min-height: 34px;
    padding: 5px 24px;
    border: 0;
    border-radius: 4px;
    background: #f68b00;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(246, 139, 0, .22);
}
.phd-auth-submit:disabled {
    opacity: .65;
    cursor: wait
}

.phd-auth-error {
    grid-column: 1/-1;
    margin: 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff0f0;
    color: #b42318;
    font-size: 13px
}

.phd-otp-wrap {
    text-align: center;
    max-width: 560px;
    margin: auto
}

.phd-otp-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 26px 0 18px
}

.phd-otp-row input {
    width: 58px;
    height: 62px;
    border: 1px solid #cec7e2;
    border-radius: 12px;
    background: #faf9fd;
    text-align: center;
    font-size: 27px;
    font-weight: 800;
    color: #25145f;
    outline: none
}

.phd-otp-row input:focus {
    border-color: #3d238f;
    box-shadow: 0 0 0 3px rgba(61, 35, 143, .12)
}

.phd-otp-meta {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 15px;
    font-size: 13px;
    color: #6a617c
}

.phd-link-button {
    border: 0;
    background: transparent;
    color: #382185;
    text-decoration: underline;
    cursor: pointer;
    padding: 0
}

.phd-login-box {
    width: min(520px, 100%)
}

.phd-login-box .phd-auth-grid {
    grid-template-columns: 1fr
}

.phd-hidden {
    display: none !important
}

.phd-toast-stack {
    position: fixed;
    z-index: 1000000;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 10px;
    width: min(370px, calc(100vw - 28px));
    pointer-events: none
}

.phd-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: #152116;
    border-left: 5px solid #18a957;
    box-shadow: 0 18px 45px rgba(13, 42, 25, .22);
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .28s ease
}

.phd-toast.show {
    transform: translateX(0);
    opacity: 1
}

.phd-toast-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    background: #18b84f;
    color: #fff;
    font-weight: 900
}

.phd-toast strong {
    display: block;
    font-size: 14px
}

.phd-toast span {
    display: block;
    margin-top: 2px;
    color: #58655d;
    font-size: 12px
}

@media(max-width:767.98px) {
    .phd-auth-popup {
        padding: 12px
    }

    .phd-auth-box {
        padding: 25px 18px 22px;
        max-height: calc(100vh - 24px)
    }

    .phd-auth-grid {
        grid-template-columns: 1fr
    }

    .phd-consent,
    .phd-auth-actions {
        grid-column: 1
    }

    .phd-auth-actions {
        align-items: stretch;
        flex-direction: column-reverse
    }

    .phd-auth-submit {
        width: 100%
    }

    .phd-auth-brand img {
        width: 160px
    }

    .phd-flow {
        overflow-x: auto;
        white-space: nowrap
    }

    .phd-otp-row {
        gap: 8px
    }

    .phd-otp-row input {
        width: 48px;
        height: 56px
    }

    .phd-top-actions {
        gap: 6px
    }

    .phd-student-login {
        padding: 4px 9px;
        font-size: 10px
    }

    .phd-toast-stack {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px)
    }
}

@media(prefers-reduced-motion:reduce) {

    .phd-auth-box,
    .phd-auth-backdrop,
    .phd-toast {
        transition: none
    }
}

.container,
.container-lg,
.container-md,
.container-sm,
.container-xl {
    max-width: 1280px;
}

/* Shared card treatment for the hero form and every Apply Now registration popup. */
.hero-section .enquiry-box {
    max-width: 424px;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(20, 12, 55, .24);
}

.hero-section .enquiry-header,
.phd-auth-box .phd-auth-head {
    background: #28166f;
    color: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    padding: 8px 48px;
    line-height: 1.35;
}

.hero-section .form-content {
    padding: 10px 12px 12px;
}

.hero-section .form-content>p,
.phd-auth-box .phd-auth-intro {
    color: #30217d;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    padding-bottom: 6px;
    padding-top: 6px;
}

.hero-section #phdHeroEnquiryForm .input-group,
.phd-auth-box .phd-matched-form .input-group {
    display: flex;
    flex-wrap: nowrap;
    margin: 0 0 13px;
}

.hero-section #phdHeroEnquiryForm .input-group-text,
.phd-auth-box .phd-matched-form .input-group-text {
    width: 44px;
    height: 44px;
    flex: 0 0 51px;
    border: 1px solid #d4d5dd;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #fff;
}

.hero-section #phdHeroEnquiryForm .form-control,
.hero-section #phdHeroEnquiryForm .form-select,
.phd-auth-box .phd-matched-form .form-control,
.phd-auth-box .phd-matched-form .form-select {
    height:40px;
    min-height: 40px;
    margin: 0;
    padding: 8px 0px;
    border: 1px solid #d4d5dd;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    background: #fff;
    color: #17122f;
    font-size: 13px;
    font-weight: 400;
    box-shadow: none;
    outline: none;
    min-width: 0;
}

.hero-section #phdHeroEnquiryForm .input-group:focus-within .input-group-text,
.hero-section #phdHeroEnquiryForm .input-group:focus-within .form-control,
.hero-section #phdHeroEnquiryForm .input-group:focus-within .form-select,
.phd-auth-box .phd-matched-form .input-group:focus-within .input-group-text,
.phd-auth-box .phd-matched-form .input-group:focus-within .form-control,
.phd-auth-box .phd-matched-form .input-group:focus-within .form-select {
    border-color: #30217d;
}

.hero-section #phdHeroEnquiryForm .form-check,
.phd-auth-box .phd-matched-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 17px;
    padding: 0;
    color: #24213a;
    font-size: 12px;
    line-height: 1.45;
    background: transparent;
}

.hero-section #phdHeroEnquiryForm .form-check-input,
.phd-auth-box .phd-matched-consent .form-check-input {
    flex: 0 0 auto;
    margin: 3px 0 0;
}

.hero-section #phdHeroEnquiryForm .form-check-label {
    font-size: 11px;
    line-height: 1.45;
}

.hero-section #phdHeroEnquiryForm .enroll-btn,
.phd-auth-box .phd-matched-form .phd-auth-submit {
    display: block;
    width: 100%;
    min-height: 42px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: #ef8800;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.phd-auth-box {
    width: min(454px, 100%);
    padding: 0 0 22px;
    border: 0;
    border-radius: 14px;
    overflow: auto;
}

.phd-auth-box .phd-auth-close {
    z-index: 2;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
}

.phd-auth-box .phd-auth-view {
    padding: 20px 22px 0;
}

.phd-auth-box .phd-matched-form {
    display: block;
}

.phd-auth-box .phd-matched-login {
    display: block;
    margin: 13px 0 0;
    text-align: center;
    color: #30217d;
    font-size: 13px;
    font-weight: 700;
}

.phd-auth-box .phd-auth-error[hidden],
.hero-section #phdHeroError[hidden] {
    display: none;
}

.phd-auth-box .phd-auth-error:not([hidden]),
.hero-section #phdHeroError:not([hidden]) {
    display: block;
    margin: 0 0 12px;
}

@media (max-width: 575px) {
    .hero-section .enquiry-box {
        max-width: 100%;
    }

    .hero-section .form-content,
    .phd-auth-box .phd-auth-view {
        padding: 16px 16px 0;
    }

    .hero-section .form-content {
        padding-bottom: 18px;
    }

    .hero-section .enquiry-header,
    .phd-auth-box .phd-auth-head {
        font-size: 18px;
    }
}
/* Compact portal controls: scoped to admission forms. */
.phd-auth-box input:not([type=checkbox]),.phd-auth-box select,.phd-field input,.phd-field select{min-height:44px!important;height:44px!important;padding:8px 12px!important;font-size:14px!important}
.phd-auth-box{max-height:90dvh;overflow-y:auto}
.phd-auth-box .phd-otp-row input{width:46px;height:48px!important;text-align:center}

/* Compact PhD hero / Apply Now / login inputs: appearance only. */
.hero-section #phdHeroEnquiryForm input:not([type=checkbox]),
.hero-section #phdHeroEnquiryForm select,
.phd-auth-box input:not([type=checkbox]),
.phd-auth-box select,
.phd-field input,
.phd-field select {
    box-sizing: border-box;
    height: 38px !important;
    min-height: 38px !important;
    padding: 7px 12px !important;
    font-size: 14px !important;
    line-height: 22px !important;
}
.hero-section #phdHeroEnquiryForm .input-group-text,
.phd-auth-box .phd-matched-form .input-group-text {
    height: 38px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section #phdHeroEnquiryForm input::placeholder,
.phd-auth-box input::placeholder { font-size: 14px !important; }
.phd-field input, .phd-field select { border-radius: 8px; }
.hero-section #phdHeroEnquiryForm .input-group:focus-within,
.phd-auth-box .phd-matched-form .input-group:focus-within {
    border-radius: 6px;
    box-shadow: 0 0 0 3px rgba(103, 68, 184, .12);
}

/* END FILE: lib/css/phd-portal-integration.css. */
