/* 
 * Telegram Live Chat Widget - Lavender Frosted Glass Style
 */

:root {
    --primary-lavender: rgba(230, 230, 250, 0.85);
    /* Lavender with opacity */
    --accent-purple: #9370DB;
    /* Medium Purple */
    --text-color: #4B0082;
    /* Indigo */
    --glass-border: rgba(255, 255, 255, 0.4);
    --soft-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.chat-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating Action Button */
.chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--primary-lavender);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    font-size: 28px;
    transition: all 0.3s ease;
}

.chat-trigger:hover {
    transform: scale(1.05) rotate(5deg);
    background: rgba(230, 230, 250, 0.95);
}

/* Chat window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    max-height: 80vh;
    background: var(--primary-lavender);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transform-origin: bottom right;
}

@keyframes slideIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

/* Message Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.msg.user {
    align-self: flex-end;
    background: var(--accent-purple);
    color: white;
    border-bottom-right-radius: 2px;
}

.msg.admin {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
    border-bottom-left-radius: 2px;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text-color);
    outline: none;
}

.chat-send {
    background: var(--accent-purple);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
}