/* BotFlo App - Global Styles */

/* Professional Modern Color System */
:root {
    /* Primary Brand Colors - Deep Blue Professional */
    --primary: #1e40af;        /* Deep blue - professional and trustworthy */
    --primary-dark: #1e3a8a;   /* Darker blue for hover states */
    --primary-light: #3b82f6;  /* Lighter blue for accents */
    --primary-50: #eff6ff;     /* Very light blue for backgrounds */
    --primary-100: #dbeafe;    /* Light blue for subtle accents */
    
    /* Secondary Colors - Professional Teal */
    --secondary: #0d9488;      /* Professional teal - modern and clean */
    --secondary-dark: #0f766e; /* Darker teal */
    --secondary-light: #14b8a6; /* Lighter teal */
    
    /* Accent Colors */
    --accent: #ea580c;         /* Professional orange - energetic but not overwhelming */
    --accent-light: #fb923c;   /* Lighter orange */
    
    /* Status Colors */
    --success: #059669;        /* Professional green */
    --success-light: #10b981;  /* Lighter green */
    --warning: #d97706;        /* Professional amber */
    --error: #dc2626;          /* Professional red */
    --info: var(--primary);    /* Use primary for info */
    
    /* Neutral Colors - High Contrast Professional */
    --white: #ffffff;
    --black: #000000;
    --dark: #111827;           /* Professional dark - easier on eyes than pure black */
    --gray-50: #f9fafb;        /* Subtle background */
    --gray-100: #f3f4f6;       /* Light background */
    --gray-200: #e5e7eb;       /* Border color */
    --gray-300: #d1d5db;       /* Disabled elements */
    --gray-400: #9ca3af;       /* Placeholder text */
    --gray-500: #6b7280;       /* Secondary text */
    --gray-600: #4b5563;       /* Primary text on light backgrounds */
    --gray-700: #374151;       /* Dark text */
    --gray-800: #1f2937;       /* Very dark text */
    --gray-900: #111827;       /* Darkest text */
    
    /* Professional Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
    
    /* Professional Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Professional Borders */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-2xl: 2rem;
    --border-radius-full: 9999px;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    /* App Layout */
    --header-height: 80px;
    --mobile-header-height: 70px;
    --sidebar-width: 280px;
    --mobile-sidebar-width: 100vw;
    --max-content-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.5s ease;
    
    /* Responsive Design - Enhanced for PC/Desktop */
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
    --desktop-breakpoint: 1280px;
    --large-desktop-breakpoint: 1536px;
    
    /* Responsive Spacing */
    --space-mobile: 1rem;
    --space-tablet: 1.5rem;
    --space-desktop: 2rem;
    --space-large-desktop: 3rem;
    
    /* Responsive Typography */
    --text-xs-desktop: 0.875rem;
    --text-sm-desktop: 1rem;
    --text-base-desktop: 1.125rem;
    --text-lg-desktop: 1.25rem;
    --text-xl-desktop: 1.5rem;
    --text-2xl-desktop: 2rem;
    --text-3xl-desktop: 2.5rem;
    --text-4xl-desktop: 3.5rem;
    
    /* Container Widths for Different Screen Sizes */
    --container-mobile: 100%;
    --container-tablet: 90%;
    --container-desktop: 1200px;
    --container-large-desktop: 1400px;
    
    /* Header Heights */
    --header-height-mobile: 60px;
    --header-height-desktop: 80px;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
    min-height: 100vh;
    padding-top: var(--header-height);
    transition: all var(--transition-base);
}

/* App Layout */
.app-container {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.app-section {
    margin-bottom: var(--space-16);
}

/* Typography System */
.h1, h1 {
    font-size: var(--font-size-4xl);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--gray-900);
}

.h2, h2 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-5);
    color: var(--gray-900);
}

.h3, h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

.h4, h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-3);
    color: var(--gray-800);
}

.text-lead {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    line-height: 1.7;
}

.text-muted {
    color: var(--gray-500);
}

