/* Unified VA Chat Widget CSS */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-color: #667eea;
    --accent-hover: #5568d3;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* Floating Chat Button */
#va-chat-button.va-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

#va-chat-button.va-floating-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(102, 126, 234, 0.4), 0 10px 10px -5px rgba(102, 126, 234, 0.2);
}

#va-chat-button.va-floating-button .va-button-icon {
    stroke: white;
}

.va-button-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

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

/* Chat Window */
.va-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 420px;
    height: 600px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000000;
    border: 1px solid var(--border-color);
}

.va-chat-window.active {
    display: flex;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Window Header */
.va-window-header {
    padding: 16px 20px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.va-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.va-header-avatar .va-avatar-gradient {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.va-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.va-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.va-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.va-status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

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

.va-header-controls {
    display: flex;
    gap: 8px;
}

.va-header-button {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.va-header-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Mode Selector */
.va-mode-selector {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.va-mode-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.va-mode-button.active {
    background: var(--primary-gradient);
    border-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.va-mode-button.active .va-mode-icon {
    stroke: white;
}

.va-mode-button:hover:not(.active) {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.va-mode-icon {
    stroke: currentColor;
}

/* Messages Container */
.va-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   UNIFIED MESSAGE DESIGN - CHAT & SEARCH
   ============================================ */

/* Message Container */
.va-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    animation: messageAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.va-message.assistant {
    justify-content: flex-start;
}

.va-message.user {
    justify-content: flex-end;
}

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

/* Unified Avatar */
.va-message-avatar .va-avatar-gradient {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: var(--shadow-sm);
}

/* Unified Message Cards */
.va-message-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Assistant Message Card */
.va-message.assistant .va-message-card {
    border-top-left-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-color);
}

/* User Message Card */
.va-message.user .va-message-card {
    background: var(--primary-gradient);
    color: white;
    border-top-right-radius: var(--radius-sm);
    border-right: 3px solid rgba(255, 255, 255, 0.3);
}

/* Message Header */
.va-message-header {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.va-message.user .va-message-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.va-message-sender {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.va-message.user .va-message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.va-sender-icon {
    stroke: currentColor;
    width: 14px;
    height: 14px;
}

.va-message-time-header {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.va-message.user .va-message-time-header {
    color: rgba(255, 255, 255, 0.7);
}

/* Message Content */
.va-message-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.va-message.user .va-message-content {
    color: white;
}

/* Message Links */
.va-message-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.va-message-content a:hover {
    border-bottom-color: currentColor;
}

.va-message.user .va-message-content a {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Message Footer */
.va-message-footer {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.va-message.user .va-message-footer {
    background: rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Message Status */
.va-message-status {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-tertiary);
}

.va-message.user .va-message-status {
    color: rgba(255, 255, 255, 0.7);
}

.va-status-icon {
    font-size: 12px;
    line-height: 1;
}

.va-status-sent {
    opacity: 0.6;
}

.va-status-delivered {
    color: var(--success-color);
    opacity: 0.8;
}

.va-status-read {
    color: var(--success-color);
    opacity: 1;
}

.va-message.user .va-status-delivered,
.va-message.user .va-status-read {
    color: rgba(255, 255, 255, 0.9);
}

/* Message Actions */
.va-message-actions {
    display: flex;
    gap: 8px;
}

.va-message-action {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.va-message-action:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.va-message.user .va-message-action {
    color: rgba(255, 255, 255, 0.7);
}

.va-message.user .va-message-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Welcome Message Card */
.va-welcome-card {
    max-width: 360px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.va-welcome-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.va-welcome-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.va-welcome-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.va-welcome-body {
    padding: 20px;
}

.va-welcome-text {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.va-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.va-welcome-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.va-welcome-action:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.va-welcome-action-icon {
    stroke: currentColor;
    width: 14px;
    height: 14px;
}

/* ============================================
   SEARCH MODE SPECIFIC STYLES
   ============================================ */

/* Search Mode - Expanded Input */
.va-chat-window.search-mode .va-input-container {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--border-color);
}

.va-chat-window.search-mode .va-input-wrapper {
    gap: 16px;
    align-items: center;
}

.va-chat-window.search-mode .va-text-input {
    font-size: 15px;
    padding: 16px 20px;
    min-height: 56px;
    border-radius: var(--radius-xl);
    background: white;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.va-chat-window.search-mode .va-text-input:focus {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.va-chat-window.search-mode .va-send-button {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.va-chat-window.search-mode .va-send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.va-chat-window.search-mode .va-input-hint {
    text-align: right;
    margin-top: 12px;
    padding-right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.3px;
}

/* ============================================
   TYPING INDICATOR
   ============================================ */

/* Clean Typing Indicator */
.va-typing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    align-self: flex-start;
    max-width: 240px;
    margin-left: 48px;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease;
    border: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.va-typing-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.va-typing-avatar .va-avatar-initials {
    color: white;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.va-typing-bubble {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.va-typing-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.va-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.va-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.va-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.va-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.4;
    }
    40% { 
        transform: scale(1.1);
        opacity: 1;
    }
}

.va-typing-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================
   SEARCH RESULTS DESIGN
   ============================================ */

/* Search Results */
.va-search-results {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: 0;
    border: none;
}

.va-search-header {
    padding: 16px 20px;
    background: var(--primary-gradient);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.va-search-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.va-search-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.va-search-tips {
    font-size: 11px;
    opacity: 0.9;
}

.va-search-result {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.va-search-result:last-child {
    border-bottom: none;
}

.va-search-result:hover {
    background: var(--bg-secondary);
}

.va-result-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.va-result-rank {
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.va-result-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
}

.va-result-title a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.va-result-title a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.va-result-url {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success-color);
    font-size: 13px;
    margin-bottom: 8px;
}

.va-url-icon {
    stroke: currentColor;
    opacity: 0.7;
}

.va-result-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.va-result-link:hover {
    text-decoration: underline;
}

.va-result-snippet {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.va-result-actions {
    display: flex;
    justify-content: flex-end;
}

.va-result-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.va-result-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.va-button-icon {
    stroke: white;
}

.va-search-result-empty {
    padding: 32px 16px;
    text-align: center;
}

.va-search-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.va-search-result-empty h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.va-search-result-empty p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   CITATIONS DESIGN
   ============================================ */

/* Citations in Chat Messages */
.va-message-card .va-citations-container {
    margin: 16px -16px -16px -16px;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    box-shadow: none;
}

.va-message.user .va-message-card .va-citations-container {
    background: rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Enhanced Citations Styling */
.va-citations-container {
    margin-top: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.va-citations-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.va-citation-icon {
    stroke: var(--text-secondary);
}

.va-citations-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.va-citations-grid {
    padding: 8px;
}

.va-citation-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.va-citation-card:last-child {
    margin-bottom: 0;
}

.va-citation-card:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.va-citation-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.va-citation-card:hover::before {
    opacity: 1;
}

.va-citation-number {
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.va-citation-content {
    flex: 1;
    min-width: 0;
}

.va-citation-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.va-citation-domain {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.va-link-icon {
    stroke: var(--text-tertiary);
}

.va-citation-arrow {
    color: var(--text-tertiary);
    font-size: 16px;
    font-weight: 300;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.va-citation-card:hover .va-citation-arrow {
    color: var(--accent-color);
    opacity: 1;
    transform: translateX(2px);
}

.va-citations-footer {
    padding: 8px 16px;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    font-weight: 500;
}

/* ============================================
   INPUT AREA
   ============================================ */

/* Input Container */
.va-input-container {
    padding: 16px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.va-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.va-text-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    max-height: 120px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.va-text-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.va-send-button {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.va-send-button:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.va-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.va-input-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 8px;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.va-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-lg);
    color: #7f1d1d;
}

.va-error-icon {
    stroke: currentColor;
    flex-shrink: 0;
    margin-top: 2px;
}

.va-error-content {
    flex: 1;
}

.va-error-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.va-error-text {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* ============================================
   SCROLLBAR & RESPONSIVE
   ============================================ */

/* Scrollbar Styling */
.va-messages-container::-webkit-scrollbar {
    width: 6px;
}

.va-messages-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.va-messages-container::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
}

.va-messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 480px) {
    .va-chat-window {
        width: calc(100vw - 48px);
        height: 70vh;
        bottom: 24px;
        right: 24px;
    }
    
    .va-message-card {
        max-width: 90%;
    }
    
    .va-welcome-card {
        max-width: 90%;
    }
}

/* Ensure search results work with avatar layout */
.va-message.assistant .va-message-content-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================================
   MAIN CONTENT SEARCH RESULTS
   ============================================ */

/* Search Loading in Main Content */
.va-search-main-loading {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.va-search-main-header {
    padding: 24px 32px;
    background: var(--primary-gradient);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.va-search-main-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.va-search-main-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.va-search-loading-indicator {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.va-search-loading-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.va-search-loading-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: searchLoading 1.4s infinite ease-in-out both;
}

.va-search-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.va-search-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.va-search-loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes searchLoading {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.4;
    }
    40% { 
        transform: scale(1.1);
        opacity: 1;
    }
}

.va-search-loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Combined Search Results in Main Content */
.va-search-main-results {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    overflow: hidden;
}

.va-search-main-combined {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Chat Response Section */
.va-search-chat-response {
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.va-search-response-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.va-search-response-avatar .va-avatar-gradient {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-md);
}

.va-search-response-info {
    flex: 1;
}

.va-search-response-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
}

.va-search-response-time {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.va-search-response-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.va-search-response-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.va-search-response-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.va-search-count-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Search Results Section */
.va-search-results-section {
    padding: 32px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.va-search-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.va-search-results-title {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.va-search-results-icon {
    stroke: var(--accent-color);
}

.va-search-results-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 42px; /* Align with title including icon */
}

.va-search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.va-search-result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.va-search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.va-result-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.va-result-rank {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.va-result-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
}

.va-result-title a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.va-result-title a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.va-result-url {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success-color);
    font-size: 14px;
    margin-bottom: 12px;
}

.va-result-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.va-result-link:hover {
    text-decoration: underline;
}

.va-result-snippet {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.va-result-actions {
    display: flex;
    justify-content: flex-end;
}

/* No Results */
.va-search-no-results {
    padding: 48px 32px;
    text-align: center;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.va-no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.va-no-results-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.va-no-results-text {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Continue in Chat Section */
.va-search-continue-section {
    padding: 40px 32px;
    padding-top: 15px;
    background: linear-gradient(135deg, var(--primary-gradient) 0%, var(--secondary-gradient) 100%);
    color: white;
    text-align: center;
}

.va-search-continue-content {
    max-width: 500px;
    margin: 0 auto;
}

.va-search-continue-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.va-search-continue-text {
    margin: 0 0 32px 0;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.va-search-continue-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: white;
    color: var(--accent-color);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.va-search-continue-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    background: var(--bg-primary);
}

.va-continue-icon {
    stroke: var(--accent-color);
}

/* Error State */
.va-search-main-error {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    padding: 40px;
    text-align: center;
}

.va-search-error-content {
    max-width: 400px;
    margin: 0 auto;
}

.va-search-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.va-search-error-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.va-search-error-text {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.va-search-error-button {
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.va-search-error-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .va-search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .va-search-main-header,
    .va-search-chat-response,
    .va-search-results-section,
    .va-search-continue-section {
        padding: 24px;
    }
    
    .va-search-main-title {
        font-size: 20px;
        color: white;
    }
    
    .va-search-response-title {
        font-size: 16px;
    }
    
    .va-search-continue-button {
        width: 100%;
        justify-content: center;
    }
}