/* assets/custom-theme.css */
/* assets/custom-theme.css */

:root {
    /* ... other variables ... */
    
    /* --- IPO Confidence Colors (Updated for Realistic Ranges 35-58%) --- */
    --confidence-excellent: #00A651;  /* Forest Green - 55%+ */
    --confidence-very-good: #46B571;  /* Medium Green - 50-54% */
    --confidence-good: #B0D235;       /* Yellow-Green - 45-49% */
    --confidence-fair: #FF8C42;       /* Warm Orange - 40-44% */
    --confidence-poor: #FF6B6B;       /* Coral Red - 35-39% */
    --confidence-very-poor: #C5282F;  /* Deep Red - <35% */

    /* --- Example Font Pairing --- */
    /* Clean Sans-Serif for body text */
    --font-family-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* Monospace for specific data/code elements (applied via component styles or specific classes) */
    --font-family-monospace: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    /* Header font - could be same as body or slightly different */
    --font-family-headers: 'BlinkMacSystemFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Example: Using Inter for headers */
    /* --- End Font Pairing --- */

    /* Font weights */
    --font-weight-normal: 100;
    --font-weight-medium: 300;
    /* Good for headers if using same family */
    --font-weight-bold: 400;
}

body {
    font-family: var(--font-family-body);
    /* Use body font globally */
    /* ... other body styles ... */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-headers);
    /* Use header font */
    font-weight: var(--font-weight-medium);
    /* Or bold */
    /* ... other header styles ... */
}

/* Card styles */
.card {
    background-color: var(--card-bg-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

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

.card-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
    font-weight: 500;
}

.card-body {
    padding: 1.25rem;
    /* display: block !important; */
    /* Removed */
    /* width: 100% !important; */
    /* Removed */
    /* overflow: visible !important; */
    /* Removed */
}

/* Dashboard elements */
.page-container {
    padding: 20px;
    border-radius: var(--radius-md);
    background-color: var(--card-bg-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.click-message {
    padding: 10px;
    background-color: var(--info-color);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.search-message {
    padding: 10px;
    background-color: var(--light-color);
    border-radius: var(--radius-sm);
    font-style: italic;
}

.debug-info {
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 10px;
    overflow-x: auto;
}

/* DatePickerRange styling */
.date-picker-wrapper {
    width: 100%;
    /* max-width: 350px; */ /* Removed to allow full width */
}

/* Force soccer first goals date picker to use full width */
#soccer_first_goals-date-picker {
    width: 75% !important;
    display: block !important;
}

/* Penalty date picker column positioning - target the entire date range column */
.filter-container .col-lg-4.col-md-3.col-sm-6.col-12 {
    transform: translateY(-15%) !important;
}

/* Fix penalty date picker width consistency */
#penalty-date-picker {
    border: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    height: auto !important;
    width: 80% !important;
}

#penalty-date-picker .DateRangePicker {
    width: 100% !important;
}

#penalty-date-picker .DateRangePickerInput {
    width: 100% !important;
    border: 1px solid rgb(206, 212, 218) !important;
    background-color: rgb(255, 255, 255) !important;
    border-radius: 4px !important;
}

#soccer_first_goals-date-picker .DateRangePicker,
#soccer_first_goals-date-picker .DateRangePickerInput {
    width: 100% !important;
    display: flex !important;
}

#soccer_first_goals-date-picker .DateInput {
    flex: 1 !important;
}

#soccer_first_goals-date-picker .DateRangePickerInput_arrow {
    padding: 0 3px !important;
}

.date-picker-container {
    width: 100%;
}

/* assets/custom-theme.css */

/* Make the DatePickerRange container invisible but let content size it */
.DateRangePickerInput {
    /* width: 100%; */
    /* REMOVED */
    /* width: 100% !important; */
    /* REMOVED */
    display: inline-flex;
    /* KEEP - allows shrink-wrapping based on content */
    /* Make border and background transparent */
    border-radius: 4px;
    /* Keep for potential spacing consistency */
    border: 1px solid transparent !important;
    /* Make border invisible */
    background-color: transparent !important;
    /* Make background invisible */
    /* Ensure box-sizing is appropriate if padding is added here, but likely not needed */
    /* box-sizing: border-box; */
    /* Remove padding if it was on this element, apply to inputs if needed */
    padding: 0 !important;
    /* Remove padding from the container itself */

}

/* Keep internal styles for the date boxes */
.DateInput {
    flex: 1;
    /* Add some spacing between the two inputs perhaps? */
    /* Or rely on the arrow's padding */
}

