﻿/* Chat Support Styles */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    direction: rtl;
    overflow: hidden;
}

.chat-header {
    background: #075e54;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background: #e5ddd5;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-input-container {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 0 0 10px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 60px;
}

#message-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    direction: rtl;
}

.send-button {
    background: #128c7e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

    .send-button:hover {
        background: #075e54;
    }

.message {
    margin: 8px 0;
    max-width: 80%;
    clear: both;
    overflow-wrap: break-word;
    word-break: break-word;
    display: block;
}

    .message.user {
        margin-right: auto;
    }

    .message.assistant {
        margin-left: auto;
    }

    .message .text {
        padding: 8px 12px;
        border-radius: 10px;
        display: inline-block;
        word-wrap: break-word;
        max-width: 100%;
    }

    .message.user .text {
        background: #dcf8c6;
        margin-left: 10px;
    }

    .message.assistant .text {
        background: white;
        margin-right: 10px;
    }

.typing-indicator {
    padding: 8px 12px;
    display: inline-block;
    background: white;
    border-radius: 10px;
}

.dots {
    display: flex;
    gap: 4px;
}

    .dots span {
        width: 8px;
        height: 8px;
        background: #888;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out;
    }

        .dots span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .dots span:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }
}

/* Support chat toggle button styles */
#support-chat-toggle {
    margin-left: 10px;
}

.toggle-container {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* Image popup styles */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }

    #message-input {
        min-height: 40px;
        font-size: 16px; /* Prevent zoom on mobile */
    }

    .send-button {
        min-width: 45px;
        min-height: 45px;
        flex-shrink: 0; /* Prevent button from shrinking */
    }
}
