﻿/*.e-control{
    font-family: unset !important;
}*/

/* Dropdown Button - Fix positioning issues when inside sticky headers */
.e-dropdown-popup {
    z-index: 10001 !important;
}

/* Ensure dropdown buttons have proper positioning context */
.e-dropdown-btn {
    position: relative;
}

/* Leaders page dropdowns - limit height for scrolling with many items */
.leaders-dropdown.e-dropdown-popup ul,
.leaders-dropdown.e-dropdown-popup .e-dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

@media only screen and (max-width: 768px) {
    .leaders-dropdown.e-dropdown-popup ul,
    .leaders-dropdown.e-dropdown-popup .e-dropdown-menu {
        max-height: 300px;
    }

    /* Ensure dropdown buttons are visible and sized properly on mobile */
    .header-dropdowns-group .e-dropdown-btn {
        display: inline-flex !important;
        visibility: visible !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        font-size: 0.65rem !important; /* Smaller font */
        padding: 0.3rem 0.2rem !important; /* Less padding */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .header-dropdowns-group .e-dropdown-btn .e-btn-icon {
        font-size: 0.6rem !important; /* Smaller icon */
    }

    /* TeamSelect dropdown items - reduce font size on mobile */
    .e-dropdown-popup.team-select-popup .e-dropdown-menu li,
    .e-dropdown-popup .e-dropdown-menu li .custom-class,
    .custom-dropdown + .e-dropdown-popup .e-dropdown-menu li,
    .e-dropdown-popup ul li {
        font-size: 10px !important;
    }

    .e-dropdown-popup.team-select-popup .e-dropdown-menu li .custom-class,
    .custom-dropdown + .e-dropdown-popup .e-dropdown-menu li span {
        font-size: 10px !important;
    }

    /* TeamSelect dropdown images - reduce size on mobile */
    .e-dropdown-popup.team-select .icon {
        width: 22px !important;
    }
}

@media only screen and (max-width: 576px) {
    .header-dropdowns-group .e-dropdown-btn {
        font-size: 0.6rem !important; /* Even smaller */
        padding: 0.25rem 0.15rem !important; /* Very slim */
    }

    .header-dropdowns-group .e-dropdown-btn .e-btn-icon {
        font-size: 0.55rem !important;
    }
}

@media only screen and (max-width: 576px) {
    .header-dropdowns-group .e-dropdown-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Dialog - Ensure dialogs are always on top of header */
.e-dlg-overlay {
    z-index: 10001 !important;
}

.e-dialog {
    z-index: 10002 !important;
}

/* AI Report Dialog - Make iframe responsive to dialog height */
.e-dialog.ai-report-dialog .e-dlg-content {
    height: 100%;
    padding: 0;
}

.e-dialog.ai-report-dialog .ai-dialog-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.e-dialog.ai-report-dialog .copy-url-container {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.e-dialog.ai-report-dialog .copy-url-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--color-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: var(--color-primary);
    font-weight: 500;
}

.e-dialog.ai-report-dialog .copy-url-button:hover {
    background-color: var(--color-primary);
    color: white;
}

.e-dialog.ai-report-dialog .copy-url-button svg {
    fill: currentColor;
}

.e-dialog.ai-report-dialog .iframe-popup {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.e-dialog.ai-report-dialog .iframe-popup iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
    flex: 1;
}

/*  Tabs  */
.e-tab {
}

    .e-tab .e-content {
        /* Prevent content from expanding beyond viewport */
        /* dvh accounts for mobile browser chrome (address bar, bottom nav) that 100vh ignores */
        max-height: calc(100dvh - var(--header-height, 60px) - var(--tab-header-height, 52px) - var(--footer-height, 60px));
    }

    .e-tab .e-tab-header {
        background: transparent;
        display: flex;
        justify-content: flex-end;
        position: relative;
        z-index: 1;
    }

    .e-tab.e-fill .e-tab-header {
        min-height: 32px;
    }

.e-content .tab-header {
    display: flex;
    height: 52px;
    padding-inline: var(--p3);
    padding-block: var(--p2);
    line-height: unset;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    background-color: var(--color-primary);
    color: var(--color-light);
}

    .e-content .tab-header > * {
        color: var(--color-light);
    }

.e-tab .e-tab-header .e-toolbar-items {
    display: flex;
    gap: var(--gap1);
    margin-right: 10px;
}

.e-tab .e-content .e-item {
    border-radius: var(--border-radius) 0 var(--border-radius) var(--border-radius);
}

    .e-tab .e-content .e-item > *:not(.tab-header):not(.tab-content-scroll):not(.tab-content-no-scroll) {
        padding: var(--p3);
        background-color: var(--color-white);
    }

    .e-tab .e-content .e-item > *:last-of-type {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }



@media only screen and (max-width: 600px) {
    .e-tab .e-content .e-item > *:not(.tab-header):is(.scroll) {
        overflow-y: unset;
        max-height: unset;
    }
}

.e-tab .e-content .e-item > *:is(.container) {
    padding: 0;
}

.e-tab .e-control.inner .e-item > *:not(.tab-header) {
    background-color: var(--background-light);
}

.e-tab.e-fill .e-tab-header .e-toolbar-item:not(.e-separator) {
    min-height: unset;
    padding: 0 !important;
    margin: 0;
    height: unset;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
}

.e-tab.e-fill .e-tab-header .e-toolbar-item .e-tab-wrap {
    min-height: unset;
    padding: 0 !important;
    margin: 0;
    height: unset;
    cursor: pointer;
}



.e-tab.e-fill .e-tab-header .e-toolbar-item.e-active .e-tab-wrap {
    background-color: var(--color-club-primary) !important;
    border: none !important;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.e-tab .e-tab-header .e-toolbar-item .e-tab-text {
    color: var(--color-club-primary) !important;
    font-size: 18px !important;
    padding: 10px 15px;
    font-weight: 600;
}

.e-tab.e-fill .e-tab-header .e-toolbar-item.e-active .e-tab-text {
    color: var(--color-club-light) !important;
    -webkit-text-stroke-width: .03em;
    -webkit-text-stroke-color: var(--color-club-light) !important;
}

.e-tab.e-fill .e-tab-header .e-toolbar-item .e-tab-wrap:hover .e-tab-text {
    color: var(--color-club-primary) !important;
    -webkit-text-stroke-width: .03em;
    -webkit-text-stroke-color: var(--color-club-primary) !important;
}

.e-tab.e-fill .e-tab-header .e-toolbar-item.e-active .e-tab-wrap:hover .e-tab-text {
    color: var(--color-club-light) !important;
    -webkit-text-stroke-width: .03em;
    -webkit-text-stroke-color: var(--color-club-light) !important;
}

@media screen and (max-width: 786px) {
    .e-tab.e-fill .e-tab-header .e-toolbar-item .e-text-wrap {
        height: 32px !important;
    }

    .e-tab .e-tab-header .e-toolbar-item .e-tab-text {
        font-size: 12px !important;
        padding: 0;
        padding-inline: var(--p2);
    }

    .e-tab.e-fill .e-tab-header .e-hscroll-content .e-toolbar-item .e-tab-wrap {
        padding: 0;
    }
}

.e-tab .e-tab-header .e-toolbar-item {
    background-color: var(--color-light) !important;
}


.e-tab .e-tab-header .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:last-child {
    /* margin: 0; */
    /* padding-bottom: 0; */
}

.e-tab .e-tab-header .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:first-child, .e-tab .e-tab-header .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:last-child {
    /* margin: 0; */
}

.e-tab .e-tab-header .e-scroll-nav, .e-tab .e-tab-header .e-hscroll:not(.e-scroll-device) .e-scroll-nav {
    background: var(--color-primary);
}

    .e-tab .e-tab-header .e-scroll-nav .e-nav-arrow, .e-tab .e-tab-header .e-hscroll:not(.e-scroll-device) .e-scroll-nav .e-nav-arrow {
        color: var(--color-light);
    }

.e-profile {
    display: flex !important;
    position: unset !important;
}

@media only screen and (max-width: 786px) {
    .e-tab .e-tab-header .e-scroll-nav {
        height: 32px !important;
        min-height: 32px !important;
        margin-bottom: -1px;
    }

    .e-tab.e-fill .e-tab-header .e-toolbar-items {
        min-height: 32px;
    }
}

.e-grid .e-headercell {
    border-color: var(--color-primary) !important;
}


.e-grid .e-headercell, .e-grid .e-detailheadercell {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
}

/* Leaderboard / Recruiter grids: remove all cell padding (cells should be flush) */
.recruiter.e-grid .e-gridcontent .e-rowcell {
    padding: 0 !important;
}

/* Keep header cells flush on the left but add right padding so the filter button stays inside the cell */
.recruiter.e-grid .e-gridheader .e-headercell {
    padding: 0 5px 0 0 !important;
}

/* Note: Grid cell padding should be controlled by individual grid components */

/*web - toolbar*/
.e-tab .e-tab-header .e-toolbar-items {
    align-items: end;
    gap: 0;
}

.e-tab.e-fill .e-tab-header .e-toolbar-item:not(.e-separator) {
    margin-bottom: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}


.e-custom-edit {
    display: flex;
    position: unset !important;
}

.e-dropdowns {
    display: flex;
    visibility: visible !important;
}
/* SfDialog - Remove white border */
.e-dialog {
    border: none !important;
}

/* SfDialog close icon - always visible in all states */
.e-dlg-header-content .e-icon-dlg-close,
.e-dlg-header .e-dlg-closeicon-btn,
.e-dlg-header .e-dlg-closeicon-btn .e-icon-dlg-close,
.e-btn.e-dlg-closeicon-btn,
.e-btn.e-dlg-closeicon-btn span,
.e-btn.e-dlg-closeicon-btn .e-btn-icon {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Override hover states */
.e-dlg-header .e-dlg-closeicon-btn:hover,
.e-dlg-header .e-dlg-closeicon-btn:focus,
.e-dlg-header .e-dlg-closeicon-btn:active,
.e-btn.e-dlg-closeicon-btn:hover span,
.e-btn.e-dlg-closeicon-btn:focus span,
.e-btn.e-dlg-closeicon-btn:active span {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure icon color is always visible */
.e-icon-dlg-close,
.e-btn.e-dlg-closeicon-btn .e-icon-dlg-close {
    color: #fff !important;
}
.e-btn.e-flat{
    color:white;
}

.e-dialog.e-popup.modal {
    max-width: 1200px;
}

.e-dialog .e-dlg-header-content {
    padding: var(--p3);
    background-color: var(--color-primary);
}

.pd-draft-dialog .e-dlg-header {
    height: 147px;
    padding: 0px !important;
}

.pd-draft-dialog .e-dlg-header-content {
    padding: 0px !important;
    background-image: url('/_content/TeamTracker.Shared/Images/pddraft-header.png');
}

.pd-draft-dialog .e-btn.e-dlg-closeicon-btn {
    margin: 5px;
}

@media only screen and (max-width: 600px) {
    .pd-draft-dialog .e-dlg-header-content {
        background-size: cover;
        background-position: center;
        min-height: 10px;
        max-height: 100px; /* adjust as needed for mobile */
        /* Optionally use a different image for mobile:
        background-image: url('/_content/TeamTracker.Shared/Images/pddraft-header-mobile.png');
        */
    }
}

.e-dialog .e-dlg-header {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.e-icon-dlg-close {
    color: #fff;
}

.e-dialog .e-btn.e-dlg-closeicon-btn:hover span {
    color: #fff;
}

.e-profile.e-img-editor {
    flex-direction: column !important;
    align-items: center;
}

    .e-profile.e-img-editor .e-custom-wrapper {
        display: flex;
        flex-direction: column !important;
        align-items: center;
    }

        .e-profile.e-img-editor .e-custom-wrapper img {
            transform: scale(70%);
            border-radius: 50%;
        }


.e-headertext {
    font-family: system-ui !important;
    font-weight: 700 !important;
    font-size: 1em !important;
}

.e-grid .e-gridcontent .e-rowcell {
    font-family: system-ui !important;
    font-weight: 400 !important;
    font-size: 1em !important;
}

@media only screen and (max-width: 786px) {

    .e-headertext {
        font-size: 12px !important;
    }

    .e-grid .e-gridcontent .e-rowcell {
        font-weight: 700 !important;
        font-size: .8em !important;
        line-height: 1;
        padding: 0;
    }

    .e-content .tab-header {
        display: flex;
        height: auto;
        padding-inline: var(--p3);
        padding-block: var(--p2);
        line-height: unset;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        background-color: var(--color-primary);
        color: var(--color-light);
    }
}

.e-bigger.e-grid.e-row-responsive .e-gridcontent .e-row {
    display: grid;
}

.e-grid.e-device .e-rowcell:first-child, .e-grid.e-device .e-summarycell:first-child {
    padding: 0;
}

.e-bigger.e-grid.e-row-responsive .e-gridcontent .e-row td:first-of-type::before {
    visibility: hidden;
    width: 0;
}

.e-bigger.e-grid.e-row-responsive .e-gridcontent .e-row td:not(:first-of-type) {
    display: flex;
    flex-direction: column;
}


.e-grid .e-headercell {
    background-color: var(--color-primary) !important;
    color: var(--color-light) !important;
}

.e-grid .e-gridheader .e-icons:not(.e-icon-hide):not(.e-check):not(.e-stop):not(.e-icon-reorderuparrow):not(.e-icon-reorderdownarrow) {
    color: var(--color-light) !important;
}

.e-grid th.e-headercell[aria-sort=ascending]:not(.e-columnselection) .e-headertext, .e-grid th.e-headercell[aria-sort=descending]:not(.e-columnselection) .e-headertext, .e-grid th.e-headercell[aria-sort=ascending] .e-sortfilterdiv, .e-grid th.e-headercell[aria-sort=descending] .e-sortfilterdiv {
    color: var(--color-light) !important;
}


.e-dropdown-btn, .e-dropdown-btn.e-btn {
    display: flex;
    border-radius: var(--border-radius);
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    font-weight: 600 !important;
    font-family: var(--font-body);
}


.e-dropdown-popup {
    border-radius: var(--border-radius);
}

.e-dropdown-btn.e-active, .e-dropdown-btn.e-btn.e-active {
    background: var(--color-accent) !important;
}

.e-dropdown-btn:focus, .e-dropdown-btn.e-btn:focus {
    box-shadow: unset;
}

.e-dropdown-btn .icon, .e-dropdown-btn.e-btn .icon {
    margin-left: var(--m2);
}

.e-dropdown-btn .e-btn-icon:not(.e-caret), .e-dropdown-btn.e-btn .e-btn-icon:not(.e-caret) {
    color: var(--color-accent);
}

.e-dropdown-btn .e-btn-icon:is(.e-caret), .e-dropdown-btn.e-btn .e-btn-icon:is(.e-caret) {
    display: none;
}

.e-dropdown-menu {
    max-height: 80vh;
    overflow: auto !important;
    padding: var(--p2) !important;
}

.e-dropdown-popup ul {
    border-radius: var(--border-radius);
}

    .e-dropdown-popup ul .e-item > *,
    .e-dropdown-popup ul .e-disabled {
        font-family: var(--font-body);
        text-transform: uppercase;
        font-weight: 700;
        color: var(--color-primary) !important;
        display: flex;
        align-self: center;
    }

    .e-dropdown-popup ul .e-item.logout {
        background-color: var(--color-accent);
        border-radius: var(--border-radius);
    }

        .e-dropdown-popup ul .e-item.logout > * {
            color: var(--color-white) !important;
        }

    .e-dropdown-popup ul .e-disabled {
        font-weight: 800;
        opacity: 1;
    }

    .e-dropdown-popup ul .e-item:hover {
        background: var(--color-primary);
        border-radius: var(--border-radius);
    }

        .e-dropdown-popup ul .e-item:hover > * {
            color: var(--color-light) !important;
        }

@media only screen and (max-width:786px) {
    .e-dropdown-btn:is(.user-nav) {
        text-indent: -9999em;
        padding-left: 2px;
    }

    .e-dropdown-btn:is(.user-nav) {
        background-color: unset !important;
    }

        .e-dropdown-btn:is(.user-nav) .icon {
            fill: var(--color-primary);
        }
}

.e-dropdown-popup.team-select ul .e-item {
    margin-bottom: .1em;
}

    .e-dropdown-popup.team-select ul .e-item span {
        margin-inline: .2em;
    }


    .e-dropdown-popup.team-select ul .e-item:hover {
        background: transparent;
        border-radius: var(--border-radius);
        border: solid 1px var(--color-primary);
    }

        .e-dropdown-popup.team-select ul .e-item:hover > * {
            color: var(--color-primary) !important;
        }

.e-dropdown-popup.team-select .icon {
    /* height: auto; */
    width: 24px;
    background-color: #fff;
    margin-top: .2em;
    margin-left: .25em;
    margin-right: 1px;
}

.e-switch-wrapper {
    width: 80px;
}

.recruiter .e-switch-wrapper {
    width: 40px !important;
}

.e-switch-wrapper .e-switch-inner {
    background-color: transparent !important;
    border-width: 1.5px !important;
    border-color: var(--color-light) !important;
}

.recruiter .e-switch-wrapper .e-switch-inner {
    background-color: transparent !important;
    border-color: var(--color-primary) !important;
}

.recruiter .e-switch-wrapper .e-switch-on {
    background-color: #0d6efd !important;
}

.e-switch-wrapper .e-switch-on {
    background-color: transparent;
    font-weight: 700 !important;
}

.e-switch-wrapper .e-switch-off {
    background-color: transparent;
    color: unset;
    font-weight: 700 !important;
}



.e-switch-wrapper:hover .e-switch-inner.e-switch-active .e-switch-on {
    background-color: transparent;
}

.e-switch-wrapper.fav-switch {
    width: 120px;
    height: 25px;
}

    .e-switch-wrapper.fav-switch .e-switch-on,
    .e-switch-wrapper.fav-switch .e-switch-off {
        font-size: 10px;
    }

    .e-switch-wrapper.fav-switch .e-switch-inner.e-switch-active .e-switch-on {
        background-color: var(--color-primary);
    }

.e-control.e-chart rect {
    fill: var(--color-light);
}

.e-control.e-chart text {
    fill: var(--color-primary);
    font-family: system-ui;
}

.recruiter .e-switch-handle {
    background-color: var(--color-dark) !important;
}

.e-toolbar .e-toolbar-item.e-spacer {
    /*Aligns toolbar to the left*/
    flex-grow: 0;
}

.talentbadge .e-badge {
    height: 40px;
    padding: 0px;
    font-size: 24px;
    border-radius: 20px;
    width: 40px;
    line-height: 36px;
}

.e-grid.sf-grid .e-gridcontent .e-content {
    overflow-y: auto !important;
}

.survey-answer .e-active {
    background: red;
}

.survey-answer > button.qtype-12.answ-1.e-active {
    background: green !important;
}

.survey-answer > button.qtype-12.answ-2.e-active {
    background: orange !important;
}

.survey-answer > button.qtype-12.answ-3.e-active {
    background: red !important;
}

.talentbadge > span.qtype-12.answ-1 {
    background: green !important;
    color: white !important;
}

.talentbadge > span.qtype-12.answ-2 {
    background: orange !important;
    color: white !important;
}

.talentbadge > span.qtype-12.answ-3 {
    background: red !important;
    color: white !important;
}

/* Leaderboard table - complete the flex chain so the SfGrid fills the page.
   The chain from layout root → leaders-grid-wrapper is set in Leaders.razor.css.
   These rules continue that chain inside the LeaderboardTableSF component. */
.leaderboard-outer-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.leaderboard-search-bar {
    flex-shrink: 0;
}

.leaderboard-grid-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Fix for FixtureSummaryView tabs scrolling - ONLY apply to default-tab */
.default-tab.e-fill {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.default-tab.e-fill .e-tab-header {
flex-shrink: 0 !important;
}

.default-tab.e-fill > .e-content {
flex: 1 !important;
max-height: none !important;
overflow: hidden !important;
display: flex !important;
flex-direction: column !important;
min-height: 0 !important;
}

.default-tab.e-fill > .e-content > .e-item {
overflow: hidden !important;
height: 100% !important;
display: flex !important;
flex-direction: column !important;
}

    .default-tab.e-fill > .e-content > .e-item .tab-content-scroll {
        padding: 0 !important;
        flex: 1 !important;
        overflow-y: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        background-color: var(--color-white);
    }

.tab-content-scroll .tab-header {
   position: relative !important;
    top: unset !important;
    z-index: 10;
    border-bottom: 1px solid #eee;
    flex-shrink: 0 !important;
}

.tab-content-scroll .tab-body {
    display: grid !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
    padding: var(--p3) !important;
}

@media only screen and (max-width: 786px) {
    /* Safe-zone so player cards don't scroll behind the fixed footer.
       .banner-bar (70px) + .footer-bar (~65px) = ~135px total footer height. */
    .tab-content-scroll .tab-body {
        padding-bottom: 10px !important;
    }
}

html:has(.fixture-summary-container),
body:has(.fixture-summary-container) {
    overflow: hidden !important;
    height: 100dvh !important;
}

#app:has(.fixture-summary-container) {
    overflow: hidden !important;
}

.default-tab.e-fill > .e-content > .e-item .tab-content-no-scroll {
    padding: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    background-color: var(--color-white);
}

.tab-content-no-scroll .tab-header {
    position: relative !important;
    top: unset !important;
    z-index: 10;
    border-bottom: 1px solid #eee;
    flex-shrink: 0 !important;
}

.table-scroll-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
    padding: var(--p3);
}

/* Allow Syncfusion Grid to handle horizontal scrolling for frozen columns */
.table-scroll-container .e-grid {
    width: 100% !important;
    overflow: visible !important;
}

/* Allow both header and content to scroll horizontally */
.table-scroll-container .e-grid .e-gridheader {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.table-scroll-container .e-grid .e-gridcontent {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* Target the actual scrollable containers inside header and content */
.table-scroll-container .e-grid .e-gridheader .e-headercontent {
    overflow-x: auto !important;
    /* Hide scrollbar on header */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar on header for WebKit browsers */
.table-scroll-container .e-grid .e-gridheader .e-headercontent::-webkit-scrollbar {
    display: none;
}

.table-scroll-container .e-grid .e-gridcontent .e-content {
    overflow-x: auto !important;
}
.grid-sf-child {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

/* PlayerHistoryTable mobile */
@media (max-width: 768px) {
    .player-history-grid {
        font-size: 9px !important;
    }

    .player-history-grid .e-gridheader,
    .player-history-grid .e-gridcontent {
        font-size: 9px !important;
    }

    .player-history-grid .e-headercell {
        padding: 2px 3px !important;
        height: 28px !important;
    }

    .player-history-grid .e-rowcell {
        padding: 2px 3px !important;
        height: 26px !important;
    }
}

.grid-sf-child > .default-tab {
        min-height: 0;
        overflow: hidden;
    }

/* SfGrid Player Stats Table - Mobile Responsive */
/* Don't apply these overflow rules to grids inside .table-scroll-container */
.e-grid.recruiter:not(.table-scroll-container .e-grid) {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

.e-grid.recruiter:not(.table-scroll-container .e-grid) .e-gridcontent {
    overflow-x: auto !important;
}

.e-grid.recruiter:not(.table-scroll-container .e-grid) .e-content {
    overflow-x: auto !important;
}

.e-grid.recruiter .e-headercell,
.e-grid.recruiter .e-rowcell {
    white-space: nowrap;
}

/* Add padding-left to left-aligned columns in recruiter grids */
.e-grid.recruiter .e-headercell[style*="text-align: left"],
.e-grid.recruiter .e-rowcell[style*="text-align: left"],
.e-grid.recruiter th.e-headercell.e-leftfreeze,
.e-grid.recruiter td.e-rowcell.e-leftfreeze,
.e-grid.recruiter .e-leftalign,
.e-grid.recruiter .e-gridheader th.e-headercell:nth-child(-n+2),
.e-grid.recruiter .e-gridheader .e-headercell:nth-child(-n+2) {
    padding-left: 5px !important;
}

/* LeaderboardTableSF: zero body cell padding.
   Class-only specificity (0,4,0) intentionally lets the e-leftfreeze rule (0,4,1)
   win for frozen text cells (Name, Team), preserving their 5px left padding. */
.leaderboard-grid-container .e-grid.recruiter .e-rowcell {
    padding: 0 !important;
}

/* Stat cells: position:relative on the td makes it the containing block, then
   position:absolute + inset:0 on .stat-cell fills it edge-to-edge. This bypasses
   height:100% which resolves to auto (content ~16px) inside CSS table-layout cells. */
.leaderboard-grid-container .e-grid.recruiter .e-rowcell:has(.stat-cell) {
    position: relative !important;
    line-height: 0 !important;
}

.leaderboard-grid-container .e-grid.recruiter .e-rowcell:has(.stat-cell) .e-cellvalue {
    padding: 0 !important;
}

.leaderboard-grid-container .e-grid.recruiter .e-rowcell .stat-cell {
    position: absolute !important;
    inset: 0 !important;
    height: auto !important;
    line-height: normal !important;
}

@media only screen and (max-width: 768px) {
    .e-grid.recruiter {
        font-size: 9px !important;
    }

    .e-grid.recruiter .e-headercell,
    .e-grid.recruiter .e-rowcell {
        padding: 2px 1px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        height: 24px !important;
    }

    .e-grid.recruiter .e-headercell {
        height: 28px !important;
    }

    .e-grid.recruiter .e-headertext {
        font-size: 9px !important;
        font-weight: 600 !important;
    }

    .e-grid.recruiter .e-row {
        height: 24px !important;
    }

    .e-grid.recruiter .e-toolbar {
        padding: 4px !important;
    }

    .e-grid.recruiter .e-toolbar .e-btn {
        font-size: 8px !important;
        padding: 3px 6px !important;
        min-height: 24px !important;
    }

    .e-grid.recruiter .e-toolbar .e-input-group {
        font-size: 9px !important;
    }

    .e-grid.recruiter .e-toolbar .e-input-group input {
        font-size: 9px !important;
        padding: 2px 4px !important;
        height: 24px !important;
    }

    .e-grid.recruiter img {
        max-width: 20px !important;
        max-height: 20px !important;
    }

    .e-grid.recruiter .e-link {
        font-size: 9px !important;
        padding: 0 !important;
    }

    /* Reduce column widths for compact view */
    .e-grid.recruiter .e-gridheader colgroup col,
    .e-grid.recruiter .e-gridcontent colgroup col {
        min-width: 35px !important;
    }

    /* Tighter spacing for number cells */
    .e-grid.recruiter .e-rowcell[aria-label*="column header"] {
        padding: 1px 2px !important;
    }

    }

/* High z-index for fixture vision dialog */
.fixture-vision-dialog {
    z-index: 99999 !important;
}

.fixture-vision-dialog .e-dlg-overlay {
    z-index: 99998 !important;
}

/* PlayerActivitySummary: right column SfTab fills column height so the SfGrid is bounded.
   The column is already display:flex; flex-direction:column from the base Container rules.
   These rules extend the flex chain through the SfTab layers down to the stat-summary div. */
.summary-content .column-right .default-tab.e-fill {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.summary-content .column-right .default-tab.e-fill .e-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    max-height: none;
}

.summary-content .column-right .default-tab.e-fill .e-content .e-item.e-active {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* PlayerActivitySummary: On mobile, reset flex height rules for right column SfTab.
   When columns stack vertically, column-right has height:auto so height:100% on
   .default-tab.e-fill and .e-item collapses to 0 and overflow:hidden clips all content. */
@media only screen and (max-width: 786px) {
    .summary-content .column-right .default-tab.e-fill {
        height: auto !important;
    }

    .summary-content .column-right .default-tab.e-fill .e-content {
        flex: none !important;
        height: auto !important;
        overflow: visible !important;
        min-height: unset !important;
        display: block !important;
    }

    .summary-content .column-right .default-tab.e-fill .e-content .e-item {
        height: auto !important;
        overflow: visible !important;
    }

    /* Allow the SfGrid inside the stat summary to grow to full content height
       instead of rendering with a fixed height and internal scrollbar. */
    .summary-content .column-right .e-grid {
        height: auto !important;
        max-height: none !important;
    }

    .summary-content .column-right .e-grid .e-gridcontent,
    .summary-content .column-right .e-grid .e-gridcontent .e-content {
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* TeamSummary: Override default-tab height in left column to use auto instead of 100% */
.team-summary-container .column-left .default-tab.e-fill {
    height: auto !important;
    flex: 0 0 auto !important;
}

/* Add gap between the two tabs in TeamSummary left column */
.team-summary-container .column-left > .default-tab.e-fill + .default-tab.e-fill {
    margin-top: 1rem;
}

/* PlayerHistoryTable: enable horizontal scrolling for frozen columns.
   The parent .default-tab.e-fill .e-content .e-item has overflow:hidden !important
   which prevents the browser from scrolling, so we must force the grid's own
   internal scroll containers to handle it. Mirrors the .table-scroll-container rules. */
.e-grid.player-history-grid .e-gridheader {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.e-grid.player-history-grid .e-gridcontent {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: calc(55vh - 42px) !important;
}

.e-grid.player-history-grid .e-gridheader .e-headercontent {
    overflow-x: auto !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.e-grid.player-history-grid .e-gridheader .e-headercontent::-webkit-scrollbar {
    display: none;
}

.e-grid.player-history-grid .e-gridcontent .e-content {
    overflow-x: auto !important;
}

/* PlayerHistoryTable - Mobile Responsive */
@media only screen and (max-width: 768px) {
    .e-grid.player-history-grid {
        font-size: 9px !important;
        overflow-x: auto !important;
    }

    .e-grid.player-history-grid .e-headercell,
    .e-grid.player-history-grid .e-rowcell {
        padding: 2px 3px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .e-grid.player-history-grid .e-headercell {
        height: 28px !important;
    }

    .e-grid.player-history-grid .e-headertext {
        font-size: 9px !important;
        font-weight: 600 !important;
    }

    .e-grid.player-history-grid .e-row {
        height: 26px !important;
    }

    .e-grid.player-history-grid .e-rowcell {
        height: 26px !important;
    }

    /* Make indicator badges smaller */
    .e-grid.player-history-grid .indicator {
        font-size: 8px !important;
        padding: 2px 4px !important;
        min-width: unset !important;
    }

    /* Make vision button smaller */
    .e-grid.player-history-grid .e-link {
        font-size: 8px !important;
        padding: 2px !important;
    }

    .e-grid.player-history-grid .e-link .icon {
        width: 14px !important;
        height: 14px !important;
    }

    /* Reduce tooltip font size */
    .e-grid.player-history-grid .e-tooltip-wrap {
        font-size: 10px !important;
    }
}

/* FixturePlayerInvolvementsTableSF - Mobile font size increase */
@media only screen and (max-width: 768px) {
    /* Increase grid font size by 3 points for mobile */
    .e-grid.recruiter {
        font-size: 12px !important;
    }

    .e-grid.recruiter .e-headercell,
    .e-grid.recruiter .e-rowcell {
        font-size: 12px !important;
    }

    .e-grid.recruiter .e-headertext {
        font-size: 12px !important;
    }

    /* Increase button font size by 3 points for mobile */
    .e-grid.recruiter .e-toolbar .e-btn {
        font-size: 12px !important;
    }

    .e-grid.recruiter .e-toolbar .e-input-group input {
        font-size: 12px !important;
    }

    .e-grid.recruiter .e-link {
        font-size: 12px !important;
    }
}

/* TeamSummary - Fix double scrollbar issue in Team Statistics tab */
.team-summary-container .column-right .tab-content-scroll .table-scroll-container {
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: var(--p3) !important;
}

/* For tab-content-no-scroll sections (like Team Statistics tab), ensure proper flex layout */
.team-summary-container .tab-content-no-scroll {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

.team-summary-container .tab-content-no-scroll .tab-header {
    flex-shrink: 0 !important;
}

.team-summary-container .tab-content-no-scroll .table-scroll-container {
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: var(--p3) !important;
}

/* Ensure the SfGrid fills its container and only the grid content scrolls */
.team-summary-container .table-scroll-container .e-grid {
    flex: 1 !important;
    height: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Override the general recruiter grid overflow rules for TeamSummary */
.team-summary-container .table-scroll-container .e-grid.recruiter {
    overflow: hidden !important;
}

.team-summary-container .table-scroll-container .e-grid .e-gridheader,
.team-summary-container .table-scroll-container .e-grid .e-toolbar {
    flex-shrink: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.team-summary-container .table-scroll-container .e-grid .e-gridcontent {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    min-height: 0 !important;
}

/* Target the actual scrollable containers for frozen columns sync */
.team-summary-container .table-scroll-container .e-grid .e-gridheader .e-headercontent {
    overflow-x: auto !important;
    /* Hide scrollbar on header */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar on header for WebKit browsers */
.team-summary-container .table-scroll-container .e-grid .e-gridheader .e-headercontent::-webkit-scrollbar {
    display: none;
}

.team-summary-container .table-scroll-container .e-grid .e-gridcontent .e-content {
    overflow-x: auto !important;
}

/* LeaderboardTableSF - Syncfusion grid styles */
.row-number-column:not(.e-headercell) {
    background-color: #2563eb !important;
}

/* Row highlight on hover */
.recruiter .e-grid .e-row:hover .e-rowcell {
    box-shadow: inset 0 -5px 0 0 #2563eb, inset 0 5px 0 0 #2563eb;
    background-color: rgba(37, 99, 235, 0.05) !important;
}

/* Column highlight - set via JavaScript */
.recruiter .e-grid .column-highlight {
    box-shadow: inset -5px 0 0 0 #2563eb, inset 5px 0 0 0 #2563eb !important;
    background-color: rgba(37, 99, 235, 0.05) !important;
}


/* LeaderboardTableSF - Outer wrapper fills remaining flex space */
.leaderboard-outer-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Search bar sits above the grid, outside its height allocation */
.leaderboard-search-bar {
    flex-shrink: 0;
    padding: 4px 8px;
}

.leaderboard-search-bar .e-input-group {
    width: 300px;
    max-width: 100%;
}

/* LeaderboardTableSF - Grid container fills remaining space after search bar */
.leaderboard-grid-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* LeaderboardTableSF - Non-Syncfusion component styles */
.row-number-text {
    color: white !important;
    font-weight: 500;
}

.stat-cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.stat-cell:hover {
    transform: scale(1.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border: 2px solid #000;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
}

.stat-tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease-in-out;
}

.stat-tooltip.show {
    opacity: 1;
    display: block;
}

.stat-tooltip-player {
    font-weight: 700;
    margin-bottom: 2px;
}


/* Grid content background: make the empty area below the last data row blend with the
   page background. This avoids visible white/grey bands when the grid height is 100%
   but there are fewer rows than the container height (e.g. Teams view with 10 rows). */
.leaderboard-grid-container .e-grid.recruiter .e-gridcontent {
    background-color: var(--background-color);
}

/* RecruiterTable - wrapper chain that fills the remaining height in container.full.
   Mirrors the leaderboard-outer-wrapper / leaderboard-grid-container pattern.
   width: 100% is required because container.full inherits align-items: center from
   the base .container rule, which would otherwise collapse the wrappers to content-width
   and break Syncfusion's frozen-column layout. */
.recruiter-outer-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recruiter-grid-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}