/*MOBILE Features*/
@media screen and (min-width: 768px) {
    .chatopen {
        margin: 20px;
    }
    .chatclosed {
        margin: 20px;
    }
}
@media screen and (max-width: 768px) {
    .chatopen {
        margin: 10px;
    }
    .chatclosed {
        margin: 10px;
    }
}

/*CHATBOT OPEN*/
.chatopen {
    border-radius: 15px;
    border: 2px solid #001677;
    height: 400px;
    width: 300px;
    position: fixed;
    z-index: 3;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: rgb(11, 11, 11);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}
    /*Chat header*/
.chatheader{
    background: linear-gradient(90deg, #001677 0%, #400046 80%);
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    height: 120px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.profilepicture {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    height: 50px;
    width: 50px;
    overflow: hidden;
    position: relative;
    left: 15px;
}
img[alt="Profile picture"] {
    width: 105%;
    height: auto; 
    object-fit: cover;
    position: relative;
    right: 3px;
}
.chatbotname{ 
    position: absolute;
    left: 80px;
    color: white;
}
#chatclosebutton{
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    position: absolute;
    right: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
img[alt="chatclosebutton"] {
    width: 60%;
    height: auto;
    position: relative;
    top: 1px;    
    object-fit: cover;
    transition: all 0.3s ease;
}

#chatclosebutton:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
    /*Chat message window*/
#chatbotmessagewindow {
    background-color: rgb(11, 11, 11);
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    padding: 7px 0 7px;
}
.chatmessages {
    display: flex; 
}
#AImessage  {
    background: #1c1c1c;
    border: 1px solid #434343;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    border-radius: 10px;
    margin: 0px 7px 7px;
    max-width: 220px;
    padding: 5px;
    min-height: 5px;
    float: left;
    clear: left;
}
h5 {
    margin: 0; /*chrome has a standard top margin of 10px? to cancel that out use margin: 0; */
}
.usermessage {
    background: linear-gradient(135deg, #1e7f58 40%, #005a8a 100%);
    border: 1px solid #66eab5;
    border-radius: 10px;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    margin: 0px 7px 7px;
    padding: 5px;
    max-width: 220px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    float: right;
    clear: right;
    }
.upperchatbox {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
}
/*scrollbar*/
#chatbotmessagewindow::-webkit-scrollbar {
    width: 8px; /* Slim scrollbar */
}

#chatbotmessagewindow::-webkit-scrollbar-track {
    background: #1c1c1c; /* Match resume dark theme */
}

#chatbotmessagewindow::-webkit-scrollbar-thumb {
    background: #434343; /* Match resume border color */
    border-radius: 4px; /* Rounded edges for style */
}

#chatbotmessagewindow::-webkit-scrollbar-thumb:hover {
    background: #667eea; /* Match resume blue accent */
}
    /*Chat footer*/
.chatfooter{
    background: linear-gradient(270deg, #001677 0%, #400046 80%);
    border-bottom-left-radius: 13px;
    border-bottom-right-radius: 13px;
    height: 100px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
#chatinput{
    width: 220px;
    height: 30px;
    border-radius: 10px;
    margin-right: 10px;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}
#chatsendbutton{
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
img[alt="chatsendicon"] {
    width: 65%;
    height: auto;
    object-fit: cover;
    transition: all 0.3s ease;
}

#chatsendbutton:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#chatsendbutton:active {
    transform: scale(0.95);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/*CHAT CLOSED*/
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}
.chatclosed{
    z-index: 2;
    position: fixed;
    bottom: 0;
    right: 0;
    height: auto;
    width: auto;
    display: flex;
    animation: fadeIn 0.5s ease;
}
#chatopenbutton{
    background: linear-gradient(90deg, #001677 0%, #400046 80%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #001677;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
#chatopenbutton:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
img[alt="chaticon"] {
    width: 70%;
    height: auto; 
    object-fit: cover;
    position: relative; 
    left: 0.5px;
}



