/**
 * TaoGroupChat - Full Featured Chat Styles
 * Features: Emoji, File Upload, Audio/Video Recording, Google Meet, Threads, Reactions, Participants
 */

/* CSS Variables - AI Engineers Style */
:root {
    --tgc-primary: #3b82f6;
    --tgc-primary-dark: #2563eb;
    --tgc-primary-light: #60a5fa;
    --tgc-secondary: #8b5cf6;
    --tgc-success: #10b981;
    --tgc-warning: #f59e0b;
    --tgc-danger: #ef4444;
    --tgc-bg-main: #f8fafc;
    --tgc-bg-pattern: none;
    --tgc-bg-sidebar: #ffffff;
    --tgc-bg-header: #ffffff;
    --tgc-bg-input: #f1f5f9;
    --tgc-bg-bubble: #ffffff;
    --tgc-bg-bubble-own: #eff6ff;
    --tgc-text-primary: #1e293b;
    --tgc-text-secondary: #64748b;
    --tgc-text-light: #94a3b8;
    --tgc-text-muted: #cbd5e1;
    --tgc-border: #e2e8f0;
    --tgc-border-light: #f1f5f9;
    --tgc-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --tgc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --tgc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --tgc-spacing-xs: 4px;
    --tgc-spacing-sm: 8px;
    --tgc-spacing-md: 12px;
    --tgc-spacing-lg: 16px;
    --tgc-spacing-xl: 24px;
    --tgc-header-height: 32px;
    --tgc-input-height: 60px;
    --tgc-avatar-size: 40px;
    --tgc-avatar-sm: 32px;
    --tgc-radius: 8px;
    --tgc-radius-lg: 12px;
    --tgc-radius-full: 9999px;
    --tgc-panel-width: 320px;
}

/* Base Reset */
.tgc-app, .tgc-app * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main Container */
.tgc-app {
    display: flex;
    height: 100%;
    min-height: 400px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--tgc-text-primary);
    background: var(--tgc-bg-main);
    position: relative;
}

#tao-groupchat {
    height: 100vh;
    height: 100dvh;
    width: 100%;
}

/* Main Area */
.tgc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--tgc-bg-main);
    background-image: var(--tgc-bg-pattern);
}

/* Header - AI Engineers Style */
.tgc-header {
    min-height: var(--tgc-header-height);
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-xs);
    background: var(--tgc-bg-header);
    border-bottom: 1px solid var(--tgc-border);
}

/* Avatar Stack */
.tgc-header-avatars {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
}

.tgc-avatar-stack {
    display: flex;
    flex-direction: row-reverse;
}

.tgc-stack-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -6px;
    object-fit: cover;
    box-shadow: var(--tgc-shadow);
}

.tgc-stack-avatar:last-child {
    margin-left: 0;
}

.tgc-avatar-more {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-secondary);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--tgc-radius-full);
    margin-left: 4px;
}

.tgc-header-info {
    flex: 1;
    min-width: 0;
}

.tgc-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tgc-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    line-height: 1.3;
}

.tgc-header-description {
    font-size: 13px;
    color: var(--tgc-text-secondary);
    margin: 2px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tgc-header-subtitle {
    font-size: 11px;
    color: var(--tgc-text-secondary);
    margin: 0;
}

.tgc-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tgc-online-count {
    font-size: 12px;
    color: var(--tgc-primary);
    font-weight: 500;
}

/* Search Bar */
.tgc-search-bar {
    display: flex;
    align-items: center;
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-lg);
    background: var(--tgc-bg-header);
    border-bottom: 1px solid var(--tgc-border);
    gap: var(--tgc-spacing-md);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tgc-search-bar.hidden {
    display: none;
}

.tgc-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--tgc-bg-input);
    border-radius: var(--tgc-radius-full);
    padding: 0 var(--tgc-spacing-md);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tgc-search-input-wrapper:focus-within {
    border-color: var(--tgc-primary);
    background: white;
}

.tgc-search-icon {
    color: var(--tgc-text-light);
    flex-shrink: 0;
}

.tgc-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px var(--tgc-spacing-sm);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.tgc-search-input::placeholder {
    color: var(--tgc-text-light);
}

.tgc-search-clear {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--tgc-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.tgc-search-clear:hover {
    background: var(--tgc-border);
    color: var(--tgc-text-primary);
}

.tgc-search-clear.hidden {
    display: none;
}

.tgc-search-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tgc-search-count {
    font-size: 12px;
    color: var(--tgc-text-secondary);
    min-width: 60px;
    text-align: center;
}

.tgc-search-prev,
.tgc-search-next {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--tgc-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tgc-radius);
    transition: all 0.2s;
}

