/* Thiqa Travel Chatbot Styles */

:root {
    --primary-color: #1F4EAD;
    --secondary-color: #FFFFFF;
    --text-color: #1B2232;
    --border-color: #DCDFE5;
    --accent-orange: #FF9500;
    --light-bg: #F5F7FA;
}

/* Chatbot Container */
#thiqa-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
}

/* Floating Chat Button */
.thiqa-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(31, 78, 173, 0.3);
    transition: all 0.3s ease;
}

.thiqa-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(31, 78, 173, 0.4);
}

.thiqa-chatbot-toggle.active {
    display: none;
}

/* Chat Window */
.thiqa-chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.thiqa-chatbot-window.active {
    display: flex;
}

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

/* Chat Header */
.thiqa-chatbot-header {
    background-color: var(--primary-color);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.thiqa-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.thiqa-chatbot-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.thiqa-chatbot-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thiqa-chatbot-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.thiqa-chatbot-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.thiqa-chatbot-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.thiqa-chatbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.thiqa-chatbot-close:hover {
    opacity: 0.8;
}

/* Chat Messages Area */
.thiqa-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thiqa-chatbot-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

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

.thiqa-chatbot-message.bot {
    justify-content: flex-start;
}

.thiqa-chatbot-message.user {
    justify-content: flex-end;
}

.thiqa-chatbot-message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

.thiqa-chatbot-message.bot .thiqa-chatbot-message-bubble {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.thiqa-chatbot-message.user .thiqa-chatbot-message-bubble {
    background-color: var(--primary-color);
    color: white;
}

/* Service Buttons */
.thiqa-chatbot-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.thiqa-chatbot-service-btn {
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}

.thiqa-chatbot-service-btn:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--text-color); /* Ensure text color stays the same on hover */
}

.thiqa-chatbot-service-btn:active {
    transform: scale(0.98);
}

/* Input Area */
.thiqa-chatbot-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    background-color: white;
}

.thiqa-chatbot-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

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

.thiqa-chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-orange);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.thiqa-chatbot-send-btn:hover {
    background-color: #FF8C00;
    transform: scale(1.05);
}

.thiqa-chatbot-send-btn:active {
    transform: scale(0.95);
}

/* WhatsApp Button */
.thiqa-chatbot-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.thiqa-chatbot-whatsapp-btn:hover {
    background-color: #20BA5A;
    text-decoration: none;
    color: white;
}

/* Scrollbar Styling */
.thiqa-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.thiqa-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.thiqa-chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.thiqa-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 480px) {
    .thiqa-chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
    }

    .thiqa-chatbot-services {
        grid-template-columns: 1fr;
    }

    .thiqa-chatbot-message-bubble {
        max-width: 90%;
    }
}

/* Print Styles */
@media print {
    #thiqa-chatbot-widget {
        display: none;
    }
}
