/* ========================================================
   COG 4: SWAGA AI LIVE CHAT
   ======================================================== */
.swaga-right-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

.swaga-chat-header {
    flex: 0 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(22, 15, 13, 0.75);
    flex-wrap: wrap;
    gap: 6px;
}

.swaga-model-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: rgba(206, 160, 90, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(206, 160, 90, 0.35);
}

.swaga-messages-container {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.swaga-msg-bubble {
    max-width: 90%;
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 0.90rem;
    line-height: 1.55;
    position: relative;
    word-break: break-word;
}

.swaga-msg-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(178, 107, 47, 0.28), rgba(148, 54, 54, 0.2));
    border: 1px solid rgba(206, 160, 90, 0.4);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.swaga-msg-bubble.assistant {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.msg-role-label {
    font-size: 0.70rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.swaga-msg-bubble.assistant .msg-role-label { color: var(--cyan); }

.msg-del-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.74rem;
}
.swaga-msg-bubble:hover .msg-del-btn { opacity: 0.8; }
.msg-del-btn:hover { color: var(--danger); opacity: 1; }

/* TYPING INDICATOR */
.swaga-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: fit-content;
    align-self: flex-start;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* SWAGA INPUT BAR */
.swaga-input-outer {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: rgba(22, 15, 13, 0.85);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.swaga-input-bar-aligned {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 8px;
    gap: 6px;
    transition: all 0.18s ease;
}

.swaga-input-bar-aligned:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.swaga-aligned-input {
    flex: 1 1 auto;
    background: transparent !important;
    border: none !important;
    padding: 6px 10px !important;
    font-size: 0.88rem !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.swaga-send-icon-btn {
    background: linear-gradient(135deg, #CEA05A, #B26B2F);
    color: #ffffff;
    border-radius: var(--radius-pill);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.90rem;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.swaga-send-icon-btn:hover {
    transform: scale(1.08);
}
