/* Live Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D65A29 0%, #B84B20 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(214, 90, 41, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(214, 90, 41, 0.6);
}

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

.chat-button.active i {
    transform: rotate(45deg);
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, #D65A29 0%, #B84B20 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-header-info h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.bot .message-bubble {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.chat-message.user .message-bubble {
    background: #D65A29;
    color: white;
}

.message-time {
    font-size: 11px;
    color: var(--bs-text-muted);
    margin-top: 4px;
    align-self: flex-end;
}

.chat-message.bot .message-time {
    align-self: flex-start;
}

.chat-input {
    padding: 16px;
    border-top: 1px solid var(--bs-border-color);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input-field {
    flex: 1;
    border: 1px solid var(--bs-border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.chat-input-field:focus {
    outline: none;
    border-color: #D65A29;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #D65A29;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: #B84B20;
    transform: scale(1.05);
}

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

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--bs-text-muted);
    font-size: 13px;
}

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

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-text-muted);
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

.chat-actions {
    padding: 8px 16px;
    border-top: 1px solid var(--bs-border-color);
    display: none;
    gap: 8px;
}

.chat-actions.show {
    display: flex;
}

.chat-action-btn {
    padding: 6px 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        max-width: 350px;
        max-height: 500px;
    }
}

/* Welcome message animation */
.welcome-message {
    background: linear-gradient(135deg, #D65A29 0%, #B84B20 100%);
    color: white;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}