﻿#chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: background-color 0.3s ease;
}

    #chat-button:hover {
        background-color: #0056b3;
    }

    #chat-button svg {
        width: 28px;
        height: 28px;
        fill: white;
    }

#chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    max-width: 90vw;
    height: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 10000;
}

#chat-header {
    background-color: #007bff;
    color: white;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-close {
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    user-select: none;
}

#chat-messages {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    background: #f1f1f1;
    font-family: sans-serif;
    font-size: 14px;
}

.chat-message.user {
    background-color: #d0e7ff;
    color: #004085;
    margin: 6px 0;
    padding: 8px 12px;
    border-radius: 15px 15px 0 15px;
    max-width: 80%;
    align-self: flex-end;
}

.chat-message.bot {
    background-color: #e9ecef;
    color: #212529;
    margin: 6px 0;
    padding: 8px 12px;
    border-radius: 15px 15px 15px 0;
    max-width: 80%;
    align-self: flex-start;
    white-space: pre-line;
}

#chat-input-area {
    padding: 10px 12px;
    border-top: 1px solid #ccc;
    display: flex;
    gap: 8px;
    background: white;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

#chat-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
}

#chat-send {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    #chat-send:hover {
        background-color: #0056b3;
    }

@media (max-width: 480px) {
    #chat-box {
        width: 95vw;
        height: 60vh;
        bottom: 80px;
        right: 2.5vw;
    }
}

/* لینک تماس */
.contact-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}
