/*
************************ Programme Card ************************
*/

.programme-faculty-card {
    position: absolute;
    width: fit-content;
    max-width: 65%;
    border-radius: 0 4px 4px 0;
    padding: 6px 12px 6px 32px;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    z-index: 2;
}

.programme-scholarship-card {
    position: absolute;
    width: fit-content;
    bottom: 0;
    left: 0;
    background-color: #EF7C00;
    padding: 6px 18px;
    color: #FFFFFF;
    font-weight: 400;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    z-index: 2;
}
.programme-scholarship-card div {
    width: 30px;
    height: 100%;
    background: linear-gradient(to bottom left, transparent 0%, transparent 50%, #EF7C00 50%, #EF7C00 100%);
    position: absolute;
    right: -30px;
    top: 0;
}
/*
************************ Programmes Icon Map ************************
*/

.programme-icons {
    color: white;
    padding: 12px 6px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
}

.programme-map-full-width {
    width: 100%;
    position: relative;
}

@media screen and (max-width: 1025px) {
    .programme-map-full-width {
        display: none;
    }

    #programme_icons_container {
        display: block;
    }

    #programme_container {
        position: relative !important;
    }
}

@media screen and (min-width: 1025px) {
    .programme-map-full-width {
        display: block;
    }

    #programme_icons_container {
        display: none;
    }
}

.programme-icon-wrapper,
.programme-icon-wrapper-small {
    position: absolute;
    width: 60px;
    height: 60px;
}

@media screen and (min-width: 1600px) {
    .programme-icon-wrapper {
        width: 200px;
        height: 180px;
    }

    .programme-icon-wrapper-small {
        width: 120px;
        height: 100px;
    }

    .programme-icon-wrapper span {
        font-size: 21px !important;
    }

    .programme-icon-wrapper-small span {
        font-size: 18px !important;
    }

    .programme-icon-wrapper button:hover > span {
        font-size: 16px !important;
    }

    .programme-icon-wrapper-small button:hover > span {
        font-size: 14px !important;
    }
}
@media screen and (min-width: 1300px) and (max-width: 1600px) {
    .programme-icon-wrapper {
        width: 160px;
        height: 150px;
    }

    .programme-icon-wrapper-small {
        width: 100px;
        height: 90px;
    }

    .programme-icon-wrapper span {
        font-size: 18px !important;
    }

    .programme-icon-wrapper button:hover ~ span {
        font-size: 16px !important;
    }

    .programme-icon-wrapper-small span {
        font-size: 16px !important;
    }

    .programme-icon-wrapper-small button:hover ~ span {
        font-size: 13px !important;
    }
}
@media screen and (min-width: 1025px) and (max-width: 1300px) {
    .programme-icon-wrapper {
        width: 130px;
        height: 110px;
    }

    .programme-icon-wrapper-small {
        width: 80px;
        height: 70px;
    }

    .programme-icon-wrapper {
        font-size: 15px !important;
    }

    .programme-icon-wrapper-small {
        font-size: 14px !important;
    }
}

.programme-icon-wrapper button,
.programme-icon-wrapper-small button {
    font-family: 'Montserrat', sans-serif;
    border: none;
    background-color: transparent;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    width: inherit;
    height: inherit;
    margin-left: -50%;
    margin-top: -50%;
    padding: 0;
}
.programme-icon-wrapper button img,
.programme-icon-wrapper-small button img {
    width: inherit;
    z-index: 2;
}
.programme-icon-wrapper button:hover > img,
.programme-icon-wrapper-small button:hover > img {
    animation: updown 2s ease infinite;
    width: 120%;
    z-index: 5;
}
.programme-icon-wrapper button:hover > span,
.programme-icon-wrapper-small button:hover > span {
    animation: updown 2s ease infinite;
    z-index: 5;
}

.programme-icon-wrapper button:hover > span > span,
.programme-icon-wrapper-small button:hover > span > span {
    background-color: white;
}

.programme-icon-wrapper button #full-programme-icon-name,
.programme-icon-wrapper-small button #full-programme-icon-name {
    display: none;
}

.programme-icon-wrapper button:hover > span > #full-programme-icon-name,
.programme-icon-wrapper-small button:hover > span > #full-programme-icon-name {
    display: block;
}

.programme-icon-wrapper button #short-programme-icon-name,
.programme-icon-wrapper-small button #short-programme-icon-name {
    display: block;
}
.programme-icon-wrapper button:hover > span > #short-programme-icon-name,
.programme-icon-wrapper-small button:hover > span > #short-programme-icon-name {
    display: none;
}