.text-small {
    font-size: var(--font-size-sm);
}

.text-xs {
    font-size: var(--font-size-xs);
}

/* Professional Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 120px;
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

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

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

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

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--success-light);
    border-color: var(--success-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-50);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
    min-height: 52px;
    border-radius: var(--border-radius-md);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    min-height: 36px;
    border-radius: var(--border-radius-sm);
}

.btn-full {
    width: 100%;
}

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

/* Modern Card System */
.card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Professional Image Placeholders */
.product-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-4xl);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    position: relative;
    overflow: hidden;
}

.product-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.product-image-placeholder .emoji {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Professional Avatar System */
.user-avatar-pro {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.user-avatar-pro::before {
    content: '🤖';
    position: relative;
    z-index: 1;
}

/* Icon System for Professional Look */
.pro-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--border-radius);
    background: var(--primary-50);
    color: var(--primary);
    font-size: var(--font-size-lg);
    margin-right: var(--space-2);
}

.pro-icon.success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.pro-icon.accent {
    background: rgba(234, 88, 12, 0.1);
    color: var(--accent);
}

.pro-icon.secondary {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}

/* Modern Grid System */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Modern Form Elements */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
    background: var(--white);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alerts */
.alert {
    padding: var(--space-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-4);
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--success);
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: var(--error);
    color: #991b1b;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--info);
    color: #1e40af;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: var(--space-2) 0;
    display: none;
    z-index: 1000;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    text-decoration: none;
    color: var(--gray-500);
    font-size: var(--font-size-xs);
    transition: all var(--transition-base);
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-nav-item i {
    font-size: var(--font-size-lg);
}

/* Enhanced Responsive Design System */

/* Base responsive container */
.container {
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    padding: 0 var(--space-mobile);
}

/* Responsive grid system */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Responsive text sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

/* Desktop Media Queries */
@media (min-width: 768px) {
    .container {
        max-width: var(--container-tablet);
        padding: 0 var(--space-tablet);
    }
    
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    
    /* Enhanced desktop typography */
    .text-xs { font-size: var(--text-xs-desktop); }
    .text-sm { font-size: var(--text-sm-desktop); }
    .text-base { font-size: var(--text-base-desktop); }
    .text-lg { font-size: var(--text-lg-desktop); }
    .text-xl { font-size: var(--text-xl-desktop); }
    .text-2xl { font-size: var(--text-2xl-desktop); }
    .text-3xl { font-size: var(--text-3xl-desktop); }
    .text-4xl { font-size: var(--text-4xl-desktop); }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--container-desktop);
        padding: 0 var(--space-desktop);
    }
    
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    
    /* Desktop-specific layouts */
    .desktop-flex-row {
        flex-direction: row;
    }
    
    .desktop-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .desktop-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Desktop spacing */
    .desktop-gap-8 { gap: 2rem; }
    .desktop-gap-12 { gap: 3rem; }
    .desktop-gap-16 { gap: 4rem; }
}

@media (min-width: 1280px) {
    .container {
        max-width: var(--container-large-desktop);
        padding: 0 var(--space-large-desktop);
    }
    
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    
    /* Large desktop enhancements */
    .large-desktop-grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .large-desktop-grid-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Enhanced button system for desktop */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 120px;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .btn {
        padding: var(--space-4) var(--space-8);
        font-size: var(--text-base-desktop);
        min-width: 150px;
    }
    
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-lg);
    }
}

/* Desktop navigation enhancements */
@media (min-width: 1024px) {
    .app-header {
        height: var(--header-height-desktop) !important;
    }
    
    .nav-links {
        display: flex !important;
        gap: var(--space-6);
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Enhanced card system for desktop */
.card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }
}

/* Desktop-specific chat interface */
@media (min-width: 1024px) {
    .chat-container {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .chat-messages {
        max-height: 500px;
        padding: var(--space-6);
    }
    
    .chat-input-area {
        padding: var(--space-4) var(--space-6);
    }
}
