/* ============================================
   Chat Widget - Mobile Only
   ============================================ */

/* Hide on desktop by default */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none; /* Hidden by default */
}

/* Show only on mobile (max-width: 768px) */
@media (max-width: 768px) {
    #chat-widget {
        display: block;
    }
}

/* Chat Toggle Button */
.chat-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
}

.chat-toggle-btn i {
    width: 28px;
    height: 28px;
    color: white;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #22c55e;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    height: 480px;
    background: #0f172a;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.chat-window.open {
    transform: scale(1);
}

/* Chat Header */
.chat-header {
    padding: 15px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: white;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user {
    background: #f97316;
    color: white;
    align-self: flex-end;
    border-radius: 15px 15px 0 15px;
}

.message.bot {
    background: #1e293b;
    color: #e2e8f0;
    align-self: flex-start;
    border-radius: 15px 15px 15px 0;
}

.message.bot a {
    color: #f97316;
    text-decoration: none;
}

.message.bot a:hover {
    text-decoration: underline;
}

/* Quick Replies */
.quick-replies {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #334155;
}

.quick-reply {
    padding: 6px 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    font-size: 11px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply:hover {
    background: #f97316;
    border-color: #f97316;
}

/* Chat Input Area */
.chat-input-area {
    padding: 10px;
    display: flex;
    gap: 8px;
    border-top: 1px solid #334155;
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 25px;
    color: white;
    outline: none;
    font-size: 14px;
}

.chat-input-area input::placeholder {
    color: #64748b;
}

.chat-input-area input:focus {
    border-color: #f97316;
}

.chat-input-area button {
    padding: 10px 16px;
    background: #f97316;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

/* Lead Form */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.lead-form input {
    padding: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 13px;
}

.lead-form input::placeholder {
    color: #64748b;
}

.lead-form button {
    padding: 10px;
    background: #f97316;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 10px;
}