.programme-icon-label-wrapper {
    position: absolute;
    width: inherit;
}

.programme-icon-label-wrapper span {
    padding: 4px 8px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(60, 60, 60, 1);
    font-weight: 600;
    z-index: 3;
    position: absolute;
}

.programme-icon-label-wrapper-top {
    top: -55%;
}

.programme-icon-label-wrapper-top span {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
}

.programme-icon-label-wrapper-bottom {
    bottom: 60%;
}

.programme-icon-label-wrapper-bottom span {
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
}

.programme-icon-label-wrapper-left {
    left: -150%;
}

.programme-icon-label-wrapper-left span {
    right: 0;
    bottom: -50%;
    transform: translate(0, 100%);
}

.programme-icon-label-wrapper-right {
    right: -50%;
}

.programme-icon-label-wrapper-right span {
    left: 0;
    bottom: -50%;
    transform: translate(0, 100%);
}

@keyframes updown {
    0% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(-5px);
    }
}

/*
************************ Thesis Advisor Page ************************
*/

.media-list-container {
    display: grid;
    gap: 1rem;
    @media screen and (min-width: 600px) {
        grid-template-columns: repeat(2, 1fr);
    }
    @media screen and (min-width: 1200px) {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mentoring-style-list-wrapper {
    display: grid;
    gap: 1rem;
    @media screen and (min-width: 1200px) {
        grid-template-columns: repeat(2, 1fr);
    }
}

#modalACF .modal-dialog {
    width: 90% !important;
    max-width: 90% !important;
    @media (min-width: 1350px) {
        max-width: 1200px !important;
    }
}
#modalACF .modal-content {
    max-height: 75vh !important;
}
#modalViewMore .modal-dialog {
    width: 90% !important;
    max-width: 90% !important;
    @media (min-width: 1350px) {
        max-width: 1000px !important;
    }
}
.ui-autocomplete {
    position: absolute;
    top: 48px !important;
    left: 0;
    list-style-type: none;
    padding: 10px 15px;
    border-radius: 4px;
    z-index: 1200;
    margin-top: 5px;
    margin-left: 0;
    background-color: white;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
}

/* Style the list items in the autocomplete */
.ui-autocomplete .ui-menu-item {
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

/* Hover effect for the list items */
.ui-autocomplete .ui-menu-item-wrapper:hover {
    background-color: var(--color-nus-blue); /* Change the background color on hover */
    color: white; /* Change the text color on hover */
}

/* Optional: Highlight the selected item with jQuery's built-in class */
.ui-state-focus {
    background-color: var(--color-nus-blue);
    color: white;
}

/*
************************ Student Page ************************
*/

#student_list_page h2 {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 5px 5px #3C3C3C;
    @media screen and (max-width: 800px) {
        font-size: 26px;
    }
}
#student_list_page h6 {
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 2px 2px #3C3C3C;
    @media screen and (max-width: 800px) {
        font-size: 16px;
    }
}
.student-list-panel {
    filter: drop-shadow(0px 20px 40px rgba(60, 60, 60, 0.1));
    border-radius: 20px;
}
.student-list-panel input[type="checkbox"] {
    cursor: pointer;
}
.student-list-panel input[type="checkbox"]:checked {
    accent-color: var(--color-darkslateblue);
!important;
}
.student-list-panel > :nth-child(2) {
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border: 1px solid transparent;
    border-top: none;
    background-color: white;
    padding: 36px;
    @media screen and (max-width: 1000px) {
        padding: 24px;
    }
    @media screen and (max-width: 600px) {
        padding: 16px 12px;
    }

}
.student-portal-tabs {
    color: white;
    background-color: #115AA6;
    cursor: pointer;
    padding: 12px 24px;
    border: 1px solid white;
    @media screen and (max-width: 320px) {
        gap: 0 !important
    }
}

.student-portal-tabs.active {
    background-color: white;
    color: #115AA6;
}

.student-profile-main-tab {
    color: #003D7C;
    cursor: pointer;
}

.student-profile-main-tab.active {
    color: #EF7C00;
}

.student-profile-tab {
    width: 33.3%;
    flex-wrap: nowrap;
    @media screen and (max-width: 768px) {
        width: 100%;
    }
}

.quote-mark {
    #background-color: #EF7C00;
    color: #EF7C00;
    #display: inline-block;
}

