
@font-face {
    font-family: 'YekanBakhMedium';
    src: url('YekanBakhMedium.ttf') format('woff2');
}
body {
    font-family: 'YekanBakhMedium', sans-serif;
}

.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ae00ff;
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
}
.chat-button:hover {
    background-color: #ae00ffb2;
    transform: scale(1.1);
}

.chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.chat-header {
    background-color: #ae00ff;
    color: white;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    position: relative;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-footer {
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    width: 100%;
}

.send-button {
    margin-top: 10px;
    width: 100%;
    background-color: #ae00ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.spinner-container {
    display: none;
    position: absolute;
}
.htmx-request .spinner-container {
    display: inline-block;
}
.htmx-request .button-text {
    visibility: hidden;
}
.htmx-request .send-button {
    cursor: not-allowed;
    opacity: 0.8;
}
.htmx-request .chat-input {
    pointer-events: none;
    opacity: 0.7;
}

.close-button {
    position: absolute;
    left: 15px;
    top: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 5px;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-message.user {
    background-color: #ae00ff;
    color: white;
    border-bottom-right-radius: 0;
    align-self: flex-start;
    text-align: right;
}
.chat-message.bot {
    background-color: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 0;
    align-self: flex-end;
    text-align: right;
}

.typing-indicator {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 5px;
    line-height: 1.5;
    word-wrap: break-word;
    background-color: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 0;
    align-self: flex-end;
    text-align: right;
}

/* استایل برای نمایش موبایل */
@media (max-width: 768px) {
    .chat-box.mobile-fullscreen {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        z-index: 1001;
    }
    
    .chat-button.mobile-hidden {
        display: none;
    }
}
