/* assets/components.css - UI components and interactive elements */

/* 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 */
}

/* 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;
}

.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;
}

/* 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;
}

/* 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;
}

/* 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);
}

/* 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;
}

/* === 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; */
}

/* 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; */
}

/* --- 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; */
}

/* === 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;
}

/* === 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);
}

/* === 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;
}

/* === 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;
}

/* === 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;
}

/* Override for the FEATURED badge in defensive weaknesses card - allow full width */
.defensive-weaknesses-card .badge {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !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;
}

/* === 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;
}

/* === NBA GAME CARD OVERRIDES === */
/* NBA game card overrides - game cards slightly smaller than defensive weakness card */
.nba-game-card {
    height: 127px !important;
    min-height: 127px !important;
    max-height: 127px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.defensive-weaknesses-card {
    height: 128px !important;
    min-height: 128px !important;
    max-height: 128px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.nba-game-card .card-body,
.defensive-weaknesses-card .card-body {
    padding: 0.5rem !important;
    overflow: hidden !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Ensure NBA card wrappers stretch to fill column height */
.nba-game-card .card {
    height: 127px !important;
    min-height: 127px !important;
    max-height: 127px !important;
    overflow: hidden !important;
}

.defensive-weaknesses-card .card {
    height: 128px !important;
    min-height: 128px !important;
    max-height: 128px !important;
    overflow: hidden !important;
}

/* === SOCCER GAME CARD OVERRIDES === */
/* Soccer game card overrides - set consistent height for desktop layout */
.soccer-game-card,
.card.soccer-game-card,
div.soccer-game-card {
    max-height: none !important;
    min-height: 145px !important;  /* Reduced by 30% from 200px (15% + 15%) for better desktop layout */
    height: 145px !important;  /* Force exact height */
}

.soccer-game-card .card-body {
    padding: 0.5rem !important;  /* Reduced padding to help achieve target height */
    height: 100% !important;
}

/* Ensure soccer cards have proper spacing */
.soccer-game-card .card,
.soccer-game-card > .card {
    height: 145px !important;  /* Force exact height */
    min-height: 145px !important;  /* Match parent card height */
    max-height: 145px !important;  /* Prevent expansion */
}

/* 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;
}

/* Captain badge - high contrast gold instead of yellow */
.captain-gold {
    color: #D4AF37 !important;  /* Metallic gold for accessibility */
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.5));
    font-size: 0.9rem;
}

/* Lineup stat badges - improved contrast (no yellow) */
.lineup-stat-badge-primary {
    background-color: #0056b3 !important;  /* Darker blue */
    color: white !important;
}

.lineup-stat-badge-info {
    background-color: #117a8b !important;  /* Darker teal */
    color: white !important;
}

/* Small badge styling (replacement for size="sm" which isn't supported in dbc 2.0.4) */
.badge-sm {
    font-size: 0.75rem !important;
    padding: 0.25em 0.5em !important;
}

/* === LINEUP COMPONENT STYLING === */

/* Lineup card - better visibility with increased opacity */
.lineup-card {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Lineup header - visible background */
.lineup-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
    padding: 0.75rem 1rem !important;
}

/* Player card - clickable with hover effect */
.lineup-player {
    transition: all 0.2s ease-in-out;
    background-color: white;
}

.lineup-player:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    border-color: rgba(0, 123, 255, 0.3) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Player caret icon - rotates when dropdown is open */
.player-caret {
    transition: transform 0.3s ease-in-out;
}

/* Rotate caret when player stats are expanded (using Bootstrap's aria-expanded) */
.lineup-player[aria-expanded="true"] .player-caret {
    transform: rotate(180deg);
}

/* Player stats collapse - smooth animation (Bootstrap handles this) */
.collapse {
    transition: height 0.35s ease;
}

/* === CLICKABLE STAT BADGES (Badge-style layout - Light Blue Indicator) === */
/* Hover effect for clickable stat badges - enhanced with blue theme */
.stat-badge-clickable {
    transition: all 0.2s ease;
}

.stat-badge-clickable:hover {
    background-color: #cce5ff !important;  /* Darker blue on hover */
    border-color: #80bdff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.2) !important;
    cursor: pointer;
}

.stat-badge-clickable:active {
    background-color: #b3d7ff !important;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.15) !important;
}

/* Game log toggle button hover effect */
.game-log-toggle:hover {
    background-color: rgba(0, 123, 255, 0.08) !important;
}

.game-log-toggle:active {
    background-color: rgba(0, 123, 255, 0.12) !important;
}

/* Game log area styling */
.game-log-area {
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Game log table styling */
.game-log-table {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    width: 100%;
}

.game-log-table td,
.game-log-table th {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.8rem;
}

.game-log-table thead {
    background-color: rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 10;
}

.game-log-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}
/* === TOP PLAYERS SECTION - xGC+ Cards === */
/* Maximize card width with no Bootstrap gaps (g-0), add minimal internal spacing */
/* Keep 3 cards per row on large screens, 2 on medium, 1 on mobile */
/* High specificity to override Bootstrap .col classes */

/* Mobile - full width with small margin */
@media (max-width: 767px) {
    .col.top-player-card-wrapper,
    .top-player-card-wrapper.col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .col.top-player-card-wrapper > div,
    .top-player-card-wrapper.col > div {
        margin: 0 2px !important;
    }
}

/* Tablets (md) - 2 cards per row */
@media (min-width: 768px) and (max-width: 991px) {
    .col.top-player-card-wrapper,
    .top-player-card-wrapper.col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .col.top-player-card-wrapper > div,
    .top-player-card-wrapper.col > div {
        margin: 0 3px !important;
    }
}

/* Large screens (lg+) - 3 cards per row with wider spacing */
@media (min-width: 992px) {
    .col.top-player-card-wrapper,
    .top-player-card-wrapper.col {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
    }

    .col.top-player-card-wrapper > div,
    .top-player-card-wrapper.col > div {
        margin: 0 8px !important;
    }
}

/* Extra large screens - wider cards and spacing */
@media (min-width: 1200px) {
    .col.top-player-card-wrapper,
    .top-player-card-wrapper.col {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
    }

    .col.top-player-card-wrapper > div,
    .top-player-card-wrapper.col > div {
        margin: 0 12px !important;
    }
}

/* XXL screens - maximum width with generous spacing */
@media (min-width: 1400px) {
    .col.top-player-card-wrapper,
    .top-player-card-wrapper.col {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
    }

    .col.top-player-card-wrapper > div,
    .top-player-card-wrapper.col > div {
        margin: 0 16px !important;
    }
}

/* Tooltip text contrast fixes */
.tooltip .tooltip-inner {
    background-color: #2c3e50 !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    text-align: left !important;
    max-width: 320px !important;
    padding: 0.75rem !important;
}

.tooltip .tooltip-inner .text-muted {
    color: #bdc3c7 !important;
    opacity: 1 !important;
}

.tooltip .tooltip-inner small.text-muted {
    color: #bdc3c7 !important;
    opacity: 1 !important;
}

/* Make sure tooltip text is readable */
.tooltip .tooltip-inner strong {
    color: #ffffff !important;
}

.tooltip .tooltip-inner table td {
    color: #ecf0f1 !important;
}

.tooltip .tooltip-inner table td.fw-bold {
    color: #ffffff !important;
}

/* Tooltip arrow color */
.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #2c3e50 !important;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #2c3e50 !important;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #2c3e50 !important;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #2c3e50 !important;
}