.tgc-search-prev:hover:not(:disabled),
.tgc-search-next:hover:not(:disabled) {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

.tgc-search-prev:disabled,
.tgc-search-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tgc-search-close {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--tgc-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tgc-radius);
    transition: all 0.2s;
}

.tgc-search-close:hover {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

/* Search highlight in messages */
.tgc-search-highlight {
    background: #fef08a;
    color: #854d0e;
    padding: 1px 2px;
    border-radius: 2px;
}

.tgc-search-highlight.active {
    background: #facc15;
    outline: 2px solid #eab308;
}

.tgc-message.tgc-search-match {
    background: #fefce8;
}

/* Reply Bar at Top */
.tgc-reply-bar {
    display: flex;
    align-items: center;
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-lg);
    background: #eff6ff;
    border-bottom: 1px solid var(--tgc-border);
    gap: var(--tgc-spacing-sm);
}

.tgc-reply-bar.hidden {
    display: none;
}

.tgc-reply-bar-border {
    width: 3px;
    height: 36px;
    background: var(--tgc-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.tgc-reply-bar-content {
    flex: 1;
    min-width: 0;
}

.tgc-reply-bar-label {
    font-size: 12px;
    color: var(--tgc-text-secondary);
}

.tgc-reply-bar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tgc-primary);
    margin-left: 4px;
}

.tgc-reply-bar-text {
    display: block;
    font-size: 13px;
    color: var(--tgc-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

.tgc-reply-bar-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--tgc-text-secondary);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
}

.tgc-reply-bar-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Announcement Banner - Hidden */
.tgc-announcement-banner {
    display: none;
}

.tgc-announcement-banner.hidden {
    display: none;
}

.tgc-announcement-icon {
    font-size: 16px;
}

.tgc-announcement-label {
    font-weight: 600;
    color: #92400e;
}

.tgc-announcement-text {
    color: #78350f;
    flex: 1;
}

/* Chat Container */
.tgc-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Messages Area */
.tgc-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--tgc-spacing-lg);
    display: flex;
    flex-direction: column;
}

.tgc-messages-inner {
    display: flex;
    flex-direction: column;
    gap: var(--tgc-spacing-sm);
    margin-top: auto;
}

/* Message - AI Engineers Style (Avatar on LEFT for ALL) */
.tgc-message {
    display: flex;
    gap: var(--tgc-spacing-md);
    padding: var(--tgc-spacing-sm) 0;
    animation: messageIn 0.2s ease;
    position: relative;
}

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

/* Avatar always on left - no reverse for own messages */
.tgc-msg-avatar {
    width: var(--tgc-avatar-size);
    height: var(--tgc-avatar-size);
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.tgc-msg-body {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.tgc-msg-body * {
    text-align: left;
}

.tgc-msg-header {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
    margin-bottom: 4px;
}

.tgc-msg-sender {
    font-size: 14px;
    font-weight: 600;
    color: var(--tgc-text-primary);
}

.tgc-msg-time {
    font-size: 12px;
    color: var(--tgc-text-light);
}

.tgc-msg-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--tgc-text-primary);
    word-wrap: break-word;
    text-align: left !important;
}

.tgc-msg-text * {
    text-align: left !important;
}

.tgc-msg-text a {
    color: var(--tgc-primary);
    text-decoration: none;
}

.tgc-msg-text a:hover {
    text-decoration: underline;
}

/* Own message - distinct styling */
.tgc-message.tgc-own {
    background: var(--tgc-bg-bubble-own);
    margin: 0 calc(-1 * var(--tgc-spacing-lg));
    padding-left: var(--tgc-spacing-lg);
    padding-right: var(--tgc-spacing-lg);
    border-radius: 0;
    border-left: 3px solid var(--tgc-primary);
}

.tgc-message.tgc-own .tgc-msg-sender {
    color: var(--tgc-primary);
}

/* Reply Reference in Message */
.tgc-message-reply-ref {
    background: rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--tgc-primary);
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    position: relative;
}

.tgc-message-reply-ref::before {
    content: "↩";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.4;
}

.tgc-reply-ref-name {
    font-weight: 600;
    color: var(--tgc-primary);
    display: inline;
    margin-right: 6px;
    font-size: 12px;
}

