/* Chat Widget Styles */

/* Animations */
@keyframes systemMessageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes systemMessagePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 199, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 199, 0, 0);
    }
}

/* Regular chat message */
.chat-message {
    margin-bottom: 12px;
    display: flex;
}

.chat-message--from-manager {
    justify-content: flex-start;
}

.chat-message--from-client {
    justify-content: flex-end;
}

/* Chat message bubble */
.chat-message__bubble {
    max-width: 80%;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message--from-manager .chat-message__bubble {
    border-start-start-radius: 4px;
    border-end-end-radius: 12px;
    background: #181818;
    color: var(--gr-text-main, #fff);
}

.chat-message--from-client .chat-message__bubble {
    border-start-start-radius: 12px;
    border-end-end-radius: 4px;
    background: #ececec;
    color: #000;
}

/* Chat message text */
.chat-message__text {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    white-space: pre-wrap;
}

/* Chat message time */
.chat-message__time {
    align-self: flex-end;
    font-size: 10px;
    font-family: var(--title-font);
}

.chat-message--from-manager .chat-message__time {
    color: var(--gr-text-muted, #9ca3af);
}

.chat-message--from-client .chat-message__time {
    color: rgba(0, 0, 0, 0.7);
}

/* System message */
.chat-system-message {
    margin: 24px 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* System message bubble */
.chat-system-message__bubble {
    width: 100%;
    border-radius: 24px;
    border: 1px solid #ffffff1a;
    font-size: 14px;
    background: #ffffff08;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 9px;
    position: relative;
    backdrop-filter: blur(32px);
    align-items: center;
}

/* System message badge */
.chat-system-message__badge {
    color: #ffffff;
    font-size: 12px;
    width: 100%;
    border: 1px solid #ffffff1c;
    font-weight: 500;
    text-align: center;
    padding: 6px 8px;
    border-radius: 16px;
    white-space: nowrap;
    z-index: 10;
}

/* System message icon wrapper */
.chat-system-message__icon {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 199, 0, 0.4) 0%, rgba(255, 128, 54, 0.4) 100%);
    border: 3px solid rgba(255, 199, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(255, 199, 0, 0.4);
}

/* System message text */
.chat-system-message__text {
    flex: 1;
    padding: 0 8px 8px;
    font-weight: 400;
    font-family: var(--title-font);
    color: var(--background-20);
}
