/**
 * ============================================
 * RECOMMENDATIONS.CSS
 * ============================================
 *
 * Dedicated stylesheet for product recommendations sidebar
 *
 * PURPOSE:
 * - Provides production-ready styles for the recommendations sidebar
 * - Implements industry-standard 70/30 chat-to-sidebar layout ratio
 * - Fixes scrolling issues with proper height constraints
 * - Ensures professional alignment and spacing throughout
 *
 * KEY FEATURES:
 * 1. CSS Variables: Centralized design system for easy customization
 * 2. Proper Scrolling: Independent scroll areas prevent parent interference
 * 3. Accessibility: Keyboard navigation and ARIA attributes supported
 * 4. Responsive: Smooth animations and hover states
 * 5. Toast Notifications: User feedback for copy-to-clipboard actions
 *
 * ARCHITECTURE:
 * - Uses 8px base grid system (0.5rem increments) for consistent spacing
 * - 70/30 split between chat and sidebar (industry best practice)
 * - Height calculations use CSS variables for maintainability
 * - Prevents scroll bubbling with touch-action and overscroll-behavior
 *
 * AUTHOR: Lead Full Stack Developer
 * LAST UPDATED: 2025-11-23
 */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    /* Colors - Shared with chat */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --recommendation-color: #10b981;
    --recommendation-hover: #059669;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --border-focus: #6366f1;

    /* Spacing System - 8px base grid */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */

    /* Recommendation Colors */
    --rec-bg-primary: #f0fdf4;
    --rec-bg-secondary: #ffffff;
    --rec-border: #bbf7d0;
    --rec-border-hover: #86efac;
    --rec-text-primary: #065f46;
    --rec-text-secondary: #059669;
    --rec-number-bg: #10b981;
    --rec-number-text: #ffffff;
    --rec-reasoning-bg: #fef3c7;
    --rec-reasoning-text: #92400e;

    /* Shadows */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --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);

    /* Border Radius */
    --radius: 0.75rem;
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */

    /* Layout - Industry standard 70/30 split */
    --chat-main-width: 70%;
    --sidebar-width: 30%;

    /* Heights - Calculated from viewport minus header */
    --header-height: 80px;
    --tab-nav-height: 60px;
    --chat-input-height: 80px;
    --sidebar-header-height: 60px;
    --chat-interface-height: calc(100vh - var(--header-height) - var(--tab-nav-height) + 20px);
    --sidebar-content-height: calc(100vh - var(--header-height) - var(--sidebar-header-height) - 60px);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* ============================================
   Base Chat Styles
   ============================================ */
.page {
    display: none;
}

.page.active {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
}

