/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Space Grotesk', sans-serif;
}

/* Toggle Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    background: #e30022;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(227, 0, 34, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
    z-index: 10000;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(227, 0, 34, 0.6);
}

.chat-toggle-btn i {
    color: white;
    font-size: 24px;
    transition: transform 0.3s;
}

.chat-toggle-btn.toggled i {
    transform: rotate(135deg);
}

/* Chat Box */
.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-box.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.chat-header {
    background: rgba(227, 0, 34, 0.1);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

.chat-header-info span {
    font-size: 12px;
    color: #00ff88;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-header-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff88;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: #e30022;
    color: white;
    border-bottom-right-radius: 2px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.typing {
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 10px;
}

.typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: 0.3s;
}

.chat-input:focus {
    border-color: #e30022;
    background: rgba(255, 255, 255, 0.1);
}

.chat-send-btn {
    background: #e30022;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-send-btn:hover {
    background: #fff;
    color: #e30022;
}