/* APE Pumps Custom Styling - Professional Report Color Scheme */
:root {
    /* Material Design 3 Variables - Matching Professional Report */
    --md-primary: #1976d2;
    --md-primary-variant: #1565c0;
    --md-secondary: #4caf50;
    --md-surface: #ffffff;
    --md-surface-variant: #f8f9fa;
    --md-outline: #e0e0e0;
    --md-outline-variant: #f0f0f0;
    --md-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --md-shadow-elevated: 0 4px 16px rgba(0,0,0,0.12);
    --md-border-radius: 12px;
    --md-border-radius-large: 16px;

    /* Animation Variables */
    --animation-fast: 0.15s;
    --animation-normal: 0.3s;
    --animation-slow: 0.5s;
    --animation-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --animation-ease-out: cubic-bezier(0.0, 0, 0.2, 1);
    --animation-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Legacy Variables - Mapped to New Scheme */
    --primary-teal: #1976d2;
    --primary-teal-light: #5e92f3;
    --primary-teal-dark: #1565c0;
    --secondary-blue: #1565c0;
    --secondary-blue-light: #5e92f3;
    --secondary-blue-dark: #0d47a1;
    --accent-cyan: #1976d2;
    --accent-cyan-light: #5e92f3;
    --accent-cyan-dark: #1565c0;
    --success-green: #4caf50;
    --warning-orange: #ff9800;
    --error-red: #f44336;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
}

/* Base Typography */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Flex layout for footer positioning */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content should expand to fill available space */
main {
    flex: 1;
}

/* Footer positioning fix */
.page-footer {
    margin-top: auto;
}

/* Admin Dropdown Fixes */
#admin-dropdown {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    overflow: visible !important;
    min-width: 200px !important;
    max-height: none !important;
    z-index: 999999 !important;
    position: absolute !important;
}

#admin-dropdown li {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    line-height: normal !important;
}

#admin-dropdown li a {
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    transition: background-color 0.2s ease !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    height: auto !important;
    white-space: nowrap !important;
}

#admin-dropdown li a:hover {
    background-color: #f5f5f5 !important;
}

#admin-dropdown li a .material-icons {
    font-size: 18px !important;
    margin-right: 12px !important;
    color: var(--md-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
}

#admin-dropdown li.divider {
    margin: 2px 0 !important;
    background-color: #e0e0e0 !important;
    height: 1px !important;
}

/* Admin Dropdown Trigger Arrow Fix */
.dropdown-trigger .material-icons.right {
    font-size: 1.2em !important;
    vertical-align: middle !important;
    margin-left: 4px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Mobile-First Responsive Design */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

/* Touch-Friendly Interactive Elements */
.btn, .btn-large, button, .waves-effect {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn:hover, .btn-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive Typography */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 500; }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); font-weight: 500; }

/* Enhanced Mobile Form Styling */
.input-field {
    margin-bottom: 24px;
}

.input-field input[type=text]:focus,
.input-field input[type=number]:focus,
.input-field input[type=email]:focus,
.input-field select:focus {
    border-bottom: 2px solid var(--md-primary);
    box-shadow: 0 1px 0 0 var(--md-primary);
}

.input-field input[type=number]:valid {
    border-bottom: 2px solid var(--success-green);
}

.input-field input[type=number]:invalid {
    border-bottom: 2px solid var(--error-red);
}

.input-field .prefix {
    color: var(--md-primary);
    font-size: 1.2rem;
    top: 0.8rem;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Core Requirements Card Styling */
#core-requirements-section .card {
    border-left: 4px solid var(--md-primary);
    background: linear-gradient(135deg, var(--md-surface) 0%, var(--md-surface-variant) 100%);
    overflow: visible !important;
}

#core-requirements-section .card-content {
    overflow: visible !important;
}

#core-requirements-section .card-title {
    font-weight: 600;
    font-size: 1.5rem;
}

#core-requirements-section .input-field {
    position: relative;
    overflow: visible !important;
}

#core-requirements-section .input-field input:focus + label {
    color: var(--md-primary) !important;
}

/* Radio button styling */
.input-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--md-primary);
}

.radio-group {
    margin-top: 8px;
}

.radio-group p {
    margin: 6px 0;
}

.radio-group label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
}

.radio-group label span {
    margin-left: 8px;
}