.tgc-reply-ref-name::after {
    content: ":";
}

.tgc-reply-ref-text {
    color: var(--tgc-text-secondary);
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
    opacity: 0.85;
}

/* Own message reply ref - better contrast */
.tgc-message.tgc-own .tgc-message-reply-ref {
    background: rgba(255, 255, 255, 0.25);
}

/* Reactions - Inline Pills */
.tgc-message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tgc-reaction-pill {
    background: var(--tgc-bg-input);
    padding: 4px 10px;
    border-radius: var(--tgc-radius-full);
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--tgc-border);
    transition: all 0.2s;
}

.tgc-reaction-pill:hover {
    background: var(--tgc-border);
    border-color: var(--tgc-text-light);
}

/* Thread Link */
.tgc-message-thread-link {
    font-size: 13px;
    color: var(--tgc-primary);
    cursor: pointer;
    margin-top: 6px;
    font-weight: 500;
}

.tgc-message-thread-link:hover {
    text-decoration: underline;
}

/* Message Actions - Show on hover */
.tgc-msg-actions {
    display: none;
    position: absolute;
    top: var(--tgc-spacing-sm);
    right: 0;
    background: white;
    border: 1px solid var(--tgc-border);
    border-radius: var(--tgc-radius);
    padding: 4px;
    gap: 2px;
    box-shadow: var(--tgc-shadow-md);
}

.tgc-message:hover .tgc-msg-actions {
    display: flex;
}

.tgc-action-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--tgc-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tgc-action-btn:hover {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

/* Legacy classes for backwards compatibility */
.tgc-message-avatar { display: none; }
.tgc-message-content { display: none; }
.tgc-message-bubble { display: none; }
.tgc-message-actions { display: none; }

/* Reaction Picker */
.tgc-reaction-picker {
    background: white;
    border-radius: var(--tgc-radius);
    box-shadow: var(--tgc-shadow-lg);
    padding: 8px;
    display: flex;
    gap: 4px;
    z-index: 1000;
    border: 1px solid var(--tgc-border);
}

.tgc-quick-reaction {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.tgc-quick-reaction:hover {
    background: var(--tgc-bg-input);
}

/* Messages Loading Spinner */
.tgc-messages-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--tgc-text-secondary);
    font-size: 14px;
    gap: 12px;
}
.tgc-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--tgc-border);
    border-top-color: var(--tgc-primary);
    border-radius: 50%;
    animation: tgc-spin 0.8s linear infinite;
}
@keyframes tgc-spin {
    to { transform: rotate(360deg); }
}

/* Typing Indicator - Bottom of chat */
.tgc-typing-indicator {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
    padding: var(--tgc-spacing-md) var(--tgc-spacing-lg);
    color: var(--tgc-text-secondary);
    font-size: 13px;
    background: transparent;
}

.tgc-typing-indicator.hidden { display: none; }

.tgc-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.tgc-typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--tgc-text-light);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.tgc-typing-dots span:nth-child(1) { animation-delay: 0s; }
.tgc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.tgc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.tgc-typing-text {
    color: var(--tgc-text-secondary);
    font-style: italic;
}

/* Reply Preview Bar */
.tgc-reply-preview {
    display: flex;
    align-items: center;
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-lg);
    background: var(--tgc-bg-header);
    border-top: 1px solid var(--tgc-border);
    gap: var(--tgc-spacing-sm);
}

.tgc-reply-preview.hidden { display: none; }

.tgc-reply-content {
    flex: 1;
    min-width: 0;
    border-left: 3px solid var(--tgc-secondary);
    padding-left: var(--tgc-spacing-sm);
}

.tgc-reply-label {
    font-size: 11px;
    color: var(--tgc-text-light);
}

.tgc-reply-name {
    font-weight: 600;
    color: var(--tgc-secondary);
    margin-left: 4px;
}

.tgc-reply-text {
    display: block;
    font-size: 13px;
    color: var(--tgc-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tgc-reply-cancel {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--tgc-text-secondary);
    cursor: pointer;
    padding: 4px 8px;
}

/* Input Area - AI Engineers Style */
.tgc-input-area {
    padding: var(--tgc-spacing-md) var(--tgc-spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
    background: var(--tgc-bg-header);
    border-top: 1px solid var(--tgc-border);
}

/* Toolbar - Left side icons */
.tgc-toolbar {
    display: flex;
    gap: 4px;
}

.tgc-toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--tgc-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tgc-radius);
    transition: all 0.2s;
}

