/*]]]]]]]]]]-----CHAT BOT CSS-------[[[[[[[[[[[*/

/* Chat Bar */
.chat-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 500px;
    height: 70px;
    background: rgba(37, 37, 37, 0.424);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(49, 40, 40, 0.3);
    border-radius: 35px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bar.expanded {
    max-width: 800px;
    height: 600px;
    align-items: flex-end;
    border-radius: 25px;
    bottom: 20px;
    padding: 0;
}

.chat-bar-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-bar.expanded .chat-bar-content {
    display: none;
}

.chat-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-icon svg {
    width: 22px;
    height: 22px;
    fill: #252525;
}

.chat-bar-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid rgba(159, 139, 231, 0.3);
    border-radius: 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    outline: none;
    background: rgba(26, 26, 26, 0.7);
    color: #ffffff;
    transition: all 0.3s ease;
}

.chat-bar-input:focus {
    border-color: #1b2a2f;
    background: rgba(26, 26, 26, 0.9);
}

.chat-bar-input::placeholder {
    color: #888;
}

.chat-bar-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #1a292f;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-bar-btn:hover {
    background: #22343b;
    transform: scale(1.05);
}

.chat-bar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-bar-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Expanded Chat Box */
.chat-box {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: rgba(37, 37, 37, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    overflow: hidden;
    animation: slideUpChat 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bar.expanded .chat-box {
    display: flex;
}

@keyframes slideUpChat {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

/* Chat Header */
.chat-header {
    background: rgb(26 41 47);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgb(74 86 90);
}

.chat-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
}

.close-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(159, 139, 231, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(159, 139, 231, 0.4);
    transform: rotate(90deg);
}

.close-btn svg {
    width: 20px;
    height: 20px;
    fill: #ebebeb;
}

/* Messages Area */
.messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #111517e6;
}

.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.3);
}

.messages::-webkit-scrollbar-thumb {
    background: #353d42;
    border-radius: 4px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 16px;
}

.message.user .message-avatar {
    background: #fff;
    color: #252525;
}

.message.bot .message-avatar {
    background: transparent;
    overflow: hidden;
}

.message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
}

.message.user .message-content {
    background: #1b2a2f;
    color: #f1f1f1;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: rgba(58, 58, 58, 0.8);
    color: #ebebeb;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    display: none;
    padding: 14px 18px;
    background: rgba(58, 58, 58, 0.8);
    border-radius: 16px;
    width: fit-content;
}

.typing-indicator.active {
    display: block;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1b2a2f;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* Input Area */
.chat-input-area {
    padding: 20px 30px;
    background: rgb(18 22 24 / 88%);
    border-top: 2px solid rgb(28 34 36);
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgb(255 255 255 / 30%);
    border-radius: 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    outline: none;
    background: rgba(37, 37, 37, 0.7);
    color: #ebebeb;
    transition: all 0.3s ease;
}

.chat-input-area input:focus {
    border-color: #1b2a2f;
    background: rgba(37, 37, 37, 0.9);
}

.chat-input-area input::placeholder {
    color: #666;
}

.error-message {
    background: rgba(255, 68, 68, 0.9);
    color: white;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    margin: 0 30px 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-bar {
        width: calc(100% - 30px);
        max-width: none;
        padding: 0 20px;
    }

    .chat-bar.expanded {
        height: calc(100vh - 40px);
        border-radius: 20px;
    }

    .messages {
        padding: 20px;
    }

    .chat-input-area {
        padding: 15px 20px;
    }

    .message-content {
        max-width: 85%;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .chat-bar {
        width: calc(100% - 20px);
        height: 65px;
        padding: 0 15px;
        border-radius: 32px;
    }

    .chat-bar.expanded {
        border-radius: 16px;
    }

    .chat-bar-input {
        font-size: 14px;
    }

    .chat-header h2 {
        font-size: 20px;
    }
}

/*[[[[[[[[[[----CHAT BOT CSS ENDS------]]]]]]]]*/