.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    max-height: 600px;
}

.chat-widget.open {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #FF6B35 0%, #f05030 100%);
    color: white;
    padding: 15px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 300px;
    max-height: 400px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.user {
    background: #FF6B35;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.chat-message.bot {
    background: #f0f0f0;
    color: #333;
    align-self: flex-start;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

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

.chat-send {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chat-send:hover {
    background: #f05030;
}

.chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35 0%, #f05030 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.chat-loading {
    padding: 10px 15px;
    background: #f0f0f0;
    border-radius: 12px;
    max-width: 80%;
    align-self: flex-start;
    color: #666;
    font-style: italic;
}

@media (max-width: 480px) {
    .chat-widget {
        width: calc(100vw - 20px);
        bottom: 10px;
        right: 10px;
    }
    
    .chat-toggle {
        bottom: 10px;
        right: 10px;
    }
}