.tgc-toolbar-btn:hover {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

/* Input wrapper with rounded style */
.tgc-input-wrapper {
    flex: 1;
    background: var(--tgc-bg-input);
    border-radius: var(--tgc-radius-full);
    border: 1px solid transparent;
    overflow: hidden;
    transition: all 0.2s;
}

.tgc-input-wrapper:focus-within {
    border-color: var(--tgc-primary);
    background: white;
}

.tgc-message-input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    background: transparent;
}

.tgc-message-input::placeholder {
    color: var(--tgc-text-light);
}

/* Buttons */
.tgc-btn-icon {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--tgc-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tgc-radius);
    transition: all 0.2s;
}

.tgc-btn-icon svg {
    width: 16px;
    height: 16px;
}

.tgc-btn-icon:hover {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

/* Send Button - Blue styled */
.tgc-send-btn {
    background: var(--tgc-primary);
    color: white;
    border-radius: var(--tgc-radius);
    padding: 8px 16px;
    width: auto;
    font-size: 14px;
    font-weight: 500;
}

.tgc-send-btn::before {
    content: 'Send';
}

.tgc-send-btn svg {
    display: none;
}

.tgc-send-btn:hover {
    background: var(--tgc-primary-dark);
    color: white;
}

/* ==================== PANELS ==================== */

/* Participants Panel, Thread Panel, Profile Panel, Members Panel */
.tgc-participants-panel,
.tgc-thread-panel,
.tgc-profile-panel,
.tgc-members-panel {
    width: var(--tgc-panel-width);
    background: var(--tgc-bg-sidebar);
    border-left: 1px solid var(--tgc-border);
    display: flex !important;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: var(--tgc-shadow-lg);
    transition: transform 0.3s ease, visibility 0.3s;
    transform: translateX(0);
}

.tgc-participants-panel.hidden,
.tgc-thread-panel.hidden,
.tgc-profile-panel.hidden,
.tgc-members-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
    visibility: hidden;
}

.tgc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tgc-spacing-lg);
    border-bottom: 1px solid var(--tgc-border);
    background: var(--tgc-bg-header);
}

.tgc-panel-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.tgc-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--tgc-text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Participants List */
.tgc-participants-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--tgc-spacing-sm) 0;
}

.tgc-participant {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-lg);
    cursor: pointer;
    transition: background 0.2s;
}

.tgc-participant:hover {
    background: var(--tgc-bg-header);
}

.tgc-participant-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.tgc-participant-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.tgc-avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--tgc-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.tgc-avatar-initial.large {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

.tgc-participant-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tgc-text-light);
    border: 2px solid white;
}

.tgc-participant-status.online {
    background: #00C853;
}

.tgc-participant-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    line-height: 1.2;
}

.tgc-participant-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    margin-bottom: 2px;
}

.tgc-participant-role {
    font-size: 11px;
    color: var(--tgc-text-secondary);
    text-align: left;
}

.tgc-no-participants {
    padding: var(--tgc-spacing-lg);
    text-align: center;
    color: var(--tgc-text-light);
}

/* Profile Panel */
.tgc-profile-content {
    padding: var(--tgc-spacing-xl);
    text-align: center;
}

.tgc-profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--tgc-spacing-lg);
}

.tgc-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.tgc-profile-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tgc-text-light);
    border: 3px solid white;
}

.tgc-profile-status.online {
    background: #00C853;
}

.tgc-profile-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tgc-profile-ptoken {
    font-size: 13px;
    color: var(--tgc-text-secondary);
    margin-bottom: 8px;
}

.tgc-profile-role {
    display: inline-block;
    background: var(--tgc-secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.tgc-profile-joined {
    font-size: 12px;
    color: var(--tgc-text-light);
}

/* Settings Panel */
.tgc-settings-panel {
    width: var(--tgc-panel-width);
    background: var(--tgc-bg-sidebar);
    border-left: 1px solid var(--tgc-border);
    display: flex !important;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: var(--tgc-shadow-lg);
    transition: transform 0.3s ease, visibility 0.3s;
    transform: translateX(0);
}

.tgc-settings-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
    visibility: hidden;
}

.tgc-settings-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    text-align: left !important;
}

.tgc-settings-section {
    margin-bottom: 20px;
    text-align: left !important;
}