/* Top Players Info Icon Tooltip */
#soccer_daily_top_players_info_icon {
    transition: color 0.2s ease;
}

#soccer_daily_top_players_info_icon:hover {
    color: #495057 !important;
}

/* Ensure colored text in tooltip is visible on dark background */
.tooltip .tooltip-inner strong[style*="color"] {
    filter: brightness(1.2);
}

/* === PLAYER CARD FONT SIZE OVERRIDES === */
/* Force larger font sizes for better readability - highest specificity */

/* Player card stat badges (xG, Shots, SOT, Goals, Conv) - Increased 15% more */
div.top-player-card-wrapper span.d-inline-block.me-1.mb-1 {
    font-size: 0.72rem !important;
    padding: 0.29rem 0.54rem !important;
}

/* Player card stat badge icons - Increased 15% more */
div.top-player-card-wrapper span.d-inline-block.me-1.mb-1 i.fas,
div.top-player-card-wrapper span.d-inline-block.me-1.mb-1 i.far {
    font-size: 0.69rem !important;
}

/* Player name - Reduced slightly */
div.top-player-card-wrapper div.mb-2 strong {
    font-size: 0.9rem !important;
}

/* Games played text */
div.top-player-card-wrapper span.text-muted.me-2 {
    font-size: 0.9rem !important;
}

/* xGC+ badge container - Match other badges */
div.top-player-card-wrapper span.d-inline-block.px-2.py-1 {
    font-size: 0.72rem !important;
}

/* xGC+ label - Match other badges */
div.top-player-card-wrapper span.d-inline-block.px-2.py-1 > span:first-child {
    font-size: 0.72rem !important;
}

/* xGC+ value (bold number) - Match other badges */
div.top-player-card-wrapper span.d-inline-block.px-2.py-1 span.fw-bold {
    font-size: 0.72rem !important;
}

/* === SUMMARY STATS ICONS - LARGER (specific targeting) === */
/* Target only the soccer daily summary stats icons */
#soccer_daily_filter_card i.fas.fa-users,
#soccer_daily_filter_card i.fas.fa-trophy,
#soccer_daily_filter_card i.fas.fa-chart-bar,
#soccer_daily_filter_card i.fas.fa-medal {
    font-size: 1.2rem !important;
}

/* Summary stat values (numbers) */
#soccer_daily_filter_card span.fw-bold {
    font-size: 1.1rem !important;
}

/* === PLAYER CARD BOTTOM STATS - Increased 15% more === */
/* Target the stat badge rows (xG, xA, Shots, SOT, Goals, Conv) */
/* These are in divs with className="mb-1" or "mb-0" */

/* All stat badges within player cards */
div.top-player-card-wrapper div.p-2 > div span.me-1.mb-1 {
    font-size: 0.76rem !important;
    padding: 0.29rem 0.54rem !important;
}

/* Icons within stat badges */
div.top-player-card-wrapper div.p-2 > div span.me-1.mb-1 i {
    font-size: 0.69rem !important;
}

/* Make sure all bottom stats match */
div.top-player-card-wrapper div.mb-1 span.me-1.mb-1,
div.top-player-card-wrapper div.mb-0 span.me-1.mb-1 {
    font-size: 0.76rem !important;
    padding: 0.29rem 0.54rem !important;
}

/* Icons in bottom stats */
div.top-player-card-wrapper div.mb-1 span.me-1.mb-1 i,
div.top-player-card-wrapper div.mb-0 span.me-1.mb-1 i {
    font-size: 0.69rem !important;
}
