/* Festival AI Assistant Chatbot Styles */

/* Floating Button */
.festival-ai-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.festival-ai-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

.festival-ai-button svg {
    width: 30px;
    height: 30px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(251, 191, 36, 0.7);
    }
}

/* Chat Window */
.festival-ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 500px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.festival-ai-chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Chat Header */
.festival-ai-chat-header {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.festival-ai-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.festival-ai-chat-header-icon svg {
    width: 24px;
    height: 24px;
}

.festival-ai-chat-header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.festival-ai-chat-header-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.festival-ai-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.festival-ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.festival-ai-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Chat Body */
.festival-ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.festival-ai-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

.festival-ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.festival-ai-message-avatar svg {
    width: 18px;
    height: 18px;
    color: white;
}

.festival-ai-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 80%;
}

.festival-ai-message.user {
    flex-direction: row-reverse;
}

.festival-ai-message.user .festival-ai-message-avatar {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.festival-ai-message.user .festival-ai-message-content {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.festival-ai-message.user .festival-ai-message-text {
    color: white !important;
}

.festival-ai-message-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    color: #1f2937;
    white-space: pre-wrap;
}

.festival-ai-message-text a {
    color: #f59e0b;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    margin-top: 8px;
}

.festival-ai-message-text a:hover {
    color: #d97706;
    transform: translateX(-2px);
}

.festival-ai-message-text strong {
    font-weight: 700;
    color: #111827;
}

.festival-ai-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #25D366;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.festival-ai-whatsapp-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.festival-ai-whatsapp-link svg {
    width: 18px;
    height: 18px;
}

/* Chat Input */
.festival-ai-chat-input {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    align-items: center;
}

.festival-ai-input-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Heebo', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    transition: all 0.2s ease;
    color: #1f2937 !important;
    background: white;
}

.festival-ai-input-field:focus {
    outline: none;
    border-color: #fbbf24;
}

.festival-ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.festival-ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
}

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

.festival-ai-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Typing Indicator */
.festival-ai-typing {
    display: flex;
    gap: 4px;
    padding: 12px;
}

.festival-ai-typing span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.festival-ai-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.festival-ai-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .festival-ai-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .festival-ai-chat-window {
        bottom: 85px;
        right: 20px;
        width: calc(100vw - 40px);
        height: calc(100vh - 130px);
    }
}