#refresh-student-showcase {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    border-radius: 4px;
    border: 1px solid #D9D9D9;
    color: #3C3C3C;
    background-color: transparent;
}
#refresh-student-showcase .rotation-icon {
    transition: transform 0.5s ease;
}
@keyframes rotateOneRound {
    0% {
        /* Start state and pause */
        transform: rotate(0deg);
    }
    50% {
        /* Halfway through the animation, rotate to 180 degrees */
        transform: rotate(180deg);
    }
    100% {
        /* Pause and end state */
        transform: rotate(360deg);
    }
}
#refresh-student-showcase .rotation-icon.rotated {
    animation: rotateOneRound 400ms linear infinite;
}
#refresh-student-showcase:hover {
    color: #003D7C;
    border: 1px solid #003D7C;
}

.liked-student-card {
    position: relative;
    border-radius: 20px;
    display: flex;
    padding: 12px;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    width: 100%;
    overflow: hidden;
    @media screen and (min-width: 780px) {
        flex-direction: row;
    }
}
.liked-student-card.active {
    background: #C2DBFF;
}
.liked-student-card .card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    @media screen and (min-width: 780px) {
        width: 120px;
        height: 120px;
        min-width: 120px;
    }
    @media screen and (min-width: 1000px) {
        width: 180px;
        height: 180px;
    }
}

.liked-student-card ul {
    overflow-x: auto;
    overflow-y: visible;
    list-style-type: none;
    padding: 0;
    display: none;
    gap: 16px;
    margin-top: 16px;
    @media screen and (min-width: 780px) {
        display: flex;
    }
}
.liked-student-card li {
    color: #3C3C3C80;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    height: fit-content;
    position: relative;
}
.liked-student-card li.active {
    color: #3C3C3C;
    border-bottom: 2px solid #3C3C3C;
}
.liked-student-card div[card-body="bottom"] {
    display: none;
    @media screen and (min-width: 780px) {
        display: flex;
    }
}

.liked-student-card input[type="checkbox"] {
    position: absolute;
    z-index: 6;
    background: black;
    top: 15px;
    right: 15px;
    height: fit-content;
    @media screen and (min-width: 780px) {
        position: relative;
        margin-left: 20px
    }
}

#liked_students_action_bar button {
    padding: 6px 12px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    box-shadow: 0 0 0 3px #FFFFFF4D;
    display: flex;
    gap: 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #3C3C3C;
    @media screen and (min-width: 780px) {
        padding: 6px 24px;
    }

}
#liked_students_action_bar button:hover {
    border: 1px solid var(--color-darkslateblue-100);
}

.student-portal-card-list-wrapper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 28px;
    width: 100%;
    padding-top: 0.8rem;
    padding-bottom: 1.6rem;
    box-sizing: border-box;
}

@media (max-width: 1400px) {
    .student-portal-card-list-wrapper {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .student-portal-card-list-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .student-portal-card-list-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .student-portal-card-list-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 20px;
    }
}

.student-portal-card-list-wrapper > * {
    min-width: 0;
}


#student_list_page .hover-overlay {
    position: absolute;
    bottom: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 61, 124, 0.05), rgba(0, 61, 124, 0.85));
    opacity: 0;
    transition: opacity 0.5s ease-in-out, bottom 1s ease-in-out;
    z-index: 1;
}

#student_list_page .student-card-image-wrapper:hover .hover-overlay {
    /*animation: fadeIn 0.5s ease-in forwards;*/
    bottom: 0;
    opacity: 1;
}

#student_list_page .student-portal-card-list-wrapper > a {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    padding: 12px;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

#student_list_page .student-portal-card-list-wrapper > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.12);
}

#student_list_page .student-portal-card-list-wrapper .custom-card-title {
    font-size: 16px;
}

#student_list_page .student-portal-card-list-wrapper .custom-card-title + .custom-card-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(15, 79, 147, 0.8);
}

#student_list_page .student-portal-card-list-wrapper .student-card-image-wrapper {
    aspect-ratio: 4 / 5 !important;
    border-radius: 16px;
    overflow: hidden;
}

@media (max-width: 480px) {
    #student_list_page .student-portal-card-list-wrapper > a {
        padding: 8px;
        border-radius: 14px;
    }
    #student_list_page .student-portal-card-list-wrapper .student-card-image-wrapper {
        aspect-ratio: 3 / 4 !important;
        border-radius: 12px;
    }
    #student_list_page .student-portal-card-list-wrapper .custom-card-title {
        font-size: 13px;
    }
    #student_list_page .student-portal-card-list-wrapper .custom-card-title + .custom-card-title {
        font-size: 11px;
    }
    #student_list_page .student-portal-card-list-wrapper {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