/* Keep internal styles for the actual input fields */
/* We might need to add a border BACK here if the inputs look bad now */
.DateInput_input {
    font-size: 14px !important;
    padding: 8px 10px !important;
    /* Keep padding for input text */
    height: 38px !important;
    /* Keep consistent height */
    border: 1px solid var(--border-color, #ced4da) !important;
    /* ADD a border back to the input */
    /* border: none !important; */
    /* REMOVE this line */
    width: 100% !important;
    /* Keep this */
    box-sizing: border-box;
    /* Keep this */
    border-radius: 0;
    /* Remove radius if applied, let outer container handle it if needed*/
    /* Ensure inputs have a background */
    background-color: var(--bs-body-bg, #fff);
    /* Use theme background */
}

/* Main container: Make it transparent and size to content */
.DateRangePickerInput {
    display: inline-flex;
    /* Allow shrink-wrapping */
    border: none !important;
    /* No border for the main container */
    background-color: transparent !important;
    /* No background for the main container */
    padding: 0 !important;
    /* Remove container padding */
    border-radius: 0;
    /* Remove container radius */
    vertical-align: middle;
    /* Align with adjacent elements if needed */
}

/* Styles for the arrow separator */
.DateRangePickerInput_arrow {
    display: flex;
    /* Keep using flexbox for alignment */
    align-items: center;
    /* Keep vertical centering */
    padding: 0 5px;
    /* Keep horizontal spacing */

    /* --- NEW --- */
    /* Match the background of the main container */
    background-color: var(--bs-body-bg, #fff);

    /* Nudge down slightly - Adjust the px value as needed */
    padding-top: 2px;
    /* Try 2px or 3px first */

    /* Ensure no unwanted border */
    border: none !important;
}

/* Optional: Style the arrow SVG icon itself if needed */
.DateRangePickerInput_arrow svg {
    fill: #545e67;
    height: 38px !important;
    /* Example color for the arrow icon */
}

/* --- Ensure other datepicker styles are correct --- */

.DateRangePickerInput {
    width: auto; /* Let it size to content instead of 100% */
    display: inline-flex; /* Use inline-flex to shrink to content */
    border-radius: 4px;
    border: 1px solid var(--border-color, #ced4da);
    /* Visible border */
    background-color: var(--bs-body-bg, #fff);
    /* Visible background */
    align-items: center;
    /* Align inputs/arrow vertically */
}

.DateInput {
    flex: 1;
}

.DateInput_input {
    font-size: 14px !important;
    padding: 8px 10px !important;
    height: 38px !important;
    border: none !important;
    /* Inputs are borderless */
    width: 100% !important;
    box-sizing: border-box;
    background-color: transparent !important;
    /* Inputs blend into container */
    color: var(--bs-body-color, #212529);
}

.DateInput_input::placeholder {
    color: #6c757d;
    opacity: 1;
}


.DateRangePickerInput_clearDates {
    display: flex;
    align-items: center;
    padding-right: 5px;
    /* Adjust spacing */
    background-color: var(--bs-body-bg, #fff);
    /* Match container background */
    border: none !important;
    height: 38px;
    /* Match input height */
}

.DateRangePickerInput_clearDates svg {
    fill: #888;
    cursor: pointer;
}
/* --- End DatePickerRange Styles --- */

/* Style the filter row for better alignment */
/*
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end !important; 
}

.filter-item {
    margin-bottom: 15px;
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
}
*/

.filter-label {
    display: block;
    margin-bottom: 5px;
    /* Reduced from 8px */
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

/* Ensure consistent heights for filter components */
.filter-item .Select-control,
.filter-item .DateInput_input {
    height: 38px !important;
    min-height: 38px !important;
}

/* Ensure date picker container has proper alignment */
.date-picker-container {
    width: 100%;
}

/* Upload page styling */
.upload-component {
    width: 100%;
    height: 200px;
    border-width: 2px;
    border-style: dashed;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transition: border-color 0.3s;
}

.upload-component:hover {
    border-color: #adb5bd;
    background-color: #f1f3f5;
}

.logs-container {
    background-color: #222;
    color: #00ff00;
    font-family: monospace;
    padding: 10px;
    border-radius: 4px;
    height: 300px;
    overflow-y: auto;
    font-size: 12px;
    margin-bottom: 10px;
}

.debug-output {
    background-color: #f6f8fa;
    color: #333;
    font-family: monospace;
    padding: 10px;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 12px;
    white-space: pre-wrap;
    border: 1px solid #ddd;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-message {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.status-message.text-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.status-message.text-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.status-message.text-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.checklist-options {
    display: flex;
    gap: 20px;
}

/* File upload area */
.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: #6c757d;
}

.upload-text {
    margin-bottom: 5px;
}

.upload-subtext {
    font-size: 12px;
    color: #6c757d;
}

/* Search results styling */
.search-message {
    font-style: italic;
    color: #495057;
    margin-bottom: 10px;
}

/* Loading spinner */
.spinner-container {
    margin-left: 10px;
}

/* Login page styling */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(116, 171, 226), rgb(85, 99, 222));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent white - adjust opacity (0.0 to 1.0) */
    backdrop-filter: blur(8px);                 /* The "frosting" effect - adjust blur radius */
    -webkit-backdrop-filter: blur(8px);         /* For Safari compatibility */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Light, slightly transparent border */
    box-shadow: 0 8px 24px 0 rgba(31, 38, 135, 0.2); /* Softer shadow for a glassy feel */
    border-radius: var(--radius-md, 10px);       /* Your defined radius or a new one */
    /* padding: 2rem; */ /* Adjust padding as needed */
}

/* Text inside the frosted glass card needs to be clearly visible */
.login-card .form-label,
.login-card h4.text-center { /* Assuming the title is H4 and centered */
    color: #FFFFFF; /* White text usually works well here */
    text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.2); /* Optional subtle text shadow for readability */
}

.login-card .form-control {
    background-color: rgba(255, 255, 255, 0.7); /* Make input fields more opaque for typing */
    color: #000000; /* Dark text in input fields */
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-card .form-control::placeholder {
    color: #555555;
}

.login-card .btn-primary { /* Assuming your login button is dbc.Button with color="primary" */
    /* You might want to adjust button style too if using frosted glass */
    /* For example, make it more solid or use a contrasting color */
}

/* Pagination Styling */
.dash-table-container .previous-next-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.dash-table-container .page-number {
    margin: 0 5px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-color);
}

.dash-table-container .previous-page,
.dash-table-container .next-page,
.dash-table-container .first-page,
.dash-table-container .last-page {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: 0 2px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.dash-table-container .previous-page:hover,
.dash-table-container .next-page:hover,
.dash-table-container .first-page:hover,
.dash-table-container .last-page:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Fix for DataTable in Dash 2.15 */
.dash-table-container {
    width: 100% !important;
    max-width: 100% !important;
}

.dash-spreadsheet {
    width: 100% !important;
    max-width: 100% !important;
}

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

/* Selected page number styling */
.dash-table-container .current-page {
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

/* Pagination position container */
.dash-table-container .pageCount {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
}

/* Dropdown menu styling improvements */
.dropdown-menu {
    border-radius: var(--radius-sm, 4px);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
    border: 1px solid var(--border-color, #dee2e6);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(25, 118, 210, 0.08);
    color: var(--primary-color, #1976D2);
}

/* Active dropdown item */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color, #1976D2);
    color: white;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {

    /* Mobile Navigation */
    .navbar-collapse {
        position: absolute;
        top: 56px;
        /* Height of the navbar */
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--primary-color, #1976D2);
        z-index: 1050;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        display: block !important;
    }

    .navbar-collapse.show {
        transform: translateY(0);
    }

    /* Adjust nav items for mobile */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item,
    .dropdown {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Ensure dropdown menus are visible */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.1);
        border: none;
        box-shadow: none;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .dropdown-item {
        color: white !important;
        padding: 0.5rem 1rem;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Improve readability for nav links */
    .nav-link {
        /* color: white !important; */
        /* Let specific tab rules handle color */
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ensure mobile nav links inherit color */
    .navbar-dark .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.75);
        /* Adjust as needed */
    }

    .navbar-dark .navbar-nav .nav-link:hover,
    .navbar-dark .navbar-nav .nav-link:focus {
        color: #fff;
    }


    .navbar-brand {
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .filter-components {
        flex-direction: column;
        gap: 10px;
    }

    .filter-item {
        width: 100%;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .chart-container {
        min-height: 250px;
    }

    /* Make filter rows stack on smaller screens */
    .filter-row {
        flex-direction: column;
    }

    .filter-row>div {
        width: 100%;
        max-width: none !important;
    }
}

@media (max-width: 576px) {
    .dashboard-content {
        padding: 10px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    /* Adjust filter container padding */
    .filter-container {
        padding: 10px;
    }

    /* Make cards more compact */
    .card-header,
    .card-body {
        padding: 0.75rem;
    }

    /* Handle smaller input controls */
    .date-picker-wrapper,
    .dropdown,
    input,
    select {
        width: 100%;
        min-width: 100%;
    }
}

/* Terminal-style console for script logs */
.log-output {
    /* Targeting the existing class */
    background-color: #000000;
    /* Black background */
    color: #00FF00;
    /* Bright green text (classic terminal green) */
    /* Alternative green: #39FF14 (Lime), #00C000 (darker green) */

    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Monospaced font stack */
    /* 'Consolas', 'Monaco', 'Lucida Console' are common, 'Courier New' is very standard */
    /* For a more specific "Matrix" font, you might need to import one via @font-face or Google Fonts */

    padding: 15px;
    /* Add some internal spacing */
    border-radius: 5px;
    /* Optional: slightly rounded corners */
    border: 1px solid #003300;
    /* Optional: dark green border */

    /* You can override or adjust inline styles here if needed */
    font-size: 0.85em;
    /* Example: slightly increase size from original inline style */

    /* Inline styles like maxHeight, overflowY, whiteSpace, wordBreak can often stay */
    /* unless you want to define them globally here */
}

/* Optional: Add a subtle glow effect */

.log-output {
    text-shadow: 0 0 5px #00FF00;
}


/* Add a subtle green tint for certain elements like success messages */
.log-output .success,
.log-output .completed {
    color: #4CAF50 !important;
}

/* Add red color for errors */
.log-output .error,
.log-output .warning {
    color: #F44336 !important;
}

/* Add yellow color for warnings */
.log-output .warning {
    color: #FFC107 !important;
}

/* Optional: Add a simple cursor effect */
.log-output::after {
    content: "█";
    animation: blink 1s step-end infinite;
    color: #e0e0e0;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.log-output {
    /* Targeting the existing class */
    background-color: #000000;
    /* Black background */
    color: #00FF00;
    /* Bright green text (classic terminal green) */
    /* Alternative green: #39FF14 (Lime), #00C000 (darker green) */

    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Monospaced font stack */
    /* 'Consolas', 'Monaco', 'Lucida Console' are common, 'Courier New' is very standard */
    /* For a more specific "Matrix" font, you might need to import one via @font-face or Google Fonts */

    padding: 15px;
    /* Add some internal spacing */
    border-radius: 5px;
    /* Optional: slightly rounded corners */
    border: 1px solid #003300;
    /* Optional: dark green border */

    /* You can override or adjust inline styles here if needed */
    font-size: 0.85em;
    /* Example: slightly increase size from original inline style */

    /* Inline styles like maxHeight, overflowY, whiteSpace, wordBreak can often stay */
    /* unless you want to define them globally here */
}

/* Optional: Add a subtle glow effect */
/*
.log-output {
    text-shadow: 0 0 5px #00FF00;
}
*/
/* Enhanced Upload Page Styling */

/* Fix for the floating upload icon */
#upload-data-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

#upload-data-component:hover {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

#upload-data-component>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

/* Upload icon styling */
#upload-data-component .fa-cloud-upload-alt {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Upload Container */
.upload-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.upload-section:hover {
    box-shadow: var(--shadow-md);
}

.upload-section h6 {
    color: var(--primary-color);
}

/* Options Section */
.options-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    height: 100%;
}

.options-section:hover {
    box-shadow: var(--shadow-md);
}

.options-section h6 {
    color: var(--primary-color);
}

/* Modern Switch Styling */
.modern-checklist .form-check {
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
}

.modern-checklist .form-check-input {
    width: 2.5em;
    height: 1.25em;
    margin-left: -2.5rem;
}

.modern-checklist .form-check-label {
    font-weight: 500;
    padding-top: 0.125rem;
}

/* Adjustable Preview */
.preview-height-slider {
    width: 200px;
}

/* Alert Styling */
.alert {
    border-left-width: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(244, 67, 54, 0.1);
}

.alert-content {
    display: flex;
    align-items: center;
}

/* Debug Output Styling */
.debug-output {
    background-color: #2b2b2b;
    color: #e6e6e6;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: var(--radius-sm);
    max-height: 500px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
}

/* Preview Table Styling */
.preview-table {
    margin-bottom: 0;
}

.preview-table thead th {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
    border-bottom-width: 2px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Custom Switch Styling */
.custom-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
}

.custom-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 118, 210, 0.25);
}

/* MLB Barrels Table Specific Overrides */
#barrels-table-container {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    min-width: 100% !important;
}

#barrels-data-table {
    width: 100% !important;
    min-width: 100% !important;
}

#barrels-data-table .dash-spreadsheet,
#barrels-data-table .dash-table-container {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    overflow-x: auto !important;
}

/* Ensure the barrels tab content is displayed properly */
/* #barrels-tabs .tab-content { */
/* REMOVED THIS RULE */
/* display: block !important; */
/* width: 100% !important; */
/* overflow: visible !important; */
/* } */


/* Add these styles in your app's CSS */
.remove-player-x:hover {
    color: #ff0000 !important;
    transform: scale(1.2);
}

.badge {
    transition: all 0.2s ease;
}

/* Only apply grey hover to removable badges, not confidence badges */
.badge.removable:hover {
    background-color: #f8f9fa !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Confidence badges should maintain their colors */
.confidence-badge {
    border: none !important;
    font-weight: 500 !important;
}

.confidence-badge:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Individual confidence badge colors using CSS variables */
.confidence-excellent {
    background-color: var(--confidence-excellent) !important;
    color: white !important;
}

.confidence-very-good {
    background-color: var(--confidence-very-good) !important;
    color: white !important;
}

.confidence-good {
    background-color: var(--confidence-good) !important;
    color: black !important;
}

.confidence-fair {
    background-color: var(--confidence-fair) !important;
    color: white !important;
}

.confidence-poor {
    background-color: var(--confidence-poor) !important;
    color: white !important;
}

.confidence-very-poor {
    background-color: var(--confidence-very-poor) !important;
    color: white !important;
}

/* Ensure DataTable confidence colors are properly displayed */
.dash-table-container .dash-spreadsheet-container .cell {
    /* Ensure inline styles from style_data_conditional override any other styles */
    font-weight: inherit !important;
}

/* Make sure confidence colors in tables are prominent */
.dash-table-container tr[style*="background"] {
    /* Boost confidence background colors in table rows */
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1) !important;
}

/* === Explicit Tab Styling (More Specific) === */
.nav-tabs {
    border-bottom: 1px solid var(--border-color, #DEE2E6);
    margin-bottom: 1rem;
}

.nav-tabs .nav-item .nav-link,
/* Target link */
.nav-tabs .nav-item .nav-link button {
    /* Target button inside link (common in dbc>=1.0) */
    color: var(--muted-text-color, #6C757D) !important;
    /* Default color */
    background-color: transparent;
    border: 1px solid transparent;
    border-top-left-radius: var(--radius-sm, 4px);
    border-top-right-radius: var(--radius-sm, 4px);
    padding: 0.6rem 1.1rem;
    font-weight: var(--font-weight-medium, 500);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    margin-bottom: -1px;
    /* Overlap the bottom border */
    text-align: center;
    /* Ensure text is centered if it's a button */
    width: 100%;
    /* Ensure button takes full width of nav-item */
    display: inline-block;
    /* Ensure link/button behaves correctly */
}

/* Style for hovered inactive tabs */
.nav-tabs .nav-item .nav-link:hover:not(.active),
.nav-tabs .nav-item .nav-link:hover:not(.active) button {
    color: var(--primary-color, #1976D2) !important;
    border-color: var(--border-color, #DEE2E6) var(--border-color, #DEE2E6) transparent;
    isolation: isolate;
}

/* Style for active tabs */
.nav-tabs .nav-item .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-item .nav-link.active button,
.nav-tabs .nav-item.show .nav-link button {
    color: var(--primary-color, #1976D2) !important;
    /* Active color */
    background-color: var(--card-bg-color, #FFFFFF);
    border-color: var(--border-color, #DEE2E6) var(--border-color, #DEE2E6) var(--card-bg-color, #FFFFFF);
    border-bottom-color: transparent;
    font-weight: var(--font-weight-bold, 700);
    position: relative;
    z-index: 2;
}

/* Ensure tab content container allows individual panes to be shown/hidden */
.tab-content {
    /* padding-top: 1rem;
    /* DO NOT set display: block !important here */
}

/* Add this to your assets/styles.css or equivalent */
.tab-pane-visible {
    display: block !important;
    /* Or flex, grid, etc., depending on content */
}

.tab-pane-hidden {
    display: none !important;
}

/* CSS Hack for Missing Tab Labels */
/* assets/custom-theme.css */

/* Style for the player badge itself */
.watchlist-player-badge {
    /* Use a gradient - adjust colors as desired */
    background: linear-gradient(to right, #{$dbc-info}, #{$dbc-primary});
    /* Uses SASS variables if available, otherwise use hex/rgb */
    background: linear-gradient(to right, var(--info-color, #2196F3), var(--primary-color, #1976D2));
    /* Fallback using CSS variables */
    color: white;
    /* Text color on gradient */
    border: none;
    /* Remove default badge border if any */
    /* pill=True in Python handles border-radius */
    /* padding is set inline via className="p-2" */
    /* margin is set inline via className="me-1 mb-1" */
    /* fontSize and verticalAlign set inline */
    display: inline-flex !important;
    /* Ensure button aligns correctly */
    align-items: center;
}

/* Style for the remove button within the badge */
.watchlist-player-badge .badge-remove-btn {
    background-color: rgba(255, 255, 255, 0.2);
    /* Slightly transparent white background */
    color: white;
    /* X color */
    border: none;
    /* Size, padding, border-radius, margin are set inline */
    /* Line-height helps center the '×' vertically */
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Hover effect for the remove button */
.watchlist-player-badge .badge-remove-btn:hover {
    background-color: rgba(244, 67, 54, 0.8);
    /* Reddish background on hover */
    color: white;
}

/* Ensure the Font Awesome icon (if used instead of '×') is styled */
.watchlist-player-badge .badge-remove-btn i.fas.fa-times {
    /* Adjust font size or color if using Font Awesome */
    /* font-size: 0.8em; */
}

/* assets/custom-theme.css */

/* Style for the player badge itself */
.watchlist-player-badge {
    /* Use a gradient - adjust colors as desired */
    background: linear-gradient(to right, #{$dbc-info}, #{$dbc-primary});
    /* Uses SASS variables if available, otherwise use hex/rgb */
    background: linear-gradient(to right, var(--info-color, #2196F3), var(--primary-color, #1976D2));
    /* Fallback using CSS variables */
    color: white;
    /* Text color on gradient */
    border: none;
    /* Remove default badge border if any */
    /* pill=True in Python handles border-radius */
    /* padding is set inline via className="p-2" */
    /* margin is set inline via className="me-1 mb-1" */
    /* fontSize and verticalAlign set inline */
    display: inline-flex !important;
    /* Ensure button aligns correctly */
    align-items: center;
}

/* Style for the remove button within the badge */
.watchlist-player-badge .badge-remove-btn {
    background-color: rgba(255, 255, 255, 0.2);
    /* Slightly transparent white background */
    color: white;
    /* X color */
    border: none;
    /* Size, padding, border-radius, margin are set inline */
    /* Line-height helps center the '×' vertically */
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Hover effect for the remove button */
.watchlist-player-badge .badge-remove-btn:hover {
    background-color: rgba(244, 67, 54, 0.8);
    /* Reddish background on hover */
    color: white;
}

/* Ensure the Font Awesome icon (if used instead of '×') is styled */
.watchlist-player-badge .badge-remove-btn i.fas.fa-times {
    /* Adjust font size or color if using Font Awesome */
    /* font-size: 0.8em; */
}

/* === Landing Page Styling === */

/* Light grey gradient background for the page container */
.landing-page-container {
    /* Adjust gradient colors and direction as needed */
    /* background: linear-gradient(to bottom, #f8f9fa, #e9ecef); */
    /* Subtle light grey */
    /* Or maybe a slightly cooler grey */
    background: linear-gradient(to bottom, #ffffff, #eef2f7);
    padding-top: 20px;
    /* Add some padding if needed */
    padding-bottom: 40px;
    border-radius: 8px;
    /* Optional rounded corners for the container */
    margin-top: -1rem;
    /* Adjust if needed based on navbar margin */
}

/* Styling for the individual landing page cards */
.landing-card {
    /* Blue/Lavender Gradient */
    background: linear-gradient(135deg, #89CFF0, #B19CD9);
    /* Baby Blue to Light Pastel Purple */
    /* Adjust angle and colors: */
    /* background: linear-gradient(to bottom right, #6495ED, #D8BFD8); /* Cornflower Blue to Thistle */

    color: #ffffff;
    /* White text color for better contrast on gradient */
    border: none;
    /* Remove default card border */
    transition: all 0.3s ease-in-out;
    /* Smooth transition for hover effect */
    border-radius: 10px;
    /* Slightly rounder corners for the cards */
}

/* Ensure link wrapper doesn't interfere with card styles */
.landing-card-link {
    text-decoration: none;
    /* Remove underline from link */
    display: block;
    /* Ensure link takes up column space */
    height: 100%;
    /* Make link fill the column height */
}

/* Hover effect for the cards */
.landing-card-link:hover .landing-card {
    transform: translateY(-6px);
    /* Lift card slightly */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    /* Increase shadow */
    /* You could also change the gradient slightly on hover */
    /* background: linear-gradient(135deg, #7ac0e0, #a18cc9); */
    /* Slightly darker version */
}

/* Make sure icon and title color are also white */
.landing-card .card-body i,
.landing-card .card-body .card-title {
    color: #ffffff;
}
/* CSS Hack for Missing Tab Labels on MLB FP Page */
/* Apply ONLY if the underlying root cause cannot be found */
/*
/* Target the intermediate .form-check-inline divs when they are
   direct children of a .btn-group (which is the className we put
   on our dbc.RadioItems). We also target .btn-group-sm for specificity. */
   .btn-group.btn-group-sm > .form-check.form-check-inline {
    margin-right: 0; /* Override Bootstrap's default margin for form-check-inline */
    margin-left: 0;  /* Override Bootstrap's default margin for form-check-inline */
    padding-left: 0; /* Some versions of Bootstrap might add padding here too */
    padding-right: 0;
}

/* Now, to make the buttons truly look connected like in a btn-group,
   we need to adjust the borders and margins of the .btn elements themselves.
   This replicates what .btn-group > .btn would normally do. */

/* Remove right border radius from all but the last button */
.btn-group.btn-group-sm > .form-check.form-check-inline:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Remove left border radius from all but the first button, and add negative margin */
.btn-group.btn-group-sm > .form-check.form-check-inline:not(:first-child) > .btn {
    margin-left: -1px; /* This makes the borders overlap for a connected look */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
/* Targets labels with .btn and .btn-outline-primary within our specific group structure */
.btn-group.btn-group-sm > .form-check.form-check-inline > .btn.btn-outline-primary {
    background-color: #e9ecef; /* Placeholder: A light, neutral grey (Bootstrap's 'light' muted) */
    color: #495057;             /* Placeholder: A darker grey for text (Bootstrap's 'secondary' text) */
    border-color: #ced4da;   /* Placeholder: A slightly darker grey for the border */
    /* No box-shadow for a flatter look, but Bootstrap's .btn usually has some. */
    /* You can add 'box-shadow: none;' if you want to ensure it's flat. */
}

/* Hover state for default (unselected) stance button */
.btn-group.btn-group-sm > .form-check.form-check-inline > .btn.btn-outline-primary:hover {
    background-color: #d3d9df; /* Placeholder: A slightly darker shade of the light grey for hover */
    color: #212529;             /* Placeholder: Darker text on hover */
    border-color: #adb5bd;   /* Placeholder: Matching border */
}

/* Active (selected) stance button style */
/* Targets labels that also have the .active class */
.btn-group.btn-group-sm > .form-check.form-check-inline > .btn.btn-outline-primary.active {
    /* --- THIS IS WHERE YOU'LL PUT YOUR PRIMARY ACTIVE COLOR --- */
    /* Example: Using a calming blue (Pantone-like) */
    background-color: #0077b6; /* Example: A nice medium blue */
    color: #ffffff;             /* White text for good contrast on a darker background */
    border-color: #005f8e;   /* A slightly darker shade of the blue for the border */

    /* --- OR, A MORE VIBRANT COMPLEMENTARY COLOR --- */
    /* Example: If your page has blue tones, a muted orange could be complementary */
    /* background-color: #f4a261; */ /* A pleasant, desaturated orange */
    /* color: #212529;          */ /* Dark text for orange background */
    /* border-color: #e76f51;   */ /* A slightly darker/redder orange for border */
}

/* Optional: Hover state for the active button (often good to make it slightly darker or brighter) */
.btn-group.btn-group-sm > .form-check.form-check-inline > .btn.btn-outline-primary.active:hover {
    /* Adjust based on your chosen active color */
    /* Example for the blue active color: */
    background-color: #005f8e; /* Darker shade of the active blue */
    border-color: #004c70;   /* Even darker for the border */
    color: #ffffff;

    /* Example for the orange active color: */
    /* background-color: #e76f51; */
    /* border-color: #d35400; */
    /* color: #ffffff; */
}
/*
  CSS Override to hide the "Show Filters" toggle switch row for tables
  on the MLB Daily Barrels page.
  This targets the specific Bootstrap row structure used in create_data_table.py
  for the filter toggle.
*/

/* Scope the rule to your specific page container to avoid unintended effects elsewhere */
#mlb_daily_barrels_page_wrapper div.row.mt-2.mb-2.justify-content-end,
.mlb_daily_barrels_main_container div.row.mt-2.mb-2.justify-content-end {
    display: none !important;
}

/* Hide filter toggle for MLB First Pitch tables */
#mlb_firstpitch_page_wrapper div.row.mt-2.mb-2.justify-content-end,
.mlb_firstpitch_main_container div.row.mt-2.mb-2.justify-content-end {
    display: none !important;
}

/* Hide filter toggle for Soccer Penalty tables */
#soccer_daily_penalty_page_wrapper div.row.mt-2.mb-2.justify-content-end,
.soccer_daily_penalty_main_container div.row.mt-2.mb-2.justify-content-end,
#penalty_tab div.row.mt-2.mb-2.justify-content-end,
#soccer_daily_games_penalty_table_container div.row.mt-2.mb-2,
#soccer_daily_games_penalty_content div.row.mt-2.mb-2,
#penalty-details-table-filter-toggle,
div:has(> #penalty-details-table-filter-toggle) {
    display: none !important;
}
/* --- PITCHER STAT BADGES - OPTION 2 STYLING (Very Light Opaque Backgrounds) --- */
/* (This section should already be in your CSS from the previous step, with swapped colors) */
.pitcher-stat-badge {
    /* Common styles if any, mostly handled by inline layout style in Python */
    /* The inline style in Python handles padding and margins */
}

/* Barrels/HH Allowed - Light Green BG / Dark Green text */
.pitcher-stat-brlhh {
    background-color: #e6f5e0 !important;
    color: #38761d !important;
    border: 1px solid #c1e0b6 !important;
}

/* HRs Allowed - Light Orange/Peach BG / Dark Orange text */
.pitcher-stat-hr {
    background-color: #fff0e1 !important;
    color: #d95b00 !important;
    border: 1px solid #ffe0c1 !important;
}

/* SB Allowed - Light Cyan BG / Dark Cyan text */
.pitcher-stat-sb {
    background-color: #e0f2f7 !important;
    color: #007991 !important;
    border: 1px solid #b0dbe4 !important;
}

/* FP-HIP Allowed - Light Lavender BG / Dark Purple text */
.pitcher-stat-fphip {
    background-color: #ede7f6 !important;
    color: #5e35b1 !important;
    border: 1px solid #d1c4e9 !important;
}

/* --- NEW HOVER EFFECT FOR BADGES WITHIN HOVERABLE LIST GROUP ITEMS --- */
/* This will apply to danger batter badges since they now use these classes */
.list-group-item-action:hover .pitcher-stat-brlhh {
    border-color: #38761d !important; /* Darker green border on hover */
    /* You could also slightly darken the background if desired: */
    /* background-color: #d1edd8 !important; */
}

.list-group-item-action:hover .pitcher-stat-hr {
    border-color: #d95b00 !important; /* Darker orange border on hover */
    /* You could also slightly darken the background if desired: */
    /* background-color: #ffe5d0 !important; */
}

/*
 Date picker container and portal positioning fixes
*/
.date-picker-container {
    position: relative;
    z-index: 1;
  }
  
  /* Portal-based calendar positioning - this should work with with_portal=True */
  .DatePickerSingle_picker,
  .SingleDatePicker_picker {
    z-index: 9999 !important;
    position: fixed !important;
  }

  /* Ensure the portal container has highest z-index */
  .react-portal {
    z-index: 9999 !important;
  }

  /* Alternative positioning for non-portal calendars */
  .DateRangePicker_picker {
    z-index: 9999 !important;
    position: absolute !important;
  }

  /* Make sure tab content doesn't interfere */
  .nav-tabs {
    z-index: 1000;
  }

  .tab-content {
    z-index: 1001;
  }

/* === GLOBAL USER HEADER STYLES === */
/* === COMPACT USER DROPDOWN STYLES === */
.user-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.user-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px);
}

.user-dropdown .dropdown-toggle:focus,
.user-dropdown .dropdown-toggle:active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* === USER DROPDOWN MENU STYLING === */
.user-dropdown .dropdown-menu {
    border: none !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0 !important;
    min-width: 200px !important;
    margin-top: 0.25rem !important;
}

.user-dropdown-header {
    font-weight: 600 !important;
    color: #495057 !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    background-color: #f8f9fa !important;
    margin-bottom: 0 !important;
}

.logout-menu-item {
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease !important;
}

.logout-menu-item:hover {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* === ADMIN BADGE STYLING === */
.user-dropdown .badge {
    font-size: 0.65rem !important;
    vertical-align: middle !important;
}

/* === CHEVRON ICON === */
.user-dropdown .fa-chevron-down {
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.user-dropdown .dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 991px) {
    .user-dropdown {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
    
    .user-dropdown .dropdown-toggle {
        width: 100%;
        text-align: left;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }
    
    .user-dropdown .dropdown-menu {
        width: 100%;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid rgba(0, 0, 0, 0.125) !important;
        margin-top: 0.5rem !important;
    }
}

/* === NAVBAR REFINEMENTS === */
.navbar-nav .dropdown-menu {
    animation: fadeIn 0.15s ease-in-out;
}

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

/* === ENSURE PROPER SPACING === */
.navbar-nav > .nav-item:last-child {
    margin-left: auto;
}

.navbar-collapse .navbar-nav {
    align-items: center;
}
/* === COMPACT USER DROPDOWN STYLES === */
.user-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.user-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px);
}

.user-dropdown .dropdown-toggle:focus,
.user-dropdown .dropdown-toggle:active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* === USER DROPDOWN MENU STYLING === */
.user-dropdown .dropdown-menu {
    border: none !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0 !important;
    min-width: 200px !important;
    margin-top: 0.25rem !important;
}

.user-dropdown-header {
    font-weight: 600 !important;
    color: #495057 !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    background-color: #f8f9fa !important;
    margin-bottom: 0 !important;
}

.logout-menu-item {
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease !important;
}

.logout-menu-item:hover {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* === SMALL BADGE STYLING (REPLACES size="sm") === */
.badge-sm {
    font-size: 0.65rem !important;
    padding: 0.2em 0.4em !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* === CHEVRON ICON === */
.user-dropdown .fa-chevron-down {
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.user-dropdown .dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 991px) {
    .user-dropdown {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
    
    .user-dropdown .dropdown-toggle {
        width: 100%;
        text-align: left;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }
    
    .user-dropdown .dropdown-menu {
        width: 100%;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid rgba(0, 0, 0, 0.125) !important;
        margin-top: 0.5rem !important;
    }
}

/* === NAVBAR REFINEMENTS === */
.navbar-nav .dropdown-menu {
    animation: fadeIn 0.15s ease-in-out;
}

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

/* === ENSURE PROPER SPACING === */
.navbar-nav > .nav-item:last-child {
    margin-left: auto;
}

.navbar-collapse .navbar-nav {
    align-items: center;
}
#user-dropdown-menu .dropdown-toggle::after {
    display: none !important;
}
/* Enhanced DataTable page size for more opportunities */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet {
    max-height: 600px; /* Allow more rows to be visible */
}

/* === REJECTION REASON STYLING === */
.rejection-reason-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.25rem;
}

/* === PERFORMANCE INDICATORS === */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.performance-indicator.hot-streak {
    color: #dc3545;
}

.performance-indicator.cold-streak {
    color: #6f42c1;
}

.performance-indicator.neutral {
    color: #6c757d;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
    .dash-table-container {
        font-size: 0.8rem;
    }
    
    .dash-table-container .dash-spreadsheet-container {
        max-height: 500px;
    }
}

/* === GAME CARD STYLES FOR MLB SCHEDULE === */
.game-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    min-height: 90px;
    max-height: 105px;
    border: 1px solid #dee2e6;
    background-color: white;
}

/* Fix for game status badges - prevent text wrapping and pushing content down */
.game-card .badge {
    max-width: 60px;
    font-size: 0.6rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
    padding: 0.2em 0.4em !important;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.08) !important;
}

.game-card img {
    transition: transform 0.2s ease-in-out;
}

.game-card:hover img {
    transform: scale(1.05);
}

/* Enhanced active/selected state with persistent hover-like styling */
.game-card.selected,
.game-card:active,
.game-card.active {
    border-color: #007bff !important;
    box-shadow: 0 6px 12px rgba(0,123,255,0.25) !important;
    background-color: rgba(0, 123, 255, 0.08) !important;
    transform: translateY(-2px);
}

/* Keep selected state even when not hovering */
.game-card.selected:not(:hover) {
    border-color: #007bff !important;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2) !important;
    background-color: rgba(0, 123, 255, 0.06) !important;
    transform: translateY(-1px);
}

/* Enhanced hover effect for clickable game card containers */
div[id*="game_card"]:hover .game-card {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.08) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
}

/* Persistent active state for clicked game card containers */
div[id*="game_card"]:active .game-card,
div[id*="game_card"].selected .game-card,
div[id*="game_card"].active .game-card {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.08) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,123,255,0.25) !important;
}

/* Keep active container styling even when not hovering */
div[id*="game_card"].selected:not(:hover) .game-card,
div[id*="game_card"].active:not(:hover) .game-card {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.06) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2) !important;
}

/* === DANGER BATTER CARD STYLES === */
/* Danger card wrapper styling for clickable containers */
.danger-card-wrapper {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border-radius: 0.375rem;
    /* Ensure button elements don't inherit unwanted styles */
    background: none;
    border: none;
    outline: none;
}

.danger-card-wrapper:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.danger-card-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
    border-color: #dc3545 !important; /* Use danger color for danger cards */
}

.danger-card-wrapper:active,
.danger-card-wrapper.selected {
    border-color: #dc3545 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2) !important;
    transform: translateY(-1px);
}

/* Empty danger card wrapper styling */
.danger-card-empty-wrapper {
    transition: all 0.2s ease-in-out;
    cursor: default;
    border-radius: 0.375rem;
    /* Ensure button elements don't inherit unwanted styles */
    background: none;
    border: none;
    outline: none;
}

.danger-card-empty-wrapper:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    border-color: #6c757d !important;
}

/* Legacy danger card styles - kept for compatibility */
.danger-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    min-height: 140px;
    max-height: 160px;
    max-width: 320px;
    border: 1px solid #dee2e6;
    background-color: white;
}

.danger-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
    border-color: #dc3545 !important; /* Use danger color for danger cards */
    background-color: rgba(220, 53, 69, 0.02) !important;
}

.danger-card:active,
.danger-card.selected {
    border-color: #dc3545 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2) !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
    transform: translateY(-1px);
}

/* Empty danger card styling - scaled up */
.danger-card-empty {
    transition: all 0.2s ease-in-out;
    min-height: 140px;
    max-height: 160px;
    max-width: 320px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.danger-card-empty:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    border-color: #6c757d !important;
}

/* Team logo fallback styling */
.game-card img {
    /* If logo fails to load, show a fallback background */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Style for broken/missing images */
.game-card img::before {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* Team logo container styles for fallback handling */
.team-logo-container {
    display: inline-flex;
    align-items: center;
    position: relative;
}

/* Team logo image styles */
.team-logo-img {
    display: block;
    transition: opacity 0.2s ease;
}

/* Team logo fallback badge */
.team-logo-fallback {
    display: none;
    width: 26px;
    height: 26px;
    margin-right: 6px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
    line-height: 24px;
    flex-shrink: 0;
    cursor: help;
}

/* JavaScript-free CSS fallback for broken images */
.team-logo-img[src=""] {
    display: none;
}

.team-logo-img[src=""]:not([src]) + .team-logo-fallback {
    display: inline-block;
}

/* Enhanced game card styling to prevent grey backgrounds */
.game-card {
    background-color: white !important;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    min-height: 90px;
    max-height: 105px;
}

.game-card .card-body {
    background-color: white !important;
    padding: 0.5rem;
}

/* Ensure team logo containers maintain alignment even with fallbacks */
.game-card .team-logo-container {
    min-width: 32px; /* Reserve space for logo/fallback */
    justify-content: flex-start;
}

/* Center align incomplete rows of game cards */
#mlb_daily_barrels_schedule_cards_row {
    justify-content: center;
}

/* === MLB BATTER LINEUP TABLE STYLING === */
/* Custom styling for the batter lineup cards to match other table themes */
.batter-lineup-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-sm, 4px);
    margin-bottom: 0.5rem;
}

.batter-lineup-card:hover {
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.1));
    transform: translateY(-1px);
}

/* Header styling to match table headers */
.batter-lineup-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color, #dee2e6);
    font-weight: 600;
    color: var(--text-color, #212529);
}

/* Player row styling */
.batter-lineup-row {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.batter-lineup-row:hover {
    background-color: rgba(25, 118, 210, 0.05);
}

.batter-lineup-row:last-child {
    border-bottom: none;
}

/* Expand button styling */
.batter-expand-btn {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batter-expand-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Collapsible content styling */
.batter-detail-content {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color, #dee2e6);
}

.batter-detail-content .card-body {
    padding: 1rem;
}

/* Stats text alignment and formatting */
.batter-stat-value {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.batter-stat-na {
    color: var(--muted-text-color, #6c757d);
    font-style: italic;
}

/* Player name styling */
.batter-player-name {
    font-weight: 600;
    color: var(--text-color, #212529);
}

/* Order number styling */
.batter-order-number {
    font-weight: 700;
    color: var(--primary-color, #1976D2);
    font-size: 1.1em;
}

/* === PITCHER ADVANCED STATS BADGE STYLING === */
/* Custom Pantone colors for pitcher advanced stats badges */

/* K% - Higher is better (Sea Green for excellent, Goldenrod for good, Indian Red for poor) */
.pitcher-stat-k-excellent {
    background-color: #2E8B57 !important; /* Sea Green */
    color: white !important;
    border: 1px solid #2E8B57 !important;
}

.pitcher-stat-k-good {
    background-color: #DAA520 !important; /* Goldenrod */
    color: white !important;
    border: 1px solid #DAA520 !important;
}

.pitcher-stat-k-poor {
    background-color: #CD5C5C !important; /* Indian Red */
    color: white !important;
    border: 1px solid #CD5C5C !important;
}

/* BB%, WHIP, BAA, wOBA Against, Barrel% Against - Lower is better */
.pitcher-stat-excellent {
    background-color: #4169E1 !important; /* Royal Blue */
    color: white !important;
    border: 1px solid #4169E1 !important;
}

.pitcher-stat-decent {
    background-color: #FF8C00 !important; /* Dark Orange */
    color: white !important;
    border: 1px solid #FF8C00 !important;
}

.pitcher-stat-poor {
    background-color: #DC143C !important; /* Crimson */
    color: white !important;
    border: 1px solid #DC143C !important;
}

/* N/A values */
.pitcher-stat-na {
    background-color: #6c757d !important; /* Bootstrap secondary gray */
    color: white !important;
    border: 1px solid #6c757d !important;
}

/* Hover effects for pitcher stat badges */
.pitcher-stat-k-excellent:hover,
.pitcher-stat-k-good:hover,
.pitcher-stat-k-poor:hover,
.pitcher-stat-excellent:hover,
.pitcher-stat-decent:hover,
.pitcher-stat-poor:hover,
.pitcher-stat-na:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* === SOCCER GAME CARD OVERRIDES === */
/* Soccer game card overrides - remove height constraints that cut off cards */
.soccer-game-card {
    max-height: none !important;
    min-height: auto !important;
    height: auto !important;
}

.soccer-game-card .card-body {
    padding: 0.75rem !important;
}

/* Ensure soccer cards have proper spacing and aren't cut off */
.soccer-game-card .card {
    height: auto !important;
    min-height: auto !important;
}

/* Soccer lineup styling */
.lineup-player {
    transition: background-color 0.2s ease;
    border: 1px solid #e9ecef !important;
}

.lineup-player:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    border-color: #007bff !important;
}

/* === MLB PITCHER RANKINGS MOBILE STYLES === */
/* Fix mobile table scrolling for pitcher rankings */
.pitcher-rankings-table-container {
    width: 100%;
    overflow: visible !important;
}

/* Mobile-specific pitcher rankings table styling */
@media (max-width: 768px) {
    /* Fix table container scrolling on mobile */
    .pitcher-rankings-table-container {
        width: 100%;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    /* Ensure the DataTable container is scrollable */
    .pitcher-rankings-table-container .dash-table-container {
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    
    /* Fix viewport constraints that lock scrolling */
    .pitcher-rankings-table-container .dash-spreadsheet-container {
        max-height: none !important; /* Remove height constraint */
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    
    /* Ensure the table itself is scrollable */
    .pitcher-rankings-table-container .dash-spreadsheet {
        overflow-x: auto !important;
        overflow-y: visible !important;
        max-height: none !important;
    }
    
    /* Make table take minimum width for horizontal scroll */
    .pitcher-rankings-table-container table {
        min-width: 600px; /* Force horizontal scroll on small screens */
    }
    
    /* Sticky pitcher name column on mobile */
    .pitcher-rankings-table-container td[data-dash-column="pitcher_name"],
    .pitcher-rankings-table-container th[data-dash-column="pitcher_name"] {
        position: sticky !important;
        left: 0 !important;
        background-color: white !important;
        z-index: 2 !important;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    /* Mobile sort button styling */
    .mobile-sort-controls {
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 10;
        padding: 0.5rem 0;
        border-bottom: 2px solid #dee2e6;
        margin-bottom: 0.5rem;
    }
    
    .mobile-sort-btn {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
        white-space: nowrap;
    }
    
    .mobile-sort-btn:focus,
    .mobile-sort-btn:active {
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25) !important;
    }
    
    /* Active sort button styling */
    .mobile-sort-btn.active {
        background-color: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }
    
    .mobile-sort-btn.btn-outline-danger.active {
        background-color: var(--danger-color) !important;
        border-color: var(--danger-color) !important;
    }
    
    .mobile-sort-btn.btn-outline-info.active {
        background-color: var(--info-color) !important;
        border-color: var(--info-color) !important;
    }
    
    /* Adjust tab content to prevent overflow issues */
    #mlb_daily_barrels_pitcher_rankings_tabs .tab-content {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    /* Smaller text on mobile for better fit */
    .pitcher-rankings-table-container .dash-cell {
        font-size: 0.75rem !important;
        padding: 4px !important;
    }
    
    /* Smaller header text */
    .pitcher-rankings-table-container .dash-header {
        font-size: 0.7rem !important;
        padding: 4px !important;
    }
    
    /* Hide tooltip on mobile to prevent overlap */
    .pitcher-rankings-table-container .dash-tooltip {
        display: none !important;
    }
}

/* Landscape mode specific adjustments */
@media (max-width: 812px) and (orientation: landscape) {
    .pitcher-rankings-table-container .dash-spreadsheet-container {
        max-height: 60vh !important; /* Use more screen in landscape */
    }
    
    .mobile-sort-controls {
        padding: 0.25rem 0;
    }
    
    .mobile-sort-btn {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Portrait mode specific adjustments */
@media (max-width: 768px) and (orientation: portrait) {
    .pitcher-rankings-table-container .dash-spreadsheet-container {
        max-height: 70vh !important; /* More height in portrait */
    }
    
    /* Stack sort buttons 2x2 in portrait mode */
    .mobile-sort-controls .btn-group {
        flex-wrap: wrap !important;
        width: 100%;
        justify-content: center;
    }
    
    .mobile-sort-controls .btn-group .btn {
        width: 45%;
        margin: 2px;
    }
}