/* Custom CSS for Medicare Humana Assistant */

/* Enhanced styling for healthcare theme */
:root {
    --humana-green: #4B9B47;
    --humana-dark-green: #336633;
    --humana-light-green: #E8F5E8;
    --healthcare-blue: #0066CC;
    --medicare-red: #C9302C;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-foreground);
}

/* Enhanced chat bubbles */
.message-bubble {
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Professional healthcare styling for buttons */
button {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Primary button enhancement */
button[data-variant="primary"] {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    box-shadow: 0 2px 4px rgba(75, 155, 71, 0.2);
}

button[data-variant="primary"]:hover {
    box-shadow: 0 4px 8px rgba(75, 155, 71, 0.3);
}

/* Input field styling */
input, textarea {
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--input);
}

input:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(75, 155, 71, 0.1);
}

/* Healthcare-specific styling */
.healthcare-badge {
    background: var(--humana-light-green);
    color: var(--humana-dark-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Loading animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Professional card styling */
.card {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Healthcare-specific color classes */
.text-medicare {
    color: var(--medicare-red);
}

.text-humana {
    color: var(--humana-green);
}

.bg-humana-light {
    background-color: var(--humana-light-green);
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
    }
    
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Professional sidebar styling */
.sidebar {
    background: var(--sidebar-background);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-item {
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
}

/* Source citation styling */
.source-citation {
    font-size: 12px;
    color: var(--muted-foreground);
    padding: 8px 12px;
    background: var(--muted);
    border-radius: 6px;
    margin-top: 8px;
    border-left: 3px solid var(--primary);
}

/* Healthcare trust indicators */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--humana-light-green) 0%, transparent 100%);
    border-radius: 8px;
    font-size: 14px;
    color: var(--humana-dark-green);
}

/* Accessibility improvements */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles for healthcare documentation */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
    
    .message-bubble {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* Login Page Styling */
.cl-auth-page {
    justify-content: center !important;
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(75, 155, 71, 0.1) 0%, 
        rgba(255, 255, 255, 0.95) 50%, 
        rgba(75, 155, 71, 0.05) 100%
    ) !important;
}

/* Fallback background if custom image fails to load */
.cl-auth-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #f8f9fa 0%, 
        #e8f5e8 50%, 
        #f8f9fa 100%
    );
    z-index: -1;
}

.cl-auth-page > div {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    z-index: 10;
    position: relative;
}

/* Hide Chainlit branding on login page */
.cl-auth-page svg {
    display: none !important;
}

/* Hide the large Chainlit logo on sign-in */
.cl-auth-page > div > div:last-child {
    display: none !important;
}

/* Alternative: Hide any SVG that's too large on auth page */
.cl-auth-page svg[width="222"],
.cl-auth-page svg[height="222"] {
    display: none !important;
}

/* This rule is now handled above */

/* Custom Humana logo on login page */
.cl-auth-page > div::before {
    content: "";
    display: block;
    width: 200px;
    height: 80px;
    background: url('/public/logo_light.png') no-repeat center;
    background-size: contain;
    margin: 0 auto 2rem auto;
    position: relative;
    z-index: 20;
}

/* More specific selectors to hide Chainlit branding */
[data-test="chainlit-logo"],
.chainlit-logo,
img[alt*="Chainlit"],
svg[aria-label*="Chainlit"] {
    display: none !important;
}

/* Hide the decorative background image/logo on auth page */
.cl-auth-page > div > :last-child:not(form):not(button) {
    display: none !important;
}

/* Center the login form properly */
.cl-auth-page > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* Style the login form container */
.cl-auth-page form {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Add Humana branding to the login page */
.cl-auth-page h1,
.cl-auth-page h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Style the login button with Humana colors */
.cl-auth-page button[type="submit"] {
    background: var(--primary) !important;
    color: white !important;
    width: 100%;
    padding: 12px !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cl-auth-page button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 155, 71, 0.3);
}