/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: 'Cairo', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF8C00, #CC6F00);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

.chatbot-toggle i {
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active i {
    transform: rotate(45deg);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 90vw;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #FF8C00, #CC6F00);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.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;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

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

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

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

.message-bubble.user {
    background: #FF8C00;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-bubble.bot {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.chatbot-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input:focus {
    border-color: #FF8C00;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FF8C00;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.chatbot-send:hover {
    background: #CC6F00;
}

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

.language-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.language-selector option {
    background: white;
    color: #333;
}

.property-suggestion {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-suggestion:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.property-suggestion h4 {
    margin: 0 0 8px 0;
    color: #007bff;
    font-size: 14px;
}

.property-suggestion p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Suggestions container */
.suggestions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 0;
}

.suggestion-button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.suggestion-button:hover {
    background: #FF8C00;
    color: white;
    border-color: #FF8C00;
    transform: translateY(-1px);
}

.suggestion-button.more-button {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.suggestion-button.more-button:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* RTL support for suggestions */
[dir="rtl"] .suggestions-container {
    direction: rtl;
}

[dir="rtl"] .suggestion-button {
    text-align: right;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

/* RTL Support - Keep chatbot on left side even in RTL */
[dir="rtl"] .chatbot-container {
    left: 20px;
    right: auto;
}

[dir="rtl"] .chatbot-window {
    left: 0;
    right: auto;
}

[dir="rtl"] .message-bubble.user {
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 18px;
}

[dir="rtl"] .message-bubble.bot {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 18px;
}

[dir="rtl"] .message-time {
    text-align: left;
}

[dir="rtl"] .language-selector {
    right: auto;
    left: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 15px;
        left: 15px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        max-width: 500px;
        height: 80vh;
        max-height: 500px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-toggle i {
        font-size: 20px;
    }
}

[dir="rtl"] .chatbot-container {
    left: 15px;
    right: auto;
}

/* Action Buttons Styles */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 0;
    justify-content: center;
}

.action-button {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-button.primary {
    background: linear-gradient(135deg, #FF8C00, #CC6F00);
    color: white;
}

.action-button.primary:hover {
    background: linear-gradient(135deg, #CC6F00, #A85F00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.action-button.secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.action-button.secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.action-button.outline {
    background: transparent;
    color: #FF8C00;
    border: 2px solid #FF8C00;
}

.action-button.outline:hover {
    background: #FF8C00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.action-button.success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.action-button.success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.action-button.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.action-button.warning:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.action-button.danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.action-button.danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* RTL Support for Action Buttons */
[dir="rtl"] .action-buttons-container {
    direction: rtl;
}

[dir="rtl"] .action-button {
    text-align: center;
}

/* Mobile Responsive for Action Buttons */
@media (max-width: 768px) {
    .action-buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .action-button {
        width: 100%;
        max-width: 200px;
        margin: 5px 0;
    }
}