/* Medical Chase - Custom Styles */
/* Color palette and custom variables for Tailwind */

:root {
    /* Color Palette - Neutral Modern */
    --color-bg-primary: #FAFAFA;
    --color-bg-secondary: #FFFFFF;
    --color-bg-tertiary: #F5F5F5;
    --color-text-primary: #1A202C;
    --color-text-secondary: #4A5568;
    --color-text-muted: #718096;
    --color-accent-blue: #2C5282;
    --color-accent-blue-light: #3182CE;
    --color-border: #E2E8F0;
    --color-success: #38A169;
    --color-error: #E53E3E;
    
    /* Typography */
    --font-family-base: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-blue);
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}

/* Chat Bubbles */
.chat-message {
    animation: fadeInUp 0.3s ease-out;
}

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

.user-message {
    background: linear-gradient(135deg, #3182CE 0%, #2C5282 100%);
    color: white;
    border-radius: 1rem;
    border-top-right-radius: 0.25rem;
    padding: 0.75rem 1rem;
    max-width: 90%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.2);
}

@media (min-width: 768px) {
    .user-message {
        max-width: 75%;
    }
}

.assistant-message {
    background: #F7FAFC;
    color: var(--color-text-primary);
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    padding: 0.75rem 1rem;
    max-width: 90%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .assistant-message {
        max-width: 75%;
    }
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: var(--color-accent-blue-light);
    background-color: rgba(49, 130, 206, 0.05);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--color-accent-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Typing Indicator */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent-blue);
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite;
}

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

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

@keyframes typing-pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3182CE 0%, #2C5282 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 82, 130, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Form Controls */
input[type="text"],
input[type="email"],
textarea,
select {
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    font-family: var(--font-family-base);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent-blue-light);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #FED7D7;
    color: #C53030;
    border: 1px solid #FC8181;
}

.alert-success {
    background-color: #C6F6D5;
    color: #276749;
    border: 1px solid #68D391;
}

/* Responsive Typography */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #3182CE 0%, #2C5282 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-medical {
    box-shadow: 0 10px 30px rgba(44, 82, 130, 0.15);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Smooth transitions for page elements */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