.tgc-settings-section h5 {
    font-size: 11px;
    font-weight: 600;
    color: var(--tgc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid var(--tgc-border);
    text-align: left !important;
}

.tgc-setting-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--tgc-text-primary);
    text-align: left !important;
}

.tgc-setting-item:hover {
    color: var(--tgc-primary);
}

.tgc-setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--tgc-primary);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.tgc-setting-item span {
    flex: 1;
    text-align: left !important;
}

/* Thread Panel */
.tgc-thread-parent {
    padding: var(--tgc-spacing-md);
    border-bottom: 1px solid var(--tgc-border);
    background: var(--tgc-bg-header);
}

.tgc-thread-divider {
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-lg);
    font-size: 12px;
    color: var(--tgc-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tgc-thread-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--tgc-spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--tgc-spacing-sm);
}

.tgc-thread-input {
    display: flex;
    align-items: flex-end;
    gap: var(--tgc-spacing-sm);
    padding: var(--tgc-spacing-md);
    border-top: 1px solid var(--tgc-border);
    background: var(--tgc-bg-header);
}

.tgc-thread-toolbar {
    display: flex;
    gap: 2px;
}

.tgc-thread-input-field {
    flex: 1;
    padding: var(--tgc-spacing-sm) var(--tgc-spacing-md);
    border: 1px solid var(--tgc-border);
    border-radius: var(--tgc-radius);
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
}

.tgc-thread-input-field:focus {
    border-color: var(--tgc-primary);
}

/* ==================== EMOJI PICKER ==================== */

.tgc-emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 16px;
    width: 320px;
    background: white;
    border-radius: var(--tgc-radius-lg);
    box-shadow: var(--tgc-shadow-lg);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--tgc-border);
}

.tgc-emoji-picker.hidden {
    display: none !important;
}

.tgc-emoji-tabs {
    display: flex;
    border-bottom: 1px solid var(--tgc-border);
    padding: var(--tgc-spacing-xs);
}

.tgc-emoji-tab {
    flex: 1;
    background: none;
    border: none;
    padding: var(--tgc-spacing-sm);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--tgc-radius);
    transition: background 0.2s;
}

.tgc-emoji-tab:hover {
    background: var(--tgc-bg-header);
}

.tgc-emoji-tab.active {
    background: var(--tgc-bg-header);
}

.tgc-emoji-search {
    padding: var(--tgc-spacing-sm);
    border-bottom: 1px solid var(--tgc-border);
}

.tgc-emoji-search-input {
    width: 100%;
    padding: var(--tgc-spacing-sm);
    border: 1px solid var(--tgc-border);
    border-radius: var(--tgc-radius);
    font-size: 13px;
    outline: none;
}

.tgc-emoji-search-input:focus {
    border-color: var(--tgc-primary);
}

.tgc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: var(--tgc-spacing-sm);
    max-height: 200px;
    overflow-y: auto;
}

.tgc-emoji-item {
    background: none;
    border: none;
    font-size: 22px;
    padding: 6px;
    cursor: pointer;
    border-radius: var(--tgc-radius);
    transition: background 0.2s;
}

.tgc-emoji-item:hover {
    background: var(--tgc-bg-header);
}

/* ==================== RECORDING MODAL ==================== */

.tgc-recording-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tgc-recording-modal.hidden { display: none; }

.tgc-recording-content {
    background: white;
    border-radius: var(--tgc-radius-lg);
    padding: var(--tgc-spacing-xl);
    text-align: center;
    min-width: 300px;
}

.tgc-recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tgc-spacing-md);
    margin-bottom: var(--tgc-spacing-lg);
}

.tgc-recording-dot {
    width: 16px;
    height: 16px;
    background: #f44336;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tgc-recording-time {
    font-size: 24px;
    font-weight: 600;
    font-family: monospace;
}

.tgc-recording-preview {
    width: 100%;
    max-width: 320px;
    border-radius: var(--tgc-radius);
    margin-bottom: var(--tgc-spacing-lg);
}

.tgc-recording-preview.hidden { display: none; }

.tgc-recording-actions {
    display: flex;
    gap: var(--tgc-spacing-md);
    justify-content: center;
}