/* Custom radio button styling */
[type="radio"]:checked,
[type="radio"]:not(:checked) {
    position: absolute;
    opacity: 0;
}

[type="radio"]:checked + span,
[type="radio"]:not(:checked) + span {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    display: inline-block;
    height: 25px;
    line-height: 25px;
    font-size: 1rem;
    transition: .28s ease;
    user-select: none;
}

[type="radio"] + span:before,
[type="radio"] + span:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    margin: 4px;
    width: 16px;
    height: 16px;
    z-index: 0;
    transition: .28s ease;
}

[type="radio"]:not(:checked) + span:before,
[type="radio"]:not(:checked) + span:after {
    border-radius: 50%;
}

[type="radio"]:not(:checked) + span:before {
    border: 2px solid #5a5a5a;
}

[type="radio"]:not(:checked) + span:after {
    border: 2px solid #5a5a5a;
    z-index: -1;
    transform: scale(0);
}

[type="radio"]:checked + span:before {
    border: 2px solid transparent;
}

[type="radio"]:checked + span:after {
    border: 2px solid var(--md-primary);
    background-color: var(--md-primary);
    z-index: 0;
    transform: scale(.5);
    border-radius: 50%;
}

[type="radio"]:disabled:not(:checked) + span:before {
    background-color: transparent;
    border-color: rgba(0,0,0,.42);
}

[type="radio"]:disabled + span {
    color: rgba(0,0,0,.42);
}

/* Helper text styling */
.input-group .helper-text {
    font-size: 12px;
    color: rgba(0,0,0,.54);
    margin-top: 8px;
    display: block;
}

/* Mobile-Optimized Cards */
.card {
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
    margin-bottom: 20px;
    overflow: visible !important;
}



.card-content {
    padding: 20px;
}

@media (max-width: 600px) {
    .card-content {
        padding: 16px;
    }

    .input-field {
        margin-bottom: 20px;
    }

    .btn, .btn-large {
        width: 100%;
        margin-bottom: 12px;
        padding: 0 16px;
    }

    .row .col.s12 {
        padding: 0 8px;
    }
}

/* Mobile Navigation */
.nav-wrapper {
    padding: 0 16px;
}

@media (max-width: 768px) {
    .nav-wrapper {
        padding: 0 12px;
    }

    .brand-logo {
        font-size: 1.4rem !important;
        left: 12px !important;
    }

    .sidenav-trigger {
        margin: 0;
        right: 12px;
    }

    #nav-mobile li {
        padding: 0;
    }

    #nav-mobile a {
        font-size: 16px;
        padding: 0 12px;
    }
}

.brand-logo {
    font-size: clamp(1.2rem, 3vw, 1.6rem) !important;
    font-weight: 500;
}

@media (max-width: 992px) {
    .nav-wrapper .brand-logo {
        left: 16px;
        transform: none;
    }

    .nav-wrapper ul.right {
        display: none;
    }

    .sidenav-trigger {
        display: block !important;
        color: white;
    }
}

/* Navigation Enhancements - Professional Style */
.logo-nav {
    height: 40px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

nav .brand-logo {
    display: flex;
    align-items: center;
    font-weight: 300;
    font-size: 1.8rem;
    color: white;
}

nav.teal {
    background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-variant) 100%) !important;
}

/* Card Enhancements - Professional Report Style */
.card {
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--md-outline-variant);
}

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

.card-panel {
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
    border: 1px solid var(--md-outline-variant);
    background: var(--md-surface);
}

/* Section Spacing and Forced Visibility */
.section-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 2rem;
    transform: translateY(0);
    transition: all 0.3s ease;
    border-radius: 18px !important;
}

.section-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Form Enhancements - Professional Style */
.input-field input:focus + label,
.input-field input.valid + label,
.input-field textarea:focus + label,
.input-field textarea.valid + label {
    color: var(--md-primary) !important;
}

.input-field input:focus,
.input-field textarea:focus {
    border-bottom: 1px solid var(--md-primary) !important;
    box-shadow: 0 1px 0 0 var(--md-primary) !important;
}

.input-field .prefix.active {
    color: var(--md-primary);
}