#student_list_page .student-portal-card-list-wrapper .student-card-image-wrapper:hover img {
    filter: saturate(1.05);
}

#student_list_page .student-portal-card-list-wrapper .mt-3 {
    margin-top: 0.5rem !important;
}

#student_list_page .student-portal-card-list-wrapper > a > div:not(.student-card-image-wrapper) {
    padding: 0 4px 4px;
}

#student_list_page .student-portal-card-list-wrapper .skeleton,
#student_list_page .student-portal-card-list-wrapper .skeleton::before {
    max-width: 100%;
    box-sizing: border-box;
}

#student_list_page .student-portal-card-list-wrapper .skeleton-card {
    width: 100%;
    max-width: 100%;
}

#student_list_page .student-portal-card-list-wrapper .skeleton-card > div {
    width: 100%;
}

#student_list_page .student-portal-card-list-wrapper .student-card-image-wrapper img {
    border-radius: inherit;
}

#student_list_page .student-portal-card-list-wrapper .rounded-circle {
    display: none;
}

#student_list_page .student-portal-card-list-wrapper > a:hover .custom-card-title {
    color: #0f4f93;
}

@media (hover: none) {
    #student_list_page .hover-overlay {
        bottom: 0;
        opacity: 1;
        background: linear-gradient(180deg, rgba(0, 61, 124, 0.15), rgba(0, 61, 124, 0.9));
    }
    #student_list_page .hover-text {
        font-size: 0.95rem !important;
    }
}
#student_list_page .button-disabled {
    pointer-events: none; /* Disable click */
    background-color: gray; /* Optional: visual cue */
    text-decoration: none; /* Optional: remove underline */
    cursor: default; /* Optional: change cursor */
}

#modalAuthentication .back-arrow {
    color: #003d7c;
    font-size: 1.2rem;
    cursor: pointer;
}

#modalAuthentication .otp-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

#modalAuthentication .otp-input {
    flex-grow: 1;
    aspect-ratio: 2/3;
    min-width: 30px;
    max-width: 55px;
    text-align: center;
    border: 1px solid #E4E4E4 !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    @media screen and (min-width: 576px) {
        font-size: 1.4rem;
    }
}

#modalAuthentication .error {
    border: 2px red solid !important;
}

#modalAuthentication .message-warning {
    color: red;
    font-size: 14px !important;
    margin: 6px 0 !important;
}

#modalAuthentication .otp-timer-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-left: auto;
    margin-right: auto;
}

#modalAuthentication .progress-ring {
    transform: rotate(-90deg);
}

#modalAuthentication .progress-ring__background {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
}

#modalAuthentication .progress-ring__circle {
    fill: none;
    stroke: #003D7C;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

#modalAuthentication .otp-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
}

#modalAuthentication .ui-autocomplete {
    top: 40px !important;
}

#chat-list {
    width: 100%;
    background: #F7F7F7;
    @media screen and (min-width: 780px) {
        width: 320px;
    }
    @media screen and (min-width: 1200px) {
        width: 460px;
    }
}
#chat-window {
    display: none;
    width: 100%;
    flex-direction: column;
    flex-grow: 1;
    @media screen and (min-width: 780px) {
        display: flex;
    }
}
#chat-header {
    width: 100%;
    display: flex;
    gap: 12px;
    height: fit-content;
    padding: 12px;
    border-bottom: 1px solid #D9D9D9;
    @media screen and (min-width: 780px) {
        display: none;
    }
}
#chat-panel {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0 10px 0
}
#chat-panel {
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scrollbar-width: none; /* Firefox */
}
#chat-panel::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
#chat-window textarea {
    padding: 5px;
    font-size: 16px;
    border: none;
    outline: none;
    flex-grow: 1;
    resize: none; /* Prevent manual resizing */
    overflow-y: auto; /* Hide overflow */
    box-sizing: border-box; /* Include padding in width calculation */
    height: 30px; /* Initial height */
    max-height: 150px; /* Maximum height */
    /* Hide scrollbar */
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
}
#chat-window textarea::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}
.chat-contact-card {
    padding: 12px;
    gap: 4px;
    border-radius: 12px;
    cursor: pointer;
}
.chat-contact-card.active {
    background: #C2DBFF;
}
.chat-contact-card:hover:not(.active) {
    background: rgba(194, 219, 255, 0.5);
}

/*
************************ Student Portal ************************