.tgc-recording-cancel,
.tgc-recording-stop {
    padding: var(--tgc-spacing-md) var(--tgc-spacing-xl);
    border: none;
    border-radius: var(--tgc-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.tgc-recording-cancel {
    background: var(--tgc-bg-header);
    color: var(--tgc-text-primary);
}

.tgc-recording-cancel:hover {
    background: var(--tgc-border);
}

.tgc-recording-stop {
    background: var(--tgc-primary);
    color: white;
}

.tgc-recording-stop:hover {
    background: var(--tgc-primary-dark);
}

/* ==================== GOOGLE MEET CARD ==================== */

.tgc-meet-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    max-width: 280px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tgc-meet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tgc-meet-icon {
    flex-shrink: 0;
}

.tgc-meet-info {
    flex: 1;
    min-width: 0;
}

.tgc-meet-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 2px;
}

.tgc-meet-code {
    font-size: 12px;
    color: #6b7280;
    font-family: monospace;
}

.tgc-meet-join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #00897B;
    color: white !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.tgc-meet-join-btn:hover {
    background: #00796B;
}

/* Legacy link style (fallback) */
.tgc-meet-link {
    display: inline-block;
    background: #00897B;
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--tgc-radius);
    text-decoration: none !important;
    font-weight: 500;
}

.tgc-meet-link:hover {
    background: #00796B;
}

/* ==================== FILE ATTACHMENTS ==================== */

.tgc-file-attachment {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    background: var(--tgc-surface);
    border: 1px solid var(--tgc-border);
    border-radius: var(--tgc-radius);
    overflow: hidden;
}

.tgc-image-attachment .tgc-image-preview {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: #f0f0f0;
}

.tgc-image-attachment .tgc-image-preview a {
    display: block;
    cursor: pointer;
}

.tgc-image-attachment .tgc-image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.tgc-image-attachment .tgc-image-preview img:hover {
    transform: scale(1.02);
}

.tgc-video-attachment .tgc-video-preview {
    width: 100%;
    max-height: 300px;
    background: #000;
}

.tgc-audio-attachment .tgc-audio-preview {
    width: 100%;
    padding: 12px;
}

.tgc-doc-attachment {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

.tgc-doc-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.tgc-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 8px;
    background: var(--tgc-bg);
    border-top: 1px solid var(--tgc-border);
}

.tgc-doc-attachment .tgc-file-info {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border-top: none;
}

.tgc-file-name {
    font-size: 13px;
    color: var(--tgc-text-primary);
    word-break: break-word;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.tgc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--tgc-primary);
    color: white !important;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.tgc-download-btn:hover {
    background: var(--tgc-primary-hover, #5a6fd6);
}

.tgc-download-btn svg {
    flex-shrink: 0;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .tgc-image-attachment .tgc-image-preview {
        background: #2a2a2a;
    }
}

/* ==================== WATCH PARTY LAYOUT ==================== */

.tgc-app.tgc-watch-party {
    display: flex;
    flex-direction: row;
}

.tgc-video-section {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    min-width: 0;
}

.tgc-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tgc-spacing-md) var(--tgc-spacing-lg);
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4e;
}

.tgc-video-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.tgc-video-time {
    color: var(--tgc-primary);
    font-size: 13px;
    font-weight: 500;
}

.tgc-video-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.tgc-video-container iframe,
.tgc-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tgc-video-placeholder {
    color: #666;
    font-size: 16px;
}

.tgc-video-description {
    padding: var(--tgc-spacing-md) var(--tgc-spacing-lg);
    background: #1a1a2e;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    border-top: 1px solid #2a2a4e;
}

.tgc-chat-section {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    background: var(--tgc-bg-main);
    background-image: var(--tgc-bg-pattern);
    border-left: 1px solid var(--tgc-border);
}

/* Watch party: stack toolbar above input for more typing space */
.tgc-watch-party .tgc-input-area {
    flex-wrap: wrap;
}

.tgc-watch-party .tgc-toolbar {
    width: 100%;
    order: -1;
    padding-bottom: var(--tgc-spacing-xs);
    border-bottom: 1px solid var(--tgc-border);
    margin-bottom: var(--tgc-spacing-xs);
}