/* Select Styling - Professional Theme */
.dropdown-content {
    z-index: 9999 !important;
    position: absolute !important;
    background-color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

/* Fix z-index layering for form dropdowns over contact cards */
.select-wrapper {
    position: relative !important;
    z-index: 1000 !important;
}

.select-wrapper .dropdown-content {
    z-index: 10000 !important;
    position: absolute !important;
}

/* Ensure contact card doesn't interfere with dropdowns */
.card-panel {
    position: relative;
    z-index: 1 !important;
}

/* Specific fix for Core Requirements section dropdowns */
#core-requirements-section .select-wrapper {
    z-index: 2000 !important;
}

#core-requirements-section .dropdown-content {
    z-index: 10001 !important;
    position: absolute !important;
}

/* Ensure subsequent sections don't overlay dropdowns */
#contact-section {
    position: relative;
    z-index: 1 !important;
}

#contact-section .card {
    position: relative;
    z-index: 1 !important;
}

.dropdown-content li > a,
.dropdown-content li > span {
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
}

.dropdown-content li:hover,
.dropdown-content li.active {
    background-color: var(--md-primary);
    color: white;
}

/* Ensure select wrapper has proper positioning */
.select-wrapper {
    position: relative !important;
}

.select-wrapper input.select-dropdown {
    z-index: 1 !important;
}

/* Fix for mobile dropdowns */
@media (max-width: 768px) {
    .dropdown-content {
        max-height: 250px;
        width: 100% !important;
        left: 0 !important;
    }
}

/* Button Enhancements - Professional Report Style */
.btn,
.btn-large {
    border-radius: var(--md-border-radius);
    text-transform: none;
    font-weight: 500;
    box-shadow: var(--md-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
.btn-large:hover {
    box-shadow: var(--md-shadow-elevated);
    transform: translateY(-1px);
}

.btn.teal, .btn-large.teal {
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-variant)) !important;
}

.btn.teal:hover, .btn-large.teal:hover {
    background: linear-gradient(135deg, var(--md-primary-variant), var(--md-primary)) !important;
}

/* Chart Modal Styling */
.chart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.chart-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chart-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.chart-modal-close:hover,
.chart-modal-close:focus {
    color: #000;
}

.chart-modal-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Results Page Styling - Professional Theme */
.recommended-pump {
    border: 2px solid var(--md-secondary);
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
    box-shadow: var(--md-shadow-elevated);
}

.recommended-pump .card-title {
    color: var(--md-primary) !important;
}

.alternative-pump {
    border-left: 4px solid var(--warning-orange);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alternative-pump:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-shadow-elevated);
}

/* Performance Statistics - Professional Report Style */
.performance-summary {
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: var(--md-surface);
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--md-outline-variant);
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-shadow-elevated);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--md-primary);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 500;
}

/* Chart Styling - Professional Report Theme */
.chart-container {
    background: var(--md-surface);
    border-radius: var(--md-border-radius);
    padding: 24px;
    box-shadow: var(--md-shadow);
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--md-outline-variant);
    min-height: 400px;
    display: block !important;
    visibility: visible !important;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .chart-container {
        padding: 16px;
        min-height: 300px;
        margin-bottom: 16px;
    }
}

.chart-container:hover {
    box-shadow: var(--md-shadow-elevated);
}

.chart-image {
    max-width: 100%;
    height: auto;
}

/* Plotly chart containers */
#headFlowChart, #efficiencyFlowChart, #powerFlowChart, #npshrFlowChart {
    min-height: 400px !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
}

/* Mobile chart optimizations */
@media (max-width: 768px) {
    #headFlowChart, #efficiencyFlowChart, #powerFlowChart, #npshrFlowChart {
        min-height: 300px !important;
    }

    /* Chart title responsiveness */
    .chart-container h5, .chart-container h6 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    /* Plotly modebar adjustments for mobile */
    .modebar {
        top: 10px !important;
        right: 10px !important;
    }

    .modebar-btn {
        padding: 8px !important;
    }
}

/* Mobile-Optimized Tables */
.responsive-table {
    overflow-x: auto;
    border-radius: var(--md-border-radius);
    box-shadow: var(--md-shadow);
}

