/* ===============================
GLOBAL
=============================== */

* {
    box-sizing: border-box;
}

body {
    height: 100vh;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 15% 10%, #f3f1ff 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, #ece9ff 0%, transparent 40%),
        #f8f8fb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===============================
CHAT WRAPPER
=============================== */
.btn-primary{
    background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
}

.chat-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {

    flex: 1;
    display: flex;
    justify-content: center;
}

.hero {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ===============================
CHAT AREA
=============================== */

#messages {
    flex: 1;
    overflow-y: auto;
    max-width: 760px;
    margin: 0 9%;
    padding: 20px 20px 140px;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#messages::-webkit-scrollbar {
    display: none;
}

/* ===============================
SCROLLBAR
=============================== */

/* #messages::-webkit-scrollbar {
    width: 6px;
}

#messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .35);
    border-radius: 10px;
}

#messages::-webkit-scrollbar-track {
    background: transparent;
} */


/* Hide scrollbar but keep scroll working */

#messages {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#messages::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}


/* ===============================
MESSAGE ANIMATION
=============================== */

@keyframes messageFade {

    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
BOT MESSAGE
=============================== */

.msg-bot {
    background: white;
    padding: 16px 20px;
    border-radius: 18px 18px 18px 6px;
    max-width: 620px;
    font-size: 14px;
    line-height: 1.55;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, .08);
    animation: messageFade .35s ease;
    margin-bottom: 10px;
}

/* ===============================
USER MESSAGE
=============================== */

.msg-user {

    background: linear-gradient(135deg, #6366F1, #4F46E5);

    color: white;

    padding: 14px 20px;

    border-radius: 18px 18px 6px 18px;

    max-width: 620px;

    font-size: 16px;

    box-shadow:
        0 10px 28px rgba(79, 70, 229, .35);

    animation: messageFade .25s ease;

    margin-bottom: 16px;

}



/* ===============================
INPUT CONTAINER
=============================== */

.chat-input {

    position: relative;

    bottom: 32px;

    left: 50%;

    transform: translateX(-50%);

    width: 100%;
    max-width: 760px;

    padding: 0 20px;

}



/* ===============================
INPUT BAR
=============================== */

.chat-input .input-group {

    display: flex;

    align-items: center;

    background: rgba(255, 255, 255, .9);

    backdrop-filter: blur(10px);

    border-radius: 40px;

    padding: 8px;

    border: 1px solid rgba(0, 0, 0, .05);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, .15);

    transition: .25s;

}


.chat-input .input-group:focus-within {

    box-shadow:
        0 25px 50px rgba(79, 70, 229, .35);

}



/* ===============================
INPUT FIELD
=============================== */

.chat-message-input {

    flex: 1;

    border: none !important;

    background: transparent !important;

    height: 45px;

    font-size: 17px;

    padding-left: 20px;

    outline: none;

    box-shadow: none !important;

}


.chat-message-input::placeholder {

    color: #9ca3af;

}



/* ===============================
SEND BUTTON (PREMIUM)
=============================== */

.sendMessage_btn {

    width: 50px;
    height: 45px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;

    background: linear-gradient(135deg, #6366F1, #4F46E5);

    transition: all .25s ease;

    box-shadow: 0 8px 22px rgba(79, 70, 229, .35);

}

.sendMessage_btn:hover {

    transform: scale(1.12);

    box-shadow: 0 16px 32px rgba(79, 70, 229, .45);

}

.sendMessage_btn:active {

    transform: scale(.96);

}

.sendMessage_btn svg {

    width: 26px;
    height: 26px;

}



/* ===============================
SUGGESTION BUTTONS
=============================== */

.suggestion-btn {

    border-radius: 24px;

    padding: 8px 16px;

    font-size: 13px;

    background: white;

    border: 1px solid #e5e7eb;

    transition: .2s;

}


.suggestion-btn:hover {

    background: #eef2ff;
    color: #4F46E5;

    border-color: #6366F1;

    transform: translateY(-2px);

}


.suggestion-btn.active {

    background: #6366F1;

    color: white;

    border-color: #6366F1;

}



/* ===============================
TYPING
=============================== */

.typing {
    display: flex;
    gap: 4px;
}

.typing span {

    width: 6px;
    height: 6px;

    background: #999;

    border-radius: 50%;

    animation: blink 1.4s infinite;

}

.typing span:nth-child(2) {
    animation-delay: .2s;
}

.typing span:nth-child(3) {
    animation-delay: .4s;
}


@keyframes blink {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

}

/* ===============================
TABLET
=============================== */


@media(max-width:680) {
    .chat-input .input-group {
        padding: 0px 2px !important;
    }
}

@media(max-width:1024px) {
    #messages {
        max-width: 700px;
    }
    .chat-input .input-group {
        padding: 5px 6px !important;
    }
}

@media(max-width:680) {
    .chat-input .input-group {
        padding: 4px 4px !important;
    }
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 35px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
    font-family: Arial, sans-serif;
    width: 80%;
    margin: auto;
    border-radius: 20px;
}

/* Left section */
.left-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    font-size: 20px;
    cursor: pointer;
}

.avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}
.user-info{
    padding-left: 10px;
}

.user-info .name {
    font-weight: 500;
    font-size: 18px;
}

.user-info .status {
    font-size: 14px;
    color: green;
    text-align: left;
}

/* Right section */
.right-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon {
    font-size: 25px;
    cursor: pointer;
}

.clear-chat .icon{
    font-size: 20px;
    cursor: pointer;
    color: white;
}

/* Clear chat button */
.clear-chat {
    background: #ff3f3f;
    border: none;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.clear-chat:hover {
    background: #ca0202;
}

/* ===============================
MOBILE
=============================== */

@media(max-width:768px) {
.chat-header{
    width: 100%;
    padding: 10px 10px;
}
.avatar {
    width: 50px;
    height: 50px;
}
.chat-wrapper {
    padding: 0%;
    width: 100% !important;
}
.user-info {
    padding-left: 4px;
}
.user-info .name {
    font-weight: 500;
    font-size: 16px;
}
.user-info .status {
    font-size: 13px;
}
.clear-chat {
    padding: 6px 10px;
    font-size: 14px;
}
.clear-chat .icon {
    font-size: 18px;
}
    #messages {
        padding: 6px 0px 120px;
        max-width: 100%;
        margin: 0 auto;
    }

    .msg-user,
    .msg-bot {
        font-size: 15px !important;
        max-width: 90%;
        padding: 10px 20px;
        margin-bottom: 6px !important;
    }
    .suggestion-btn{
            font-size: 14px !important;
    }
    .chat-input {
        bottom: 16px;
        position: fixed;
        padding: 0 12px;
    }
    .hero p {
        font-size: 15px !important;
    }
    .chat-message-input {
        font-size: 15px;
        height: 45px !important;
        border-bottom-left-radius: 20px;
        border-top-left-radius: 20px;
    }
    .sendMessage_btn{
         height: 45px !important;    
    }
  
    .sendMessage_btn svg {
    width: 25px;
    height: 25px;
}
}

/* ===============================
SMALL MOBILE
=============================== */

@media(max-width:480px) {

    .chat-input {
        bottom: 12px;
        position: fixed;
    }

    .msg-user,
    .msg-bot {
        padding: 10px 20px;
        font-size: 15px !important;
    }

}

@media(min-width:1200px) {

    #messages {
        max-width: 100%;
    }

    .chat-input {
        max-width: 85%;
    }

}