html, body {
    font-family: 'Roboto', sans-serif;
}

.mermaid {
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mud-main-content {
    padding-top: 64px;
}

@media (max-width: 960px) {
    .mud-main-content {
        padding-top: 56px;
    }
}

/* GCBIREAU Process Mapper - Custom Styles v2.0 */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --gcb-primary: #667eea;
    --gcb-secondary: #764ba2;
    --gcb-success: #10B981;
    --gcb-warning: #F59E0B;
    --gcb-error: #EF4444;
    --gcb-info: #3B82F6;
    
    /* Gradients */
    --gcb-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gcb-gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gcb-gradient-warning: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gcb-gradient-info: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

* {
    font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Smooth appearance */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Card Enhancements */
.mud-paper {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mud-paper:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Gradient Buttons */
.gcb-btn-gradient {
    background: var(--gcb-gradient-primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.gcb-btn-gradient:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Mermaid Diagram Styling */
#mermaid-container, .mermaid-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    min-height: 400px;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    display: block;
}

.mermaid-container svg,
.mermaid-container > svg {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 400px !important;
    margin: 0 auto;
    background: white;
}

.mermaid-container pre.mermaid,
.mermaid-container pre {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Interactive Node Styling */
.node rect,
.node circle,
.node polygon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: filter 0.2s ease, stroke 0.2s ease;
}

.node:hover rect,
.node:hover circle,
.node:hover polygon {
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
    stroke: #6366F1 !important;
    stroke-width: 2px !important;
}

.node {
    cursor: grab;
    user-select: none;
}

.node:active {
    cursor: grabbing;
}

/* Diagram scroll wrapper */
.diagram-scroll-wrapper {
    position: relative;
}

.diagram-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.diagram-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.diagram-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.diagram-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Edge/Arrow Styling */
.edgePath path {
    stroke-width: 2px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.arrowheadPath {
    fill: #6366F1 !important;
}

/* Chat Messages */
.chat-message-user {
    background: var(--gcb-gradient-primary);
    color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    margin: 8px 0;
    max-width: 80%;
    margin-left: auto;
    animation: slideInRight 0.3s ease-out;
}

.chat-message-ai {
    background: #f5f5f5;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    margin: 8px 0;
    max-width: 80%;
    animation: fadeIn 0.3s ease-out;
}

/* Loading States */
.gcb-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Stats Cards */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    background: white;
    border-left: 4px solid var(--gcb-primary);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gcb-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gcb-secondary);
}

/* Language Selector Flag Emoji */
.flag-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 960px) {
    .mud-grid-item {
        padding: 8px !important;
    }
    
    #mermaid-container {
        padding: 16px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --gcb-bg: #1a1a1a;
        --gcb-surface: #2d2d2d;
        --gcb-text: #e0e0e0;
    }
}

/* 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;
}

/* Print Styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-button {
        display: none !important;
    }
    
    #mermaid-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* GCBIREAU Branding */
.gcb-logo {
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gcb-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gcb-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gcb-gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
