/* Chat Widget Container */
.ayesha-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Chat Toggle Button */
.ayesha-chat-toggle {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.ayesha-chat-toggle:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Chat Container */
.ayesha-chat-container {
    width: 380px;
    height: 600px;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ayesha-chat-container.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Chat Header */
.ayesha-chat-header {
    background-color: #007bff;
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ayesha-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

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

/* Message Bubbles */
.ayesha-message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    margin-bottom: 5px;
}

.ayesha-message-timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.ayesha-user-message {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 5px;
}

.ayesha-bot-message {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 5px;
}

.ayesha-user-message .ayesha-message-timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.ayesha-bot-message .ayesha-message-timestamp {
    color: #666;
}

/* Quick Replies */
.ayesha-quick-replies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.ayesha-quick-reply {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.ayesha-quick-reply:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
}

/* Chat Input */
.ayesha-chat-input-container {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#ayesha-message-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#ayesha-message-input:focus {
    border-color: #007bff;
}

#ayesha-send-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

#ayesha-send-button:hover {
    background-color: #0056b3;
}

/* Typing Indicator */
.ayesha-typing-indicator {
    display: none;
    align-self: flex-start;
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
}

.ayesha-typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #888;
    margin: 0 2px;
    animation: typing 1.4s infinite both;
}

.ayesha-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ayesha-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .ayesha-chat-container {
        width: 90vw;
        height: 80vh;
        max-width: 100%;
        max-height: 100%;
        border-radius: 15px 15px 0 0;
        bottom: 0;
        right: 0;
    }
    
    .ayesha-quick-replies {
        grid-template-columns: 1fr;
    }
}
