/* ================================
   FPL AI Chatbot - Dedicated Styles
   ================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-500: #667eea;
    --primary-600: #5a67d8;
    --primary-700: #4c51bf;
    --secondary-500: #764ba2;
    --secondary-600: #6b46c1;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    
    /* Dark Theme */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f25;
    --bg-tertiary: #232931;
    --bg-quaternary: #2d343f;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    
    /* Text */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-tertiary: rgba(255, 255, 255, 0.55);
    --text-accent: #667eea;
    
    /* Borders */
    --border-primary: rgba(255, 255, 255, 0.15);
    --border-secondary: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(102, 126, 234, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.25);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(147, 51, 234, 0.06) 0%, transparent 50%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ================================
   HEADER
   ================================ */

.chat-header {
    height: 70px !important;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    backdrop-filter: blur(20px);
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000 !important;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1;
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-center {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }
}

/* ================================
   MODE TOGGLE
   ================================ */

.mode-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    flex: 0 0 auto;
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.mode-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    user-select: none;
    cursor: pointer;
}

.mode-label.active {
    color: var(--text-accent);
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-secondary);
    border-radius: 14px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    padding: 2px;
}

.toggle-slider:hover {
    border-color: var(--border-accent);
}

.toggle-knob {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-knob::before {
    content: "⚡";
    font-size: 8px;
    color: white;
    transition: all var(--transition-normal);
}

input:checked + .toggle-slider {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--border-accent);
}

input:checked + .toggle-slider .toggle-knob {
    transform: translateX(22px);
    background: var(--gradient-secondary);
}

input:checked + .toggle-slider .toggle-knob::before {
    content: "🧠";
    font-size: 10px;
}

.mode-description {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.8;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.nav-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-accent);
    color: var(--text-accent);
    transform: translateY(-1px);
}

/* ================================
   MAIN CHAT AREA
   ================================ */

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--space-lg);
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-xl) 0;
    scroll-behavior: smooth;
    min-height: 0;
}

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

.message-wrapper {
    margin-bottom: var(--space-xl);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message {
    display: flex;
    gap: var(--space-md);
    max-width: 100%;
}

.user-wrapper {
    justify-content: flex-end;
}

.user-wrapper .message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
}