@media (max-width: 768px) {
    .responsive-table {
        font-size: 0.9rem;
    }

    .responsive-table th,
    .responsive-table td {
        padding: 8px 6px;
        min-width: 120px;
    }

    .responsive-table th {
        font-size: 0.85rem;
        font-weight: 600;
    }

    /* Stack table on very small screens */
    @media (max-width: 480px) {
        .card-table {
            display: block;
            width: 100%;
            border-collapse: collapse;
        }

        .card-table thead {
            display: none;
        }

        .card-table tbody,
        .card-table tr,
        .card-table td {
            display: block;
            width: 100%;
        }

        .card-table tr {
            border: 1px solid var(--md-outline);
            border-radius: var(--md-border-radius);
            margin-bottom: 12px;
            padding: 12px;
            background: var(--md-surface);
        }

        .card-table td {
            padding: 8px 0;
            border: none;
            position: relative;
            padding-left: 40%;
        }

        .card-table td:before {
            content: attr(data-label) ": ";
            position: absolute;
            left: 6px;
            width: 35%;
            font-weight: 600;
            color: var(--md-primary);
        }
    }
}

/* Mobile-Optimized Action Buttons */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mobile-btn {
    flex: 1;
    min-width: 200px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.mobile-btn .material-icons {
    vertical-align: middle !important;
    margin-right: 8px !important;
}

@media (max-width: 600px) {
    .action-buttons-container {
        flex-direction: column;
        gap: 8px;
    }

    .mobile-btn {
        width: 100%;
        margin: 0 0 8px 0 !important;
        min-width: unset;
    }
}

/* Mobile Form Container Optimization */
@media (max-width: 600px) {
    .container {
        margin-top: 20px !important;
    }

    .section-card {
        margin-bottom: 16px;
    }

    .card-panel {
        padding: 16px !important;
    }

    h4 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .flow-text {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* Mobile Viewport Optimization */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .card-content {
        padding: 12px;
    }

    .input-field input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn {
        padding: 0 16px;
        height: 48px;
        line-height: 48px;
        font-size: 15px;
    }
}

/* LLM-Enhanced Reasoning Styles - Professional Report Theme */
.selection-reasoning {
    background: var(--md-surface-variant);
    border-left: 4px solid var(--md-primary);
    padding: 24px;
    margin: 24px 0;
    border-radius: 0 var(--md-border-radius) var(--md-border-radius) 0;
    box-shadow: var(--md-shadow);
}

.selection-reasoning h6 {
    color: var(--md-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.reasoning-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

.technical-analysis {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-border-radius);
    padding: 24px;
    margin: 24px 0;
    box-shadow: var(--md-shadow);
}

.technical-analysis h6 {
    color: var(--md-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.analysis-section {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--md-surface-variant);
    border-radius: var(--md-border-radius);
    border-left: 4px solid var(--md-primary);
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
}

.ai-enhanced-badge {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.chart-image {
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chart-image:hover {
    transform: scale(1.02);
}

/* Chart Modal */
.chart-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.chart-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    position: relative;
}

.chart-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.chart-modal-close:hover {
    color: var(--error-red);
}

.chart-modal-image {
    width: 100%;
    height: auto;
}

/* Key Benefits Styling */
.key-benefits {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--success-green);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.benefits-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.benefits-list li i {
    margin-right: 10px;
}

/* Score Badge - Professional Style */
.score-badge {
    background: var(--md-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Compact Table */
.compact-table {
    margin: 15px 0;
}

.compact-table td,
.compact-table th {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Selection Reason */
.selection-reason {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Collection Enhancement */
.collection .collection-item {
    border-bottom: 1px solid var(--border-light);
    padding: 12px 20px;
}

.collection .collection-item i {
    margin-right: 10px;
    vertical-align: middle;
}

/* Chips Enhancement */
.chip {
    border-radius: 16px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Progress Bar */
.progress {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 4px;
    background-color: transparent;
    display: none; /* Hide by default */
}

.progress .indeterminate {
    background-color: var(--accent-cyan);
}

/* Only show progress bars when explicitly enabled */
.progress.show {
    display: block;
}

/* Flash Messages Enhancement */
.card-panel i {
    vertical-align: middle;
    margin-right: 10px;
}

/* Footer Enhancement */
.page-footer {
    margin-top: 50px;
}

.page-footer h5 {
    font-weight: 300;
}

/* Responsive Adjustments */
@media only screen and (max-width: 992px) {
    .performance-summary .col {
        margin-bottom: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .chart-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
    }
}

@media only screen and (max-width: 600px) {
    .performance-summary {
        text-align: center;
    }

    .stat-box {
        margin-bottom: 15px;
    }

    nav .brand-logo {
        font-size: 1.4rem;
    }

    .logo-nav {
        height: 30px;
    }

    .btn-large {
        padding: 0 16px;
        font-size: 14px;
        height: 44px;
        line-height: 44px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Utility Classes - Professional Theme */
.text-primary {
    color: var(--md-primary) !important;
}

.text-teal {
    color: var(--md-primary) !important;
}

.bg-primary-light {
    background-color: var(--md-surface-variant) !important;
}

.bg-teal-light {
    background-color: var(--md-surface-variant) !important;
}

.border-primary {
    border-color: var(--md-primary) !important;
}

.border-teal {
    border-color: var(--md-primary) !important;
}

.shadow-1 {
    box-shadow: var(--md-shadow) !important;
}

.shadow-2 {
    box-shadow: var(--md-shadow-elevated) !important;
}

.rounded {
    border-radius: var(--md-border-radius) !important;
}

.rounded-lg {
    border-radius: var(--md-border-radius-large) !important;
}

/* Micro-Interaction Animations */

/* Button Animations */
.btn, .btn-large, .btn-small, .btn-flat {
    transition: all var(--animation-normal) var(--animation-ease);
    transform: translateZ(0);
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.btn:hover, .btn-large:hover, .btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:active, .btn-large:active, .btn-small:active {
    transform: translateY(0px);
    transition: all var(--animation-fast) var(--animation-ease);
}

/* Ripple Effect */
.btn::before, .btn-large::before, .btn-small::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width var(--animation-normal) var(--animation-ease-out), 
                height var(--animation-normal) var(--animation-ease-out);
}

.btn:active::before, .btn-large:active::before, .btn-small:active::before {
    width: 300px;
    height: 300px;
}

/* Card Animations */
.card, .card-panel {
    transition: all var(--animation-normal) var(--animation-ease);
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.card:hover, .card-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Input Field Animations */
.input-field input[type="text"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="password"]:focus,
.input-field input[type="number"]:focus,
.input-field textarea.materialize-textarea:focus {
    border-bottom: 2px solid var(--md-primary);
    box-shadow: 0 1px 0 0 var(--md-primary);
    animation: inputFocus var(--animation-normal) var(--animation-ease);
}

@keyframes inputFocus {
    from {
        border-bottom-color: #9e9e9e;
        box-shadow: 0 1px 0 0 #9e9e9e;
    }
    to {
        border-bottom-color: var(--md-primary);
        box-shadow: 0 1px 0 0 var(--md-primary);
    }
}

.input-field label {
    transition: all var(--animation-normal) var(--animation-ease);
}

.input-field label.active {
    animation: labelUp var(--animation-normal) var(--animation-ease);
}

@keyframes labelUp {
    from {
        transform: translateY(0);
        font-size: 1rem;
    }
    to {
        transform: translateY(-14px);
        font-size: 0.8rem;
    }
}

/* Navigation Animations */
.nav-wrapper {
    transition: all var(--animation-normal) var(--animation-ease);
}

.nav-wrapper .brand-logo {
    transition: all var(--animation-normal) var(--animation-ease);
}

.nav-wrapper .brand-logo:hover {
    transform: scale(1.05);
}

.nav-wrapper ul li a {
    transition: all var(--animation-fast) var(--animation-ease);
    position: relative;
}

.nav-wrapper ul li a:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-wrapper ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: rgba(255,255,255,0.8);
    transition: all var(--animation-normal) var(--animation-ease);
    transform: translateX(-50%);
}

.nav-wrapper ul li a:hover::after {
    width: 80%;
}

/* Modal Animations */
.modal {
    animation: modalFadeIn var(--animation-normal) var(--animation-ease);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Table Row Animations */
table tbody tr {
    transition: all var(--animation-fast) var(--animation-ease);
}

table tbody tr:hover {
    background-color: rgba(25, 118, 210, 0.05);
    transform: translateX(2px);
}

/* Icon Animations */
.material-icons {
    transition: all var(--animation-fast) var(--animation-ease);
}

.btn .material-icons,
.btn-large .material-icons {
    transition: all var(--animation-normal) var(--animation-ease);
}

.btn:hover .material-icons,
.btn-large:hover .material-icons {
    transform: scale(1.1);
}

/* Loading Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Clean Navigation Styling */
.nav-wrapper {
    padding: 0 24px;
}

.nav-wrapper .brand-logo {
    font-size: 1.4rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.nav-wrapper .brand-logo .logo-nav {
    height: 32px;
    margin-right: 12px;
}

.nav-wrapper ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0 16px;
    height: 64px;
    line-height: 64px;
    border-radius: 0;
}

.nav-wrapper ul li a .material-icons {
    font-size: 20px;
    margin-right: 8px;
}

.nav-wrapper ul li a:hover {
    background-color: rgba(255,255,255,0.1);
}



/* Modal Enhancements */
.modal {
    border-radius: var(--md-border-radius-large) !important;
    overflow: hidden;
}

.modal .modal-content h4 {
    color: var(--md-primary);
    font-weight: 500;
    margin-bottom: 24px;
}

.modal .modal-content .collection .collection-item {
    border: none;
    padding: 12px 16px;
    background-color: rgba(25, 118, 210, 0.03);
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all var(--animation-fast) var(--animation-ease);
}

.modal .modal-content .collection .collection-item:hover {
    background-color: rgba(25, 118, 210, 0.08);
    transform: translateX(4px);
}

.modal .modal-content .collection .collection-item .material-icons {
    color: var(--success-green);
}

/* Mobile Navigation Enhancements */
.sidenav .subheader {
    color: var(--md-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 16px 32px 8px !important;
}

.sidenav li > a {
    transition: all var(--animation-fast) var(--animation-ease);
}

.sidenav li > a:hover {
    background-color: rgba(25, 118, 210, 0.08) !important;
    transform: translateX(8px);
}

.sidenav .divider {
    background-color: var(--md-outline) !important;
    margin: 8px 0 !important;
}

/* Global Floating AI Chat Button */
#global-ai-chat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 997;
}

#global-ai-chat .btn-floating {
    background-color: #1976d2;
    box-shadow: 0 8px 16px rgba(25, 118, 210, 0.3);
    transition: all var(--animation-normal) var(--animation-ease);
}

#global-ai-chat .btn-floating:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 24px rgba(25, 118, 210, 0.4);
}

#global-ai-chat .btn-floating .material-icons {
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0%, 50%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    25%, 75% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive Floating Button */
@media only screen and (max-width: 600px) {
    #global-ai-chat {
        bottom: 20px;
        right: 20px;
    }

    #global-ai-chat .btn-floating {
        width: 56px;
        height: 56px;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Fade In Animation for Page Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp var(--animation-slow) var(--animation-ease-out);
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    animation: fadeInUp var(--animation-slow) var(--animation-ease-out) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* Form Validation Animations */
.input-field.invalid input {
    animation: shake var(--animation-normal) var(--animation-ease);
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-checkmark {
    animation: checkmark var(--animation-normal) var(--animation-bounce);
}

/* Floating Action Button Animation */
.fixed-action-btn {
    transition: all var(--animation-normal) var(--animation-ease);
}

.fixed-action-btn:hover {
    transform: scale(1.1);
}

.fixed-action-btn.active {
    transform: scale(1.1) rotate(45deg);
}

/* Chart Container Animation */
.chart-container {
    opacity: 0;
    animation: fadeInUp var(--animation-slow) var(--animation-ease) forwards;
}

.chart-container:nth-child(1) { animation-delay: 0.2s; }
.chart-container:nth-child(2) { animation-delay: 0.4s; }
.chart-container:nth-child(3) { animation-delay: 0.6s; }
.chart-container:nth-child(4) { animation-delay: 0.8s; }

/* Tooltip Animations */
.tooltipped::after {
    animation: tooltipFadeIn var(--animation-fast) var(--animation-ease);
}

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

/* Progress Bar Animation */
.progress .determinate {
    transition: width var(--animation-slow) var(--animation-ease);
}

/* Tab Animation */
.tabs .tab a {
    transition: all var(--animation-fast) var(--animation-ease);
}

.tabs .tab a:hover {
    background-color: rgba(25, 118, 210, 0.1);
}

.tabs .indicator {
    transition: all var(--animation-normal) var(--animation-ease);
}

/* Collapsible Animation */
.collapsible-header {
    transition: all var(--animation-fast) var(--animation-ease);
}

.collapsible-header:hover {
    background-color: rgba(25, 118, 210, 0.05);
}

.collapsible-body {
    transition: all var(--animation-normal) var(--animation-ease);
}

/* Mobile Sidenav Animation */
.sidenav {
    transition: transform var(--animation-normal) var(--animation-ease);
}

.sidenav li a {
    transition: all var(--animation-fast) var(--animation-ease);
}

.sidenav li a:hover {
    background-color: rgba(25, 118, 210, 0.1);
    transform: translateX(5px);
}

/* Preloader Animation */
.preloader-wrapper.active {
    animation: container-rotate 1568ms linear infinite;
}

@keyframes container-rotate {
    to { transform: rotate(360deg) }
}

/* Print Styles */
@media print {
    .nav-wrapper,
    .page-footer,
    .btn,
    .btn-large {
        display: none !important;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
    }

    .card,
    .card-panel {
        box-shadow: none !important;
        border: 1px solid var(--border-light) !important;
    }

    /* Disable animations in print */
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* Chat icon specific positioning */
.floating-ai-icon {
    background: var(--md-teal);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
}

/* Help & Features Brochure Page Styles */
.help-brochure-page {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
}

.help-brochure-page .hero {
    background: linear-gradient(135deg, #003b6f 0%, #005a9f 100%),
                url('https://source.unsplash.com/1200x600/?industrial,engineering');
    background-blend-mode: overlay;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    margin-top: -20px;
}

.help-brochure-page .hero-content h1 {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.help-brochure-page .hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 30px;
    font-weight: 300;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.help-brochure-page .cta-button {
    display: inline-block;
    background: var(--md-teal);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.3);
    margin: 10px;
}

.help-brochure-page .cta-button:hover {
    background: #007acc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.4);
    color: white;
    text-decoration: none;
}

.help-brochure-page .cta-button.secondary {
    background: transparent;
    border: 2px solid var(--md-teal);
    color: var(--md-teal);
}

.help-brochure-page .cta-button.secondary:hover {
    background: var(--md-teal);
    color: white;
}

.help-brochure-page section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.help-brochure-page h2 {
    font-size: 2.5em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    color: #003b6f;
}

.help-brochure-page h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.help-brochure-page .features-grid,
.help-brochure-page .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.help-brochure-page .feature-card,
.help-brochure-page .tool-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.help-brochure-page .feature-card:hover,
.help-brochure-page .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.help-brochure-page .benefits-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.help-brochure-page .benefits-list li {
    padding: 15px 0;
    padding-left: 40px;
    position: relative;
    font-size: 1.1em;
}

/* Hero Section Enhancements */
.help-brochure-page .hero-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.help-brochure-page .hero-logo {
    height: 60px;
    width: auto;
    max-width: 200px;
}

.help-brochure-page .partnership-text {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Feature Card Enhancements */
.help-brochure-page .feature-icon-large {
    font-size: 3em;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #003b6f, #0066cc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.help-brochure-page .feature-highlight {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
    display: inline-block;
    width: 100%;
}

/* Journey Steps Enhancement */
.help-brochure-page .steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.help-brochure-page .step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.help-brochure-page .step:hover {
    transform: translateY(-5px);
}

.help-brochure-page .step-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.help-brochure-page .step-number {
    background: linear-gradient(135deg, #003b6f, #0066cc);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.help-brochure-page .step-icon {
    font-size: 2em;
}

.help-brochure-page .step-arrow {
    font-size: 2em;
    color: #0066cc;
    margin: 0 10px;
}

/* Testimonial Enhancement */
.help-brochure-page .testimonial {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.help-brochure-page .testimonial-avatar {
    font-size: 4em;
    margin-bottom: 20px;
}

.help-brochure-page .testimonial-rating {
    font-size: 1.5em;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-brochure-page .hero-logos {
        flex-direction: column;
        gap: 15px;
    }

    .help-brochure-page .hero-logo {
        height: 50px;
    }

    .help-brochure-page .steps-container {
        flex-direction: column;
    }

    .help-brochure-page .step-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .help-brochure-page .feature-icon-large {
        font-size: 2.5em;
    }
}

.help-brochure-page .benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 15px;
    background: var(--md-teal);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.help-brochure-page .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.help-brochure-page .step {
    text-align: center;
    padding: 30px 20px;
}

.help-brochure-page .step-number {
    background: var(--md-teal);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 auto 20px;
}

.help-brochure-page .testimonial-section {
    background: #f8f9fa;
    margin: 60px 0;
    padding: 80px 20px;
}

.help-brochure-page .testimonial {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.help-brochure-page .testimonial blockquote {
    font-size: 1.3em;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.help-brochure-page .testimonial cite {
    font-weight: 600;
    color: #003b6f;
}

.help-brochure-page .final-cta-section {
    background: linear-gradient(135deg, #003b6f 0%, #005a9f 100%);
    color: white;
    text-align: center;
    margin: 60px 0 0;
    border-radius: 20px 20px 0 0;
}

.help-brochure-page .final-cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.help-brochure-page .cta-buttons {
    margin: 40px 0;
}

.help-brochure-page .contact-info {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.help-brochure-page .contact-info h3 {
    color: white;
    margin-bottom: 20px;
}

.help-brochure-page .contact-info p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-brochure-page .hero-content h1 {
        font-size: 2.2em;
    }

    .help-brochure-page .hero-subtitle {
        font-size: 1.1em;
    }

    .help-brochure-page h2 {
        font-size: 2em;
    }

    .help-brochure-page .features-grid,
    .help-brochure-page .tools-grid {
        grid-template-columns: 1fr;
    }

    .help-brochure-page .steps-container {
        grid-template-columns: 1fr;
    }
}

/* Professional table styling */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

/* Markdown HTML styling classes */
.md-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.md-h4 {
    color: #1976d2;
    margin: 0 0 15px 0;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.4;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.md-paragraph {
    margin: 12px 0;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

.md-ul {
    margin: 15px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.md-li {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.md-bold {
    color: #1976d2;
    font-weight: 600;
}

.md-italic {
    font-style: italic;
    color: #666;
}

/* Ensure proper spacing between sections */
.md-section:last-child {
    margin-bottom: 0;
}

.md-section .md-paragraph:first-child {
    margin-top: 0;
}

.md-section .md-paragraph:last-child {
    margin-bottom: 0;
}

/* Dropdown and Select Element Fixes */
.dropdown-content {
    z-index: 9999 !important;
    position: absolute !important;
    background-color: #fff !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
    border-radius: 4px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    min-width: 100% !important;
}

.dropdown-content li {
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-content li:hover {
    background-color: #f5f5f5 !important;
}

.dropdown-content li.selected {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
}

/* Select wrapper fixes */
.select-wrapper {
    position: relative !important;
}

.select-wrapper + label {
    position: absolute !important;
    top: -14px !important;
    left: 0 !important;
    font-size: 12px !important;
    color: #9e9e9e !important;
    cursor: text !important;
    transition: color 0.2s ease-out, -webkit-transform 0.2s ease-out !important;
    transition: color 0.2s ease-out, transform 0.2s ease-out !important;
    transition: color 0.2s ease-out, transform 0.2s ease-out, -webkit-transform 0.2s ease-out !important;
    transform-origin: 0% 100% !important;
    text-align: initial !important;
    transform: translateY(0px) !important;
}

.select-wrapper.valid + label,
.select-wrapper.invalid + label {
    color: #26a69a !important;
}

/* Caret styling */
.caret {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: auto 0 !important;
    z-index: 1 !important;
    fill: rgba(0,0,0,0.87) !important;
}

/* Input field adjustments for select elements */
.input-field .select-dropdown {
    position: relative !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid #9e9e9e !important;
    border-radius: 0 !important;
    outline: none !important;
    height: 3rem !important;
    line-height: 3rem !important;
    width: 100% !important;
    font-size: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    cursor: pointer !important;
}

.input-field .select-dropdown:focus {
    border-bottom: 1px solid #26a69a !important;
    box-shadow: 0 1px 0 0 #26a69a !important;
}

/* Responsive dropdown fixes */
@media screen and (max-width: 768px) {
    .dropdown-content {
        max-height: 250px !important;
        width: 100% !important;
    }
    
    .dropdown-content li {
        padding: 14px 16px !important;
        font-size: 16px !important;
    }
}

@media screen and (max-width: 480px) {
    .dropdown-content {
        max-height: 200px !important;
    }
    
    .dropdown-content li {
        padding: 16px !important;
        font-size: 16px !important;
    }
}

/* Card z-index management */
.card {
    z-index: 1 !important;
    position: relative !important;
}

.card .card-content {
    z-index: 2 !important;
    position: relative !important;
}

/* Ensure dropdowns appear above cards */
.dropdown-trigger {
    z-index: 10 !important;
    position: relative !important;
}

/* Fix for overlapping elements */
.section-card {
    z-index: 1 !important;
    position: relative !important;
}