/* Bella Chat Interface Styles */

/* --- Chat Container --- */
.bella-chat-container {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 400px; height: 520px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.92), rgba(40, 20, 50, 0.92));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 157, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.bella-chat-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* --- Chat Header --- */
.bella-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid rgba(255, 107, 157, 0.15);
    flex-shrink: 0;
}

.bella-chat-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.bella-chat-info {
    flex: 1;
}

.bella-chat-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.bella-chat-status {
    font-size: 11px;
    color: #4ECDC4;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bella-chat-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ECDC4;
    animation: status-pulse 2s ease infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.bella-header-actions {
    display: flex;
    gap: 8px;
}

.bella-header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #aaa;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bella-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* --- Messages --- */
.bella-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(10, 10, 20, 0.3);
}

.bella-messages::-webkit-scrollbar {
    width: 4px;
}

.bella-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 157, 0.3);
    border-radius: 4px;
}

.bella-message {
    display: flex;
    gap: 10px;
    animation: msgIn 0.3s ease;
}

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

.bella-message.user {
    flex-direction: row-reverse;
}

.bella-msg-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bella-message.assistant .bella-msg-avatar {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
}

.bella-message.user .bella-msg-avatar {
    background: linear-gradient(135deg, #4ECDC4, #44a08d);
}

.bella-msg-content {
    max-width: 75%;
}

.bella-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.bella-message.assistant .bella-msg-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: #e8e8e8;
    border-bottom-left-radius: 4px;
}

.bella-message.user .bella-msg-bubble {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(68, 160, 141, 0.25));
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bella-msg-time {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
    padding: 0 4px;
}

.bella-message.user .bella-msg-time {
    text-align: right;
}

/* --- Welcome message --- */
.bella-welcome {
    text-align: center;
    padding: 20px;
}

.bella-welcome-text {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
}

/* --- Typing Indicator --- */
.bella-typing {
    display: flex;
    gap: 10px;
    padding: 0 16px 8px;
}

.bella-typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.bella-typing-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #FF6B9D;
    animation: typingBounce 1.4s ease infinite;
}

.bella-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.bella-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* --- Input Area --- */
.bella-input-area {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 107, 157, 0.1);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: rgba(10, 10, 25, 0.5);
}

.bella-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.bella-input::placeholder {
    color: #666;
}

.bella-input:focus {
    border-color: rgba(255, 107, 157, 0.4);
}

.bella-send-btn {
    width: 40px; height: 40px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bella-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(255, 107, 157, 0.4);
}

.bella-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .bella-chat-container {
        width: calc(100% - 20px);
        height: 60vh;
        bottom: 10px; right: 10px;
    }
}