.bot-message .message-avatar {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.user-message .message-avatar {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    color: var(--text-accent);
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.user-wrapper .message-content {
    max-width: 70%;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.sender-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.message-text {
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    color: var(--text-primary);
    line-height: 1.7;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.user-wrapper .message-text {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* Link styles for clickable news sources */
.message-text a {
    color: #60a5fa !important;
    text-decoration: underline;
    transition: color var(--transition-fast);
    word-break: break-word;
    hyphens: auto;
}

.message-text a:hover {
    color: #93c5fd !important;
    text-decoration: none;
}

/* Special styling for news source links */
.message-text a[href*="news.google.com"],
.message-text a[href*="bbc.com"],
.message-text a[href*="skysports.com"],
.message-text a[href*="yahoo.com"],
.message-text a[href*="espn.com"],
.message-text a[href*="goal.com"] {
    background: rgba(96, 165, 250, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 2px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: 0.9em;
}

.message-text a[href*="news.google.com"]:hover,
.message-text a[href*="bbc.com"]:hover,
.message-text a[href*="skysports.com"]:hover,
.message-text a[href*="yahoo.com"]:hover,
.message-text a[href*="espn.com"]:hover,
.message-text a[href*="goal.com"]:hover {
    background: rgba(96, 165, 250, 0.2);
    transform: translateY(-1px);
}

/* For user messages, make links white */
.user-wrapper .message-text a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: underline;
}

.user-wrapper .message-text a:hover {
    color: white !important;
}

/* ================================
   WELCOME MESSAGE CONTENT
   ================================ */

.welcome-intro h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.capabilities h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.capability-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.capability-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.capability-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.capability-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.capability-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.capability-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.quick-start {
    border-top: 1px solid var(--border-secondary);
    padding-top: var(--space-xl);
}

.quick-start h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.prompting-guide {
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.prompting-guide p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.prompt-examples h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.prompt-examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prompt-examples li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    line-height: 1.5;
}

.prompt-examples li:last-child {
    border-bottom: none;
}

.prompt-examples strong {
    color: var(--text-accent);
    font-weight: 600;
}

.example-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.example-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

.example-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.example-btn i {
    font-size: 1rem;
    opacity: 0.8;
}

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

.input-container {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-secondary);
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.input-wrapper {
    max-width: 100%;
}

.input-box {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    background: var(--bg-surface);
    border: 2px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    transition: all var(--transition-normal);
}

.input-box:focus-within {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-box textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    font-family: inherit;
}

.input-box textarea::placeholder {
    color: var(--text-tertiary);
}

.input-box textarea:focus {
    outline: none;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.attachment-btn,
.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.attachment-btn {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.attachment-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.send-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

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

.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    padding: 0 var(--space-sm);
    gap: var(--space-lg);
}

.footer-left {
    flex: 1;
}

.character-count {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.quick-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-action:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-accent);
    color: var(--text-accent);
}

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

.typing-indicator-container {
    position: fixed;
    bottom: 120px;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 90%;
    width: fit-content;
    min-width: 300px;
}

.typing-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.typing-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.typing-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

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

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

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* ================================
   PROCESSING FEEDBACK
   ================================ */

/* Processing input state */
.input-box textarea.processing {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
    background: rgba(102, 126, 234, 0.05) !important;
}

/* Processing Toast */
.processing-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-left: 3px solid var(--primary-500);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    opacity: 0;
    transition: all var(--transition-normal);
    backdrop-filter: blur(20px);
    min-width: 250px;
}

.processing-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top: 2px solid var(--primary-500);
    border-radius: 50%;
    animation: toastSpin 1s linear infinite;
}

@keyframes toastSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure spinner animation is defined globally */
.toast-spinner {
    animation: toastSpin 1s linear infinite !important;
}

/* Send button processing state */
.send-btn.processing {
    background: rgba(102, 126, 234, 0.6) !important;
    transform: scale(0.95);
    transition: all var(--transition-fast);
}

/* Enhanced typing indicator for immediate feedback */
.typing-indicator-container.immediate {
    display: flex !important;
    animation: slideUpFade 0.3s ease-out;
}

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

/* Mobile adjustments for toast */
@media (max-width: 768px) {
    .processing-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .processing-toast.show {
        transform: translateY(0);
    }
}

/* ================================
   LOADING OVERLAY
   ================================ */

.loading-overlay {
    position: fixed !important;
    inset: 0;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: -1 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-secondary);
    border-top: 3px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .chat-container {
        padding: 0 var(--space-md);
    }
    
    .chat-header {
        padding: 0 var(--space-md);
        height: 60px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .input-footer {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
    }
    
    .footer-left {
        order: 2;
    }
    
    .mode-toggle-container {
        order: 1;
    }
    
    .capability-cards {
        grid-template-columns: 1fr;
    }
    
    .example-buttons {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .user-wrapper .message-content {
        max-width: 85%;
    }
    
    .input-container {
        padding: var(--space-lg) 0;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .typing-indicator-container {
        bottom: 100px;
        left: var(--space-sm);
        right: var(--space-sm);
    }
    
    .typing-indicator {
        min-width: 280px;
        max-width: 100%;
    }
    
    .typing-text {
        max-width: 200px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .chat-header {
        flex-direction: row;
        height: 60px;
        padding: var(--space-md);
        gap: var(--space-sm);
        flex-shrink: 0;
    }
    
    .header-center {
        display: none;
    }
    
    .header-right {
        display: flex;
        gap: var(--space-sm);
    }
    
    .input-footer {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
    
    .footer-left {
        order: 2;
    }
    
    .mode-toggle-container {
        order: 1;
    }
    
    .mode-description {
        font-size: 0.8rem;
    }
    
    .messages-container {
        padding: var(--space-lg) 0;
        min-height: 0;
    }
    
    .message-text {
        padding: var(--space-md);
    }
    
    .welcome-intro h2 {
        font-size: 1.5rem;
    }
    
    .capability-card {
        padding: var(--space-md);
    }
    
    .input-container {
        position: relative;
        flex-shrink: 0;
        z-index: 100;
    }
} 