.tgc-watch-party .tgc-input-wrapper {
    flex: 1;
    min-width: 0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {
    .tgc-app.tgc-watch-party {
        flex-direction: column;
    }

    .tgc-video-section {
        height: 40%;
        min-height: 200px;
    }

    .tgc-chat-section {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--tgc-border);
    }

    .tgc-participants-panel,
    .tgc-thread-panel,
    .tgc-profile-panel {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .tgc-message {
        max-width: 85%;
    }

    .tgc-emoji-picker {
        left: 10px;
        right: 10px;
        width: auto;
    }
}

/* ==================== DARK THEME ==================== */

body.dark-theme {
    --tgc-primary: #60a5fa;
    --tgc-primary-dark: #3b82f6;
    --tgc-bg-main: #0f172a;
    --tgc-bg-pattern: none;
    --tgc-bg-sidebar: #1e293b;
    --tgc-bg-header: #1e293b;
    --tgc-bg-input: #334155;
    --tgc-bg-bubble: #334155;
    --tgc-bg-bubble-own: #1e3a5f;
    --tgc-text-primary: #f1f5f9;
    --tgc-text-secondary: #94a3b8;
    --tgc-text-light: #64748b;
    --tgc-text-muted: #475569;
    --tgc-border: #334155;
    --tgc-border-light: #1e293b;
}

body.dark-theme .tgc-emoji-picker,
body.dark-theme .tgc-recording-content,
body.dark-theme .tgc-reaction-picker,
body.dark-theme .tgc-msg-actions {
    background: var(--tgc-bg-sidebar);
    border-color: var(--tgc-border);
}

body.dark-theme .tgc-message-input,
body.dark-theme .tgc-thread-input-field,
body.dark-theme .tgc-emoji-search-input {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
}

body.dark-theme .tgc-reply-bar {
    background: #1e3a5f;
}

body.dark-theme .tgc-announcement-banner {
    background: #422006;
    border-color: #92400e;
}

body.dark-theme .tgc-announcement-label,
body.dark-theme .tgc-announcement-text {
    color: #fcd34d;
}

body.dark-theme .tgc-input-wrapper {
    background: var(--tgc-bg-input);
}

body.dark-theme .tgc-input-wrapper:focus-within {
    background: var(--tgc-bg-sidebar);
}

/* Members Panel */
.tgc-members-panel {
    width: var(--tgc-panel-width);
    background: var(--tgc-bg-sidebar);
    border-left: 1px solid var(--tgc-border);
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: var(--tgc-shadow-lg);
    transition: transform 0.3s ease;
}

.tgc-members-panel.hidden {
    transform: translateX(100%);
}

.tgc-members-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--tgc-spacing-sm) 0;
}

.tgc-member-item {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-md);
    padding: var(--tgc-spacing-md) var(--tgc-spacing-lg);
    cursor: pointer;
    transition: background 0.2s;
}

.tgc-member-item:hover {
    background: var(--tgc-bg-header);
}

.tgc-member-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.tgc-member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.tgc-member-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tgc-text-light);
    border: 2px solid white;
}

.tgc-member-status.online {
    background: #00C853;
}

.tgc-member-info {
    flex: 1;
    min-width: 0;
}

.tgc-member-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tgc-member-role {
    font-size: 12px;
    color: var(--tgc-text-secondary);
}

.tgc-no-members {
    padding: var(--tgc-spacing-lg);
    text-align: center;
    color: var(--tgc-text-light);
}

/* Enhanced Profile Panel - Like TaoChat */
.tgc-profile-content {
    padding: var(--tgc-spacing-xl);
    text-align: center;
    overflow-y: auto;
}

.tgc-profile-avatar {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto var(--tgc-spacing-lg);
}

.tgc-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--tgc-shadow-md);
}

.tgc-profile-status {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tgc-text-light);
    border: 3px solid white;
}

.tgc-profile-status.online {
    background: #00C853;
}

.tgc-profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--tgc-text-primary);
}

.tgc-profile-ptoken {
    font-size: 14px;
    color: var(--tgc-text-secondary);
    margin-bottom: 12px;
}

.tgc-profile-role {
    display: inline-block;
    background: var(--tgc-primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--tgc-radius-full);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.tgc-profile-joined {
    font-size: 13px;
    color: var(--tgc-text-light);
    margin-bottom: 16px;
}

.tgc-profile-status-text {
    font-size: 13px;
    color: var(--tgc-text-secondary);
    margin-bottom: 8px;
}

.tgc-profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.tgc-profile-badge {
    background: var(--tgc-primary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--tgc-radius-full);
    font-size: 11px;
    font-weight: 500;
}

.tgc-profile-sections {
    text-align: left;
    margin-top: var(--tgc-spacing-lg);
    border-top: 1px solid var(--tgc-border);
    padding-top: var(--tgc-spacing-lg);
}

.tgc-profile-section {
    margin-bottom: var(--tgc-spacing-lg);
}

.tgc-profile-section-header {
    display: flex;
    align-items: center;
    gap: var(--tgc-spacing-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--tgc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--tgc-spacing-sm);
}

.tgc-profile-section-value {
    font-size: 14px;
    color: var(--tgc-text-primary);
}

.tgc-profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tgc-profile-skill-tag {
    background: var(--tgc-bg-input);
    color: var(--tgc-text-primary);
    padding: 4px 10px;
    border-radius: var(--tgc-radius-full);
    font-size: 12px;
}

.tgc-profile-actions {
    margin-top: var(--tgc-spacing-xl);
    display: flex;
    justify-content: center;
    gap: var(--tgc-spacing-sm);
}

.tgc-profile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tgc-spacing-sm);
    padding: 10px 20px;
    border: none;
    border-radius: var(--tgc-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--tgc-primary);
    color: white;
}

