/* Enhanced Links Preview Section Styles */
.links-preview-section {
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    margin: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 60vh;
}

.links-preview-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.links-preview-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.links-preview-header h3::before {
    content: '🔗';
    font-size: 1rem;
}

.links-preview-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.links-preview-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.no-links-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--surface-color);
    border: 2px dashed var(--border-light);
    border-radius: var(--border-radius-md);
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.no-links-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-links-message p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Link Items */
.enhanced-link-item {
    background: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    flex-shrink: 0;
}

.enhanced-link-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.enhanced-link-item:last-child {
    margin-bottom: 0;
}

.enhanced-link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-link-item:hover::before {
    opacity: 1;
}

/* Article Content Styling */
.article-content {
    padding: 1.5rem;
    position: relative;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-domain {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-domain i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.article-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.article-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

.article-cta i {
    font-size: 0.9rem;
}

/* YouTube Embed Styling */
.youtube-embed-container {
    position: relative;
    background: #000;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
}

.youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-thumbnail {
    position: relative;
    cursor: pointer;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
}

.youtube-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.youtube-thumbnail:hover img {
    transform: scale(1.05);
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.youtube-play-button:hover {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.youtube-play-button i {
    color: white;
    font-size: 1.5rem;
    margin-left: 4px;
}

.video-info {
    padding: 1.5rem;
    background: var(--surface-color);
}

.video-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-channel {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.video-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Document Preview Styling */
.document-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.document-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.document-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.document-url {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin: 0;
    word-break: break-all;
    font-family: monospace;
}

.document-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.document-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

/* Fallback Link Item Styling */
.link-item {
    background: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    flex-shrink: 0;
}

.link-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-item:hover::before {
    opacity: 1;
}

.link-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.link-url {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    word-break: break-all;
    font-family: monospace;
    background: var(--border-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.link-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Avatar Mode Layout Improvements */
.chat-messages.avatar-active {
    display: flex;
    flex-direction: row;
    padding: 0;
    background: var(--surface-color);
    height: 100vh;
    overflow: hidden;
}

.chat-messages.avatar-active .avatar-video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
}

.chat-messages.avatar-active .links-preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-messages.avatar-active {
        flex-direction: column;
    }
    
    .chat-messages.avatar-active .links-preview-section {
        max-width: none;
        min-width: auto;
        height: 40vh;
    }
    
    .links-preview-content {
        padding: 1rem;
    }
    
    .article-content,
    .video-info,
    .document-preview {
        padding: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .document-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .document-cta {
        align-self: stretch;
        justify-content: center;
    }
} 