/* Updated Transcript Design - Matching Right-Hand Tabs */

/* Main transcript container - matching right-hand tab styling */
#active-liveTranscript {
    background-color: #1A1A1A !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 0 !important;
    padding: 0 !important;
    overflow-y: auto !important;
}

/* Header section for transcript - similar to accordion headers */
.transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid #2A2A2A;
    color: #E5E7EB;
}

.transcript-header h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #E5E7EB;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transcript-header i {
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* Message count badge */
.transcript-count {
    font-size: 0.75rem;
    color: #9CA3AF;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

/* Transcript content area */
.transcript-content {
    padding: 0.75rem;
}

/* Individual conversation entries - with colored borders */
#active-liveTranscript .conversation-entry {
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem 0 0 0.375rem; /* Curved edges on left side */
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid #4A90E2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Officer entries - blue accent */
#active-liveTranscript .conversation-entry.officer {
    border-left-color: #2563EB;
}

/* Complainant entries - purple accent */
#active-liveTranscript .conversation-entry.complainant {
    border-left-color: #7C3AED;
}

/* System entries - gray accent */
#active-liveTranscript .conversation-entry.system {
    border-left-color: #6B7280;
}

#active-liveTranscript .conversation-entry:last-child {
    border-bottom: none;
}

#active-liveTranscript .conversation-entry:hover {
    background-color: rgba(74, 144, 226, 0.05) !important;
    transform: translateX(2px);
}

/* Chat bubble wrapper - grid layout for header and content */
#active-liveTranscript .chat-bubble-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Header row with timestamp, avatar, and actions */
.transcript-header-row {
    display: grid !important;
    grid-template-columns: auto auto auto 1fr auto !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

/* Timestamp - in header row */
#active-liveTranscript .chat-timestamp {
    font-size: 0.625rem !important;
    color: #6B7280 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    min-width: 3.5rem !important;
}

/* Avatar - in header row */
#active-liveTranscript .conversation-icon-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

/* Speaker name */
.speaker-name {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #E5E7EB !important;
}

/* Profile avatars - smaller and flatter */
#active-liveTranscript .profile-avatar {
    width: 28px !important;
    height: 28px !important;
    border-radius: 0.375rem !important; /* Slightly rounded square */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#active-liveTranscript .profile-avatar.officer {
    background-color: rgba(37, 99, 235, 0.2) !important;
    color: #60A5FA !important;
}

#active-liveTranscript .profile-avatar.complainant {
    background-color: rgba(124, 58, 237, 0.2) !important;
    color: #A78BFA !important;
}

#active-liveTranscript .profile-avatar.system {
    background-color: rgba(107, 114, 128, 0.2) !important;
    color: #9CA3AF !important;
}

/* Chat bubble - full width on second line */
#active-liveTranscript .chat-bubble {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
    color: #E5E7EB !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    width: 100% !important;
}

#active-liveTranscript .chat-bubble.system {
    font-size: 0.75rem !important;
    color: #9CA3AF !important;
}

/* Transcript actions - in header row */
.transcript-entry-actions {
    display: flex !important;
    gap: 0.25rem !important;
    margin-left: auto !important;
    opacity: 0 !important; /* Hidden by default */
    transition: opacity 0.2s !important;
}

#active-liveTranscript .conversation-entry:hover .transcript-entry-actions {
    opacity: 1 !important;
}

/* Pin button styling moved to transcript-pin-minimal.css */

/* Remove bubble tails */
#active-liveTranscript .chat-bubble::before,
#active-liveTranscript .chat-bubble::after {
    display: none !important;
}

/* Tooltip styling - matching right tabs */
#active-liveTranscript .tooltip .tooltiptext {
    background-color: #1F1F1F !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 0 !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Add subtle divider between messages */
#active-liveTranscript .conversation-entry + .conversation-entry {
    margin-top: 0;
}

/* Auto-scroll indicator */
.transcript-auto-scroll {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: #262626;
    border: 1px solid #2A2A2A;
    border-radius: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: #9CA3AF;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
    z-index: 10;
}

.transcript-auto-scroll:hover {
    background-color: #323232;
    border-color: #4B5563;
    color: #E5E7EB;
}

.transcript-auto-scroll i {
    font-size: 0.75rem;
}

/* Transcript filters/controls - matching search filters */
.transcript-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid #2A2A2A;
}

.transcript-filter-btn {
    padding: 0.375rem 0.75rem;
    background-color: #262626;
    border: 1px solid #2A2A2A;
    border-radius: 0;
    color: #E5E7EB;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.transcript-filter-btn:hover {
    background-color: #323232;
    border-color: #4B5563;
}

.transcript-filter-btn.active {
    background-color: #4A90E2;
    border-color: #4A90E2;
    color: white;
}

/* Loading state */
.transcript-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6B7280;
    font-size: 0.875rem;
}

.transcript-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.transcript-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6B7280;
}

.transcript-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.transcript-empty p {
    font-size: 0.875rem;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #active-liveTranscript .chat-timestamp {
        display: none !important;
    }
    
    #active-liveTranscript .chat-bubble-wrapper {
        grid-template-columns: auto 1fr !important;
    }
    
    #active-liveTranscript .profile-avatar {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.625rem !important;
    }
}