/* AI Chatbot Popup Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #003844; /* Use direct hex code for darker primary */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(65, 201, 235, 0.3); /* Updated shadow to match darker color */
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
}

.chatbot-button img {
    width: 30px;
    height: 30px;
}

.chatbot-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background-color: var(--bg-lighter);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-popup.active {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header-left {
    display: flex;
    align-items: center;
}

.chatbot-header-left img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.chatbot-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
}

.chatbot-close {
    cursor: pointer;
    color: var(--text-lighter);
    font-size: 18px;
    transition: color 0.3s;
}

.chatbot-close:hover {
    color: var(--text-color);
}

.chatbot-messages {
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message-bot {
    align-self: flex-start;
    background-color: var(--bg-light);
    color: var(--text-color);
    border-bottom-left-radius: 5px;
}

.message-user {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-input {
    display: flex;
    align-items: center;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 20px;
    background-color: var(--bg-light);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
}

.chatbot-input input::placeholder {
    color: var(--text-lighter);
}

.chatbot-send {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.chatbot-send:hover {
    background-color: var(--primary-dark);
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .message-bot {
    align-self: flex-start;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 5px;
}

.rtl .message-user {
    align-self: flex-end;
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 5px;
}

.rtl .chatbot-header-left img {
    margin-right: 0;
    margin-left: 10px;
}

.rtl .chatbot-send {
    margin-left: 0;
    margin-right: 10px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-popup {
        width: 300px;
    }
}

/* Help message above the button */
.chatbot-help-message {
    position: absolute;
    bottom: 70px; /* Position above the button */
    right: 0;
    background-color: var(--primary-color); /* Use primary color */
    color: white;
    padding: 8px 15px;
    border-radius: 10px 10px 0 10px; /* Rounded corners, sharp bottom-right */
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap; /* Prevent text wrapping */
    opacity: 0; /* Start hidden */
    transform: translateY(10px); /* Start slightly lower */
    animation: fadeInHelpMessage 0.5s 1s forwards; /* Fade in after 1 second delay */
    z-index: 999; /* Ensure it's below the popup but above other content */
}

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