/* ========================================
   Conversation — Page Styles
   ======================================== */

/* Hero: chat bubbles */
.conv-hero-anim {
    display: flex; flex-direction: column; gap: 12px;
    padding: 20px 24px; width: 100%; max-width: 420px;
}

.conv-bubble { display: flex; align-items: flex-end; gap: 8px; opacity: 0; }
.conv-left { justify-content: flex-start; }
.conv-right { justify-content: flex-end; }

.conv-b1 { animation: convFadeUp 0.4s 0.3s ease both; }
.conv-b2 { animation: convFadeUp 0.4s 0.9s ease both; }
.conv-b3 { animation: convFadeUp 0.4s 1.4s ease both; }

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

.conv-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; color: #fff; flex-shrink: 0;
}

.conv-av-blue { background: linear-gradient(135deg, #639BF1, #4F7BF7); }
.conv-av-gold { background: linear-gradient(135deg, #d4af7a, #c9a06e); }

.conv-msg {
    padding: 10px 14px; border-radius: 12px;
    font-size: 0.72rem; line-height: 1.5; max-width: 210px;
}

.conv-left .conv-msg { background: #f1f5f9; color: #334155; border-bottom-left-radius: 4px; }
.conv-right .conv-msg { background: #38bdf8; color: #fff; border-bottom-right-radius: 4px; }

.conv-typing {
    padding: 12px 18px; background: #f1f5f9;
    border-radius: 12px; border-bottom-left-radius: 4px;
    display: flex; gap: 4px; align-items: center;
}

.conv-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
    animation: convDot 1.2s ease-in-out infinite;
}

.conv-typing span:nth-child(2) { animation-delay: 0.15s; }
.conv-typing span:nth-child(3) { animation-delay: 0.3s; }

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

/* ========================================
   Rich Text Editor Animation
   ======================================== */
.conv-editor-anim {
    padding: 20px; width: 100%; max-width: 360px;
}

.conv-ea-toolbar {
    display: flex; gap: 6px; padding: 10px 12px;
    background: #fff; border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0; border-bottom: none;
}

.conv-ea-btn {
    width: 30px; height: 30px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: #64748b;
    background: #f8fafc; transition: all 0.3s ease;
}

.conv-ea-active {
    background: rgba(56,189,248,0.1); color: #38bdf8;
    animation: convToolPulse 2s ease-in-out infinite;
}

@keyframes convToolPulse {
    0%, 100% { background: rgba(56,189,248,0.1); }
    50% { background: rgba(56,189,248,0.2); }
}

.conv-ea-body {
    padding: 14px 12px;
    background: #fff; border-radius: 0 0 8px 8px;
    border: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 6px;
    position: relative;
    min-height: 80px;
}

.conv-ea-line {
    height: 6px; border-radius: 3px;
}

.conv-ea-bold { width: 70%; background: #1e293b; height: 7px; }
.conv-ea-normal { width: 90%; background: #e8edf5; }
.conv-ea-color { width: 50%; background: #38bdf8; border-radius: 3px; }

.conv-ea-cursor {
    position: absolute;
    bottom: 16px; left: calc(50% + 4px);
    width: 2px; height: 14px;
    background: #38bdf8;
    animation: convCursorBlink 1s step-end infinite;
}

@keyframes convCursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========================================
   Template Cards Animation
   ======================================== */
.conv-template-anim {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; width: 100%; max-width: 300px;
}

.conv-ta-card {
    padding: 12px 14px;
    background: #fff; border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    border-left: 3px solid #38bdf8;
    opacity: 0;
}

.conv-tac-1 { animation: convCardSlide 0.4s 0.2s ease both; }
.conv-tac-2 { animation: convCardSlide 0.4s 0.5s ease both; }
.conv-tac-3 { animation: convCardSlide 0.4s 0.8s ease both; }

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

.conv-ta-name {
    font-size: 0.75rem; font-weight: 700; color: var(--color-text-dark);
    margin-bottom: 6px;
}

.conv-ta-preview {
    height: 5px; background: #e8edf5; border-radius: 3px;
    width: 80%; margin-bottom: 8px;
}

.conv-ta-meta {
    font-size: 0.6rem; color: var(--color-text-muted);
    display: flex; align-items: center; gap: 4px;
}

/* ========================================
   Moderation Controls Animation
   (Mute / Unmute / Block)
   ======================================== */
.conv-mod-anim {
    width: 100%;
    max-width: 360px;
    padding: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(15, 30, 60, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conv-mod-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

.conv-mod-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    padding: 5px 10px;
    border-radius: 100px;
}

.conv-mod-actions {
    display: flex;
    gap: 6px;
}

.conv-mod-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}

.conv-mod-btn-mute {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    animation: convModPulse 2.4s ease-in-out infinite;
}

.conv-mod-btn-block {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

@keyframes convModPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.conv-mod-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conv-mod-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(6px);
    animation: convModRowIn 0.4s ease forwards;
}

.conv-mod-row:nth-child(1) { animation-delay: 0.1s; }
.conv-mod-row:nth-child(2) { animation-delay: 0.25s; }
.conv-mod-row:nth-child(3) { animation-delay: 0.4s; }
.conv-mod-row:nth-child(4) { animation-delay: 0.55s; }

@keyframes convModRowIn {
    to { opacity: 1; transform: translateY(0); }
}

.conv-mod-row-active {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.15);
    animation: convModRowIn 0.4s ease forwards, convModActiveGlow 2.4s ease-in-out infinite 0.6s;
}

@keyframes convModActiveGlow {
    0%, 100% { box-shadow: 0 4px 14px rgba(74, 222, 128, 0.15); }
    50% { box-shadow: 0 6px 22px rgba(74, 222, 128, 0.32); }
}

.conv-mod-row-muted {
    opacity: 1;
}

.conv-mod-row-muted .conv-mod-name,
.conv-mod-row-muted .conv-mod-avatar {
    opacity: 0.55;
}

.conv-mod-row-blocked {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
}

.conv-mod-row-blocked .conv-mod-name,
.conv-mod-row-blocked .conv-mod-avatar {
    opacity: 0.55;
    text-decoration: line-through;
}

.conv-mod-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.65rem;
}

.conv-mod-name {
    font-size: 0.74rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.3;
}

.conv-mod-name em {
    font-style: normal;
    color: #16a34a;
    font-weight: 700;
}

.conv-mod-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 100px;
    white-space: nowrap;
}

.conv-mod-state-on {
    color: #16a34a;
    background: rgba(74, 222, 128, 0.15);
}

.conv-mod-state-block {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* ========================================
   Responsive
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .conv-b1, .conv-b2, .conv-b3, .conv-typing span,
    .conv-ea-active, .conv-ea-cursor,
    .conv-tac-1, .conv-tac-2, .conv-tac-3,
    .conv-mod-btn-mute, .conv-mod-row, .conv-mod-row-active {
        animation: none !important; opacity: 1; transform: none;
    }
}
