/* chatbot.css */
* {
    box-sizing: border-box;
}
.container {
    max-width: 500px;
    margin: 60px auto;
}

/* Chat body */

.chat-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - 5rem);
}

.chat-container .chatPage{
    position: relative;
    display: block;
    background-color: #000;
    border-radius: 1rem;
    width: 27rem;
    height: 90%;
    right: 0;
    top: 0;
    outline: .2rem solid #333333;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
}

.chatPage .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem !important;
    padding: 0 1rem;
    background-color: #333333;    
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.chatPage .title .wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .1rem;
}

.chatPage .title img {
    width: 2rem;
    height: 2rem;
    border-radius: .3rem;
}

.chatPage .title h4 {
    margin: 0;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
}

.chatPage .title .btns {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chatPage .title .hide-btn {
    display: none;
}

.chatPage .title i {
    color: #fff;
    font-weight: bold;
    font-size: 1.4rem;
    cursor: pointer;
    margin-right: .4rem;
    transition: all .1s;
}

.chatPage .title i:hover {
    transform: scale(1.05);
}

.chatPage .main {
    height: 80% !important; 
    background-color: #f3f3f3;
    overflow-y: auto;
}

.chatPage .main .message {   
    position: relative;     
    color: #000;
    font-size: 1rem;
    margin: .5rem 0;    
    width: 85%;
    display: flex;
    flex-direction: column;
    line-height: 1.5rem;
}

.chatPage .main .message.user {
    float: right;       
}

.chatPage .main .message.user span {
    background-color: #ffffff;
    padding: 1rem;
    align-self: flex-end;
    border-top-left-radius: .5rem;
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
    max-width: 90%;
    margin: 0 1rem;
}

.chatPage .main .message.bot {   
    float: left;       
}

.chatPage .main .message.bot span {
    background-color: #b4d2f1;
    padding: 1rem;
    align-self: flex-start;
    border-top-right-radius: .5rem;
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem; 
    margin: 0 1rem;
}

.chat .main .message .rating {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    bottom: 0.5rem;
    right: -2rem;
  }

.chatPage .input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 11% !important;
    background-color: #ffffff;
    border-top: .15rem solid rgba(135, 138, 136, .3);
}

.chatPage .input input {
    margin: 0;
    font-size: 1rem;
    border: none;   
    padding: 1rem; 
}

.chatPage .input input:focus {
    outline: none;
}

.chatPage .input i {
    padding: 1rem;
    border-radius: 50%;
    transition: .25s;
    cursor: pointer;
    margin: 0 .4rem 0 .2rem;
}

.chatPage .input i:hover {
    transform: scale(1.05);
    background-color: #00000016;
}

/* Typing text */
.typing-text {
    position: absolute;
    left: 3rem;
    top: 8rem;
    width: 31ch;
    animation: typing 2s steps(31), blink .5s step-end infinite alternate;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid;
    font-family: monospace;
    font-size: 2em;
}

.typing-sub {
    position: absolute;
    left: 5rem;
    top: 12rem;
    width: 12ch;
    animation: opacity 3s;
    white-space: nowrap;
    opacity: 1;
    overflow: hidden;
    font-family: monospace;
    font-size: 1.8em;
}

.typing-sub.ts1{
    top: 17rem;
}

.typing-sub.ts2{
    top: 22rem;
}

@keyframes opacity {
    from {
    opacity: 0;
    }
}

@keyframes typing {
    from {
    width: 0;
    }
}
    
@keyframes blink {
    50% {
    border-color: transparent;
    }
}


@media screen and (max-width: 550px){
    .chatPage {
    position: relative !important;
    width: 95% !important; 
    height: 80vh !important;
    height: calc(var(--vh, 1vh) * 100);
    top: 0 !important;
    right: 0;     
    border-radius: 0rem; 
    }

    .chatPage .title {
    height: 9%;      
    }

    .chatPage .title .wrapper {
    margin-bottom: 0;
    }

    .chatPage .title img {
    width: 3rem;
    height: 3rem;
    border-radius: .5rem;
    }

    .chatPage .title h4 {
    font-size: 1.4rem;
    margin-top: .2rem;
    }

    .chatPage .title .btns {
    margin-top: .2rem;
    }

    .chatPage .title .hide-btn {
    display: block;
    }

    .chatPage .main {
    height: 82%;
    }

    .chatPage .input {
    height: 9%; 
    border-width: .1rem
    }
}

@media screen and (max-width: 400px){
    .chatPage .main {
    height: 77% !important;
    }

    .chatPage .input {
    height: 13% !important; 
    }
}

