/* Medicare Part D Dashboard - 46Brooklyn Professional Styling */

/* Import Google Fonts - 46Brooklyn uses clean, professional fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

/* Root Variables - Updated 46Brooklyn Brand Colors */
:root {
    --primary-color: #1a365d;        /* Deep navy blue - 46Brooklyn primary */
    --secondary-color: #2c5282;      /* Medium blue */
    --accent-color: #ed8936;         /* Orange accent - 46Brooklyn signature */
    --accent-dark: #dd7324;          /* Darker orange for hover states */
    --background-primary: #f8fafc;   /* Very light gray background */
    --background-secondary: #ffffff; /* Pure white */
    --background-card: #ffffff;      /* Card background */
    --text-primary: #1a202c;         /* Dark gray text */
    --text-secondary: #4a5568;       /* Medium gray text */
    --text-muted: #718096;           /* Light gray text */
    --border-color: #e2e8f0;         /* Light border */
    --border-radius: 8px;            /* Slightly more rounded */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --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);
    --navy-gradient: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    --orange-gradient: linear-gradient(135deg, #ed8936 0%, #dd7324 100%);
    --light-gradient: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

/* Social Media Icons Hover Effects */
.mantine-ActionIcon-root {
    transition: all 0.3s ease !important;
}

.mantine-ActionIcon-root:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Logo hover effect */
a[title*="46brooklyn"] img:hover {
    opacity: 0.8 !important;
    transform: scale(1.02) !important;
}

/* Footer styling */
.footer-social-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer-social-icons .mantine-ActionIcon-root {
    border-radius: 50% !important;
    background-color: transparent !important;
    border: 1px solid var(--border-color) !important;
}

.footer-social-icons .mantine-ActionIcon-root:hover {
    background-color: var(--background-primary) !important;
    border-color: var(--accent-color) !important;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 400;
}

/* 46Brooklyn Professional Header */
.header-section {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--orange-gradient);
    z-index: 1;
}

.main-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* 46Brooklyn Brand Styling */
.brooklyn-brand {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-family: 'Source Sans Pro', sans-serif !important;
}

.brooklyn-accent {
    color: var(--accent-color) !important;
    font-weight: 600 !important;
}

/* Enhanced Card Styling */
.brooklyn-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.brooklyn-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.brooklyn-card-header {
    background: var(--navy-gradient) !important;
    color: white !important;
    border-bottom: 3px solid var(--accent-color) !important;
    position: relative;
}

.brooklyn-card-header-title {
    color: white !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    font-weight: 600 !important;
}

/* Professional Paper Components */
.brooklyn-paper {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.brooklyn-paper:hover {
    box-shadow: var(--shadow-md);
}

.brooklyn-paper-orange {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%) !important;
    border: 2px solid var(--accent-color) !important;
    border-left: 6px solid var(--accent-color) !important;
}

/* Enhanced Badge Styling */
.brooklyn-badge {
    background: var(--orange-gradient) !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
}

.brooklyn-badge-outline {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    font-weight: 600 !important;
}

/* Professional AG Grid Styling */
.ag-theme-alpine {
    --ag-background-color: var(--background-card);
    --ag-header-background-color: var(--primary-color);
    --ag-header-foreground-color: white;
    --ag-odd-row-background-color: #f8fafc;
    --ag-border-color: var(--border-color);
    --ag-row-hover-color: rgba(26, 54, 93, 0.05);
    --ag-selected-row-background-color: rgba(26, 54, 93, 0.1);
    --ag-font-family: 'Inter', sans-serif;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ag-theme-alpine .ag-header {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
}

.ag-theme-alpine .ag-header-cell {
    font-size: 13px !important;
    font-weight: 600 !important;
}

.ag-theme-alpine .ag-cell {
    font-family: 'Inter', sans-serif;
    font-size: 12px !important;
    border-color: var(--border-color) !important;
}

.ag-theme-alpine .ag-row:hover {
    background-color: rgba(26, 54, 93, 0.03) !important;
}

/* Enhanced Chart Container */
.partd-chart-container {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-color);
    transition: all 0.2s ease;
}

.partd-chart-container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Professional Plotly Styling */
.js-plotly-plot .plotly .modebar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 6px !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
    right: 15px !important;
    top: 15px !important;
}

.js-plotly-plot .plotly .modebar-btn {
    color: var(--text-secondary) !important;
    transition: all 0.2s ease !important;
    border-radius: 4px !important;
}

.js-plotly-plot .plotly .modebar-btn:hover {
    color: var(--primary-color) !important;
    background-color: rgba(26, 54, 93, 0.1) !important;
}

/* 46Brooklyn Button Styling */
.brooklyn-button {
    background: var(--orange-gradient) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    border-radius: var(--border-radius) !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.brooklyn-button:hover {
    background: var(--accent-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Icon Styling */
.brooklyn-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Professional Layout Spacing */
.main-container {
    background-color: var(--background-primary);
    min-height: 100vh;
    padding: 1rem;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.875rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .brooklyn-card {
        margin-bottom: 1rem;
    }
    
    .partd-chart-container {
        padding: 1rem;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .main-container {
        padding: 0.5rem;
    }
}

/* Professional Focus States */
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading States */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
}

/* Print Optimization */
@media print {
    .brooklyn-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    body {
        background-color: white;
    }
    
    .brooklyn-card-header {
        background: var(--primary-color) !important;
        color: white !important;
    }
}

/* Enhanced UX Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

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

/* Apply smooth animations to components */
.brooklyn-card, .brooklyn-paper {
    animation: fadeIn 0.3s ease-out;
}

.brooklyn-button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.brooklyn-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.15) !important;
}

/* Loading state improvements */
.dash-loading {
    position: relative;
}

.dash-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--border-radius);
    z-index: 999;
    animation: fadeIn 0.2s ease-out;
}
