/* =============================================================
   Virtual Staff - Chat Conversation UI
   ============================================================= */

.phone-frame {
    width: 100%;
    max-width: 340px;
    background: #13131a;
    border: 10px solid #1a1a24;
    border-radius: 2.5rem;
    padding: 1rem;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.15);
    position: relative;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: #0a0a0f;
    border-radius: var(--radius-full);
}

.phone-screen {
    background: #0a0a0f;
    border-radius: 1.5rem;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
}

.phone-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.agent-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(99, 102, 241, 0.4);
}

.agent-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-info h4 {
    font-size: 0.925rem;
    font-weight: var(--font-weight-semibold);
    color: #fff;
    line-height: 1.2;
}

.agent-info p {
    font-size: 0.75rem;
    color: var(--color-success);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
    margin-top: 2px;
}

.agent-info p::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.chat-messages.blurred {
    filter: blur(2.5px);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.message {
    display: flex;
    animation: messageIn 0.4s ease both;
}

.message.user {
    justify-content: flex-end;
}

.message.agent {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 78%;
    padding: 0.6rem 0.9rem;
    border-radius: 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--gradient-primary);
    color: #fff;
    border-bottom-right-radius: 0.35rem;
}

.message.agent .message-bubble {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-gray-200);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 0.35rem;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.3rem;
    text-align: right;
}

.message.agent .message-time {
    text-align: left;
}

.featured-message {
    padding: 1rem;
    margin: -0.5rem -0.25rem 0;
    position: relative;
    z-index: 1;
}

.featured-message .message-bubble {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #fff;
    max-width: 92%;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