.welcome-card {
    max-width: 500px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.recommendation-badge {
    background: var(--recommendation-color);
    display: inline-block;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.session-info {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.session-info h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.id-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.id-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.id-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.id-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--background);
    padding: 0.5rem;
    border-radius: 0.25rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.recommendation-btn {
    background: var(--recommendation-color);
}

.recommendation-btn:hover:not(:disabled) {
    background: var(--recommendation-hover);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Chat Interface Layout
   ============================================ */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: var(--chat-interface-height);
    overflow: hidden;
}

.chat-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0; /* Increased from 1rem */
    box-shadow: var(--shadow);
}

.recommendation-header {
    background: linear-gradient(135deg, var(--recommendation-color), #059669);
    color: white;
    padding: 1.5rem 0; /* Make header taller */
}

.recommendation-header .chat-title,
.recommendation-header .user-info {
    color: white;
}

.recommendation-header .info-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.recommendation-header .logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.recommendation-header .logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-badge {
    background: var(--background);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

/* ============================================
   Modern Role Selector
   ============================================ */
.role-selector-modern {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.role-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.role-buttons {
    display: flex;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.role-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.625rem 1.25rem; /* Increased padding for better size */
    border-radius: var(--radius-sm);
    font-size: 0.9375rem; /* Slightly larger text */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* More space between icon and text */
    white-space: nowrap;
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.role-btn.active {
    background: white;
    color: var(--recommendation-color);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.role-btn.active:hover {
    background: white;
    color: var(--recommendation-color);
}

/* Chat container - horizontal layout with sidebar (70/30 split) */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow: hidden;
    width: 100%;
    min-height: 0;
}

.chat-main-area {
    flex: 0 0 70%;
    width: 70%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.chat-main-area .messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
    animation: messageSlide 0.3s ease-out;
}

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

/* CLIENT messages - RIGHT side (blue) */
.message.client {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.client .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.message.client .message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 1.25rem 1.25rem 0.25rem 1.25rem; /* Rounded except bottom-right */
}

.message.client .message-time {
    color: rgba(255, 255, 255, 0.85);
    text-align: right;
}

/* PHARMACIST messages - LEFT side (green) */
.message.pharmacist {
    align-self: flex-start;
    flex-direction: row;
}

.message.pharmacist .message-avatar {
    background: linear-gradient(135deg, var(--recommendation-color) 0%, #059669 100%);
    color: white;
}

.message.pharmacist .message-content {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    color: var(--text-primary);
    border: 1px solid #bbf7d0;
    border-radius: 1.25rem 1.25rem 1.25rem 0.25rem; /* Rounded except bottom-left */
}

.message.pharmacist .message-time {
    color: var(--text-secondary);
    text-align: left;
}

/* AI/System messages - CENTER */
.message.ai {
    align-self: center;
    flex-direction: row;
    max-width: 85%;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.recommendation-avatar {
    background: var(--recommendation-color);
}

.message-content {
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
    word-wrap: break-word;
    line-height: 1.6;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.typing-indicator.show {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingDot 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Input Container */
.input-container {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
}

.input-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.message-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.message-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

.send-btn {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.recommendation-send {
    background: var(--recommendation-color);
}

.recommendation-send:hover:not(:disabled) {
    background: var(--recommendation-hover);
}

.send-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.recommendation-message {
    background: #f0fdf4;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* ============================================
   Recommendations Sidebar Container
   ============================================ */
.recommendations-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent container from scrolling */
    height: 100%;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
}

.recommendations-sidebar.hidden {
    display: none;
}

/* ============================================
   Sidebar Header - Clean, Professional Design
   ============================================ */
.recommendations-header {
    padding: 0; /* Remove padding to fill full width */
    background: #ffffff; /* Clean white background */
    border-bottom: 1px solid #e5e7eb; /* Subtle border */
    flex-shrink: 0;
    min-height: var(--sidebar-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recommendations-header h3 {
    margin: 0;
    padding: var(--spacing-md) var(--spacing-lg); /* Padding on inner element */
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

/* Add subtle accent bar on the left */
.recommendations-header h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 2px;
    margin-left: calc(-1 * var(--spacing-lg) + 4px); /* Align to edge */
}

.recommendations-count {
    background: #f3f4f6;
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-md);
    margin-right: var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
}

/* ============================================
   Thinking/Loading State
   ============================================ */
.recommendations-thinking {
    padding: var(--spacing-lg);
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.recommendations-thinking.hidden {
    display: none;
}

.thinking-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

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

.recommendations-thinking p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Scrollable Content Area - KEY FIX
   ============================================ */
.recommendations-content {
    flex: 1; /* Take remaining space */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);

    /* Maximum height constraint - prevents parent from expanding */
    max-height: var(--sidebar-content-height);

    /* Smooth scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* Prevent scroll bubbling to parent */
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* Custom scrollbar styling */
.recommendations-content::-webkit-scrollbar {
    width: 8px;
}

.recommendations-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: var(--radius-sm);
}

.recommendations-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.recommendations-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================
   Individual Recommendation Items
   ============================================ */
.recommendation-item {
    background: linear-gradient(135deg, var(--rec-bg-primary) 0%, var(--rec-bg-secondary) 100%);
    border: 1px solid var(--rec-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.recommendation-item:hover {
    border-color: var(--rec-border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.recommendation-item:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Click feedback overlay */
.recommendation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.recommendation-item:active::before {
    opacity: 1;
}

/* Copy hint indicator */
.recommendation-item::after {
    content: '📋';
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 1rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.recommendation-item:hover::after {
    opacity: 0.5;
}

/* ============================================
   Recommendation Number Badge
   ============================================ */
.recommendation-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--rec-number-bg) 0%, #059669 100%);
    color: var(--rec-number-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* ============================================
   Recommendation Content
   ============================================ */
.recommendation-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    min-width: 0; /* Allow text truncation */
}

.recommendation-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--rec-text-primary);
    line-height: 1.4;
    margin: 0;
}

.recommendation-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rec-text-secondary);
    letter-spacing: -0.025em;
}

.recommendation-reasoning {
    font-size: 0.8125rem;
    color: var(--rec-reasoning-text);
    background: var(--rec-reasoning-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 3px solid #f59e0b;
    line-height: 1.5;
    margin-top: var(--spacing-xs);
}

/* ============================================
   Empty State
   ============================================ */
.recommendations-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: #9ca3af;
}

.recommendations-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.recommendations-empty p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-weight: 500;
    font-size: 0.9375rem;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out, slideOutRight 0.3s ease-in 2.7s;
    pointer-events: none;
}

.toast-notification::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================
   Layout Integration
   ============================================ */

/* Update chat container to use new ratio */
.chat-main-area {
    width: var(--chat-main-width);
}

/* Ensure proper height constraints */
.chat-interface {
    height: var(--chat-interface-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    display: flex;
    flex: 1;
    overflow: hidden; /* Prevent container from scrolling */
    min-height: 0; /* Allow flex children to shrink */
}