.tgc-profile-action-btn:hover {
    background: var(--tgc-primary-dark);
}

/* Profile Status Row */
.tgc-profile-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 12px 0;
    flex-wrap: wrap;
}

.tgc-profile-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tgc-text-light);
    flex-shrink: 0;
}

.tgc-profile-status-dot.online {
    background: #00C853;
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.5);
}

.tgc-profile-status-text {
    font-size: 13px;
    color: var(--tgc-text-secondary);
}

.tgc-profile-ticket-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

.tgc-profile-ticket-type svg {
    color: #9ca3af;
    flex-shrink: 0;
}

/* Profile Type Badge (distinct from regular badges) */
.tgc-profile-badge--type {
    background: var(--tgc-primary) !important;
    color: white !important;
}

/* Profile Name Row with Type Badge */
.tgc-profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.tgc-profile-name-row .tgc-profile-name {
    margin-bottom: 0;
}

.tgc-profile-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: var(--tgc-radius-full);
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

/* Profile CTA Banner */
.tgc-profile-cta-banner {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: var(--tgc-radius);
    font-size: 13px;
    text-align: center;
}

.tgc-profile-cta-link {
    color: #065f46;
    font-weight: 600;
    text-decoration: underline;
}

/* Profile Cards Container */
.tgc-profile-cards {
    text-align: left;
    margin-top: var(--tgc-spacing-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Profile Card (box with border) */
.tgc-profile-card {
    background: #fff;
    border: 1px solid var(--tgc-border);
    border-radius: var(--tgc-radius);
    padding: 12px 16px;
}

.tgc-profile-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--tgc-text-secondary);
    margin-bottom: 8px;
    text-transform: capitalize;
}

.tgc-profile-card-value {
    font-size: 14px;
    color: var(--tgc-text-primary);
}

/* Network Stats (Followers / Following) */
.tgc-profile-network-stats {
    display: flex;
    gap: 20px;
}

.tgc-profile-stat {
    font-size: 14px;
    color: var(--tgc-text-primary);
}

.tgc-profile-stat strong {
    font-weight: 600;
    margin-right: 4px;
}

/* Profile View More Button */
.tgc-profile-view-more-btn {
    display: inline-block;
    background: var(--tgc-primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: var(--tgc-radius-full);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    margin: 12px 0;
    transition: all 0.2s ease;
}

.tgc-profile-view-more-btn:hover {
    background: var(--tgc-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--tgc-shadow-md);
}

/* Profile Social Links */
.tgc-profile-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.tgc-profile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tgc-bg-input);
    color: var(--tgc-text-secondary);
    transition: all 0.2s ease;
}

.tgc-profile-social-link:hover {
    background: var(--tgc-primary);
    color: white;
    transform: translateY(-2px);
}

.tgc-profile-social-link svg {
    width: 20px;
    height: 20px;
}

/* Profile Contact Section */
.tgc-profile-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tgc-profile-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--tgc-text-secondary);
}

.tgc-profile-contact-item svg {
    flex-shrink: 0;
    color: var(--tgc-text-light);
}

.tgc-profile-contact-item a {
    color: var(--tgc-primary);
    text-decoration: none;
    word-break: break-all;
}

.tgc-profile-contact-item a:hover {
    text-decoration: underline;
}

/* Thread link clickable area */
.tgc-message-thread-link {
    font-size: 13px;
    color: var(--tgc-primary);
    cursor: pointer;
    margin-top: 8px;
    font-weight: 500;
    display: inline-block;
    padding: 4px 0;
}

.tgc-message-thread-link:hover {
    text-decoration: underline;
}

/* Utility */
.hidden { display: none !important; }
