/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.chat-button i {
    font-size: 24px;
}

.chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.chat-header {
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.message {
    max-width: 80%;
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
    animation: messageAppear 0.3s ease;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

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

.chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
    background-color: white;
    color: #333;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.send-button {
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.send-button:hover:not(:disabled) {
    background-color: var(--secondary-color, #0056b3);
}

.send-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.send-button i {
    font-size: 16px;
}

@media (max-width: 480px) {
    .chat-container {
        width: 300px;
        height: 400px;
        bottom: 70px;
    }
    
    .chat-button {
        width: 50px;
        height: 50px;
    }
}

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

.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    margin-bottom: 15px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #888;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: bounce 1.3s linear infinite;
}

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
    margin-right: 0;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

.system-message {
    align-self: center;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 10px;
    font-size: 13px;
    font-style: italic;
    max-width: 90%;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

.system-message a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
}

.system-message a:hover {
    color: var(--secondary-color, #0056b3);
}