/*
 * GoodVidX Jellyfin web overlay.
 * Keep this file narrowly scoped: it should survive Jellyfin web updates
 * without depending on private bundle internals.
 */
:root {
    --goodvidx-bg: #101113;
    --goodvidx-bg-soft: #15171b;
    --goodvidx-panel: #1b1d23;
    --goodvidx-panel-strong: #23262e;
    --goodvidx-border: rgba(255, 255, 255, 0.09);
    --goodvidx-text: #f7f2ec;
    --goodvidx-muted: #c7bdb6;
    --goodvidx-primary: #ff7a45;
    --goodvidx-primary-strong: #ff4b2f;
    --goodvidx-secondary: #9b5cff;
    --goodvidx-focus: rgba(255, 122, 69, 0.28);
    --goodvidx-primary-gradient: linear-gradient(135deg, var(--goodvidx-primary), var(--goodvidx-primary-strong));
    --goodvidx-radius: 8px;
    --goodvidx-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
    --goodvidx-header-height: 72px;
    --goodvidx-header-control-height: 44px;
}

html.preload,
.preload,
.backgroundContainer,
.backgroundContainer.withBackdrop {
    background-color: var(--goodvidx-bg) !important;
}

.backdropContainer {
    background-color: var(--goodvidx-bg) !important;
}

.skinHeader,
.skinHeader-withBackground,
.mainDrawer,
.dialog,
.formDialogHeader,
.formDialogFooter,
.actionSheet,
.paperList,
.visualCardBox,
.toast,
.nowPlayingBar {
    background-color: rgba(27, 29, 35, 0.94) !important;
    color: var(--goodvidx-text) !important;
}

.skinHeader-withBackground {
    border-bottom: 1px solid var(--goodvidx-border);
    backdrop-filter: blur(16px);
}

.mainDrawer {
    border-right: 1px solid var(--goodvidx-border);
}

.dialog,
.actionSheet,
.paperList,
.cardBox,
.cardContent,
.cardPadder,
.cardOverlayContainer,
.itemSelectionPanel,
.emby-input,
.emby-textarea,
.emby-select-withcolor {
    border-radius: var(--goodvidx-radius) !important;
}

.dialog,
.actionSheet {
    box-shadow: var(--goodvidx-shadow) !important;
}

.cardBox,
.visualCardBox,
.listItem {
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .cardBox:hover,
    .visualCardBox:hover,
    .listItem:hover {
        transform: translateY(-1px);
    }

    .cardBox:hover .cardContent,
    .visualCardBox:hover {
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    }
}

.emby-button.button-submit,
.emby-button.button-accent,
.button-submit,
.button-accent,
.raised,
.MuiButton-root.MuiButton-contained,
.MuiButton-root.MuiButton-containedSizeMedium,
.selectionCommandsPanel,
.countIndicator,
progress[aria-valuenow]::before {
    background: linear-gradient(135deg, var(--goodvidx-primary), var(--goodvidx-primary-strong)) !important;
    color: #17110d !important;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--goodvidx-primary), var(--goodvidx-secondary)) !important;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--goodvidx-primary), var(--goodvidx-secondary)) !important;
}

.emby-checkbox:checked + span + .checkboxOutline,
.emby-checkbox:focus:not(:checked) + span + .checkboxOutline,
.emby-input:focus,
.emby-textarea:focus,
.emby-select-withcolor:focus,
.itemSelectionPanel,
.mdl-spinner__layer-1,
.mdl-spinner__layer-2,
.mdl-spinner__layer-3,
.mdl-spinner__layer-4,
.progressring-spiner {
    border-color: var(--goodvidx-primary) !important;
}

.emby-input:focus,
.emby-textarea:focus,
.emby-select-withcolor:focus {
    box-shadow: 0 0 0 3px var(--goodvidx-focus) !important;
}

.emby-select,
.emby-select-withcolor,
select.emby-select {
    padding-left: 1rem !important;
    padding-right: 2.75rem !important;
    text-indent: 0 !important;
}

[dir="rtl"] .emby-select,
[dir="rtl"] .emby-select-withcolor,
[dir="rtl"] select.emby-select {
    padding-left: 2.75rem !important;
    padding-right: 1rem !important;
}

.button-link,
.button-flat:hover,
.paper-icon-button-light:hover:not(:disabled),
.metadataSidebarIcon,
.upNextDialog-countdownText,
.listItemImageButton:hover,
.selectLabelFocused,
.textareaLabelFocused,
.inputLabelFocused,
a,
a:visited {
    color: var(--goodvidx-primary) !important;
}

.navMenuOption {
    color: var(--goodvidx-muted) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.mainDrawer .navMenuOption,
.mainDrawer .navMenuOption:link,
.mainDrawer .navMenuOption:visited,
.mainDrawer .navMenuOption:hover,
.mainDrawer .navMenuOption-selected,
.mainDrawer .navMenuOptionIcon,
.mainDrawer .navMenuOptionText {
    color: var(--goodvidx-primary) !important;
}

.mainDrawer .navMenuOption-selected {
    background-color: rgba(255, 122, 69, 0.14) !important;
}

.layout-desktop .skinHeader:has(.headerTabs:not(.hide)),
.layout-tv .skinHeader:has(.headerTabs:not(.hide)) {
    min-height: var(--goodvidx-header-height) !important;
}

.layout-desktop .skinHeader .headerTop,
.layout-tv .skinHeader .headerTop {
    align-items: center !important;
    height: var(--goodvidx-header-height) !important;
    min-height: var(--goodvidx-header-height) !important;
    padding-bottom: 0.25rem !important;
    padding-top: 0.25rem !important;
}

.skinHeader .headerTabs,
.skinHeader .sectionTabs {
    align-items: center !important;
    align-self: center !important;
}

.layout-desktop .skinHeader .headerLeft,
.layout-desktop .skinHeader .headerRight,
.layout-tv .skinHeader .headerLeft,
.layout-tv .skinHeader .headerRight {
    transform: none !important;
}

.layout-desktop .skinHeader .headerRight,
.layout-tv .skinHeader .headerRight {
    align-items: center !important;
    height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    max-height: var(--goodvidx-header-control-height) !important;
}

.layout-desktop .headerTabs.sectionTabs,
.layout-tv .headerTabs.sectionTabs {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    overflow: visible !important;
    transform: none !important;
}

.layout-desktop .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs,
.layout-tv .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs {
    align-items: center !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    overflow: visible !important;
    transform: none !important;
}

.emby-tab-button,
.sectionTabs .navMenuOption,
.headerTabs .navMenuOption {
    align-items: center !important;
    color: var(--goodvidx-muted) !important;
    font-weight: 700 !important;
    justify-content: center !important;
    letter-spacing: 0 !important;
    isolation: isolate;
    overflow: hidden !important;
    position: relative !important;
    text-shadow: none !important;
    z-index: 0;
}

.skinHeader .sectionTabs .navMenuOption,
.skinHeader .headerTabs .navMenuOption,
.skinHeader .sectionTabs .emby-tab-button,
.skinHeader .headerTabs .emby-tab-button,
.headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs .emby-tab-button {
    box-sizing: border-box !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

[dir="ltr"] .sectionTabs .navMenuOption,
[dir="ltr"] .headerTabs .navMenuOption,
[dir="rtl"] .sectionTabs .navMenuOption,
[dir="rtl"] .headerTabs .navMenuOption {
    padding-left: 1.9em !important;
    padding-right: 1.9em !important;
}

.emby-tab-button + .emby-tab-button::after,
.sectionTabs .navMenuOption + .navMenuOption::after,
.headerTabs .navMenuOption + .navMenuOption::after {
    background: var(--goodvidx-border);
    bottom: 30%;
    content: "";
    left: 0;
    position: absolute;
    top: 30%;
    width: 1px;
}

.emby-tab-button-active + .emby-tab-button::after,
.emby-tab-button-active::after,
.sectionTabs .navMenuOption-selected + .navMenuOption::after,
.sectionTabs .navMenuOption-selected::after,
.headerTabs .navMenuOption-selected + .navMenuOption::after,
.headerTabs .navMenuOption-selected::after {
    display: none;
}

.emby-tab-button:hover:not(.emby-tab-button-active),
.navMenuOption:hover:not(.navMenuOption-selected) {
    color: var(--goodvidx-primary) !important;
    background: transparent !important;
}

.navMenuOption-selected {
    color: var(--goodvidx-text) !important;
    background-color: rgba(255, 122, 69, 0.16) !important;
}

.sectionTabs .navMenuOption,
.headerTabs .navMenuOption,
.sectionTabs .navMenuOption-selected,
.headerTabs .navMenuOption-selected {
    background: transparent !important;
}

.skinHeader .sectionTabs .navMenuOption.navMenuOption-selected,
.skinHeader .headerTabs .navMenuOption.navMenuOption-selected,
.skinHeader .sectionTabs .emby-tab-button.emby-tab-button-active,
.skinHeader .headerTabs .emby-tab-button.emby-tab-button-active,
.headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs .emby-tab-button.emby-button.emby-tab-button-active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

.sectionTabs .emby-tab-button::before,
.headerTabs .emby-tab-button::before,
.sectionTabs .navMenuOption::before,
.headerTabs .navMenuOption::before {
    background: rgba(17, 18, 20, 0.94);
    content: "";
    height: var(--goodvidx-header-control-height);
    left: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.sectionTabs .emby-tab-button:first-child::before,
.headerTabs .emby-tab-button:first-child::before,
.sectionTabs .navMenuOption:first-child::before,
.headerTabs .navMenuOption:first-child::before {
    border-radius: 999px 0 0 999px;
}

.sectionTabs .emby-tab-button:last-child::before,
.headerTabs .emby-tab-button:last-child::before,
.sectionTabs .navMenuOption:last-child::before,
.headerTabs .navMenuOption:last-child::before {
    border-radius: 0 999px 999px 0;
}

.sectionTabs .emby-tab-button:first-child:last-child::before,
.headerTabs .emby-tab-button:first-child:last-child::before,
.sectionTabs .navMenuOption:first-child:last-child::before,
.headerTabs .navMenuOption:first-child:last-child::before {
    border-radius: 999px;
}

.emby-tab-button-active,
.sectionTabs .navMenuOption-selected,
.headerTabs .navMenuOption-selected {
    color: #fff8f0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: 0 1px 1px rgba(63, 20, 7, 0.35) !important;
}

.emby-tab-button-active::before,
.sectionTabs .emby-tab-button.emby-tab-button-active::before,
.headerTabs .emby-tab-button.emby-tab-button-active::before,
.sectionTabs .navMenuOption-selected::before,
.headerTabs .navMenuOption-selected::before {
    background: var(--goodvidx-primary-gradient);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.16);
    content: "";
    height: var(--goodvidx-header-control-height);
    left: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.emby-tab-button-active:first-child::before,
.sectionTabs .navMenuOption-selected:first-child::before,
.headerTabs .navMenuOption-selected:first-child::before {
    border-radius: 999px 0 0 999px;
    left: 0;
}

.emby-tab-button-active:last-child::before,
.sectionTabs .navMenuOption-selected:last-child::before,
.headerTabs .navMenuOption-selected:last-child::before {
    border-radius: 0 999px 999px 0;
    right: 0;
}

.emby-tab-button-active:first-child:last-child::before,
.sectionTabs .navMenuOption-selected:first-child:last-child::before,
.headerTabs .navMenuOption-selected:first-child:last-child::before {
    border-radius: 999px;
}

.paper-icon-button-light:hover:not(:disabled),
.listItemImageButton:hover,
.button-flat:hover {
    background-color: rgba(255, 122, 69, 0.12) !important;
}

.innerCardFooter {
    background: rgba(16, 17, 19, 0.74) !important;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--goodvidx-border);
}

.itemProgressBar:not(.playbackProgress):not(.transcodingProgress):not(.backgroundProgress) {
    background: rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;
}

.itemProgressBarForeground {
    background: linear-gradient(90deg, var(--goodvidx-primary), var(--goodvidx-secondary)) !important;
    border-radius: 999px !important;
}

.loginDisclaimerContainer,
.readOnlyContent,
.secondaryText,
.fieldDescription,
.cardText-secondary {
    color: var(--goodvidx-muted) !important;
}

.splashLogo {
    width: min(34vw, 220px) !important;
    height: min(34vw, 220px) !important;
    background-image: url("logo.png") !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.45));
}

@media screen and (min-width: 992px) {
    .splashLogo {
        width: min(38vw, 520px) !important;
        height: min(16vw, 170px) !important;
        background-image: url("banner-light.png") !important;
    }
}

.pageTitleWithLogo,
.layout-desktop .skinHeader .pageTitleWithLogo,
.layout-tv .skinHeader .pageTitleWithLogo {
    flex: 0 0 246px !important;
    height: var(--goodvidx-header-control-height) !important;
    max-height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    min-width: 246px !important;
    overflow: visible !important;
    width: 246px !important;
    background-image: url("banner-light.png") !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: contain !important;
    transform: none !important;
}

img.pageTitleWithLogo,
.layout-desktop .skinHeader img.pageTitleWithLogo,
.layout-tv .skinHeader img.pageTitleWithLogo,
.skinHeader img[src*="banner-light"],
.skinHeader img[src*="icon-transparent"] {
    height: var(--goodvidx-header-control-height) !important;
    max-height: var(--goodvidx-header-control-height) !important;
    object-fit: contain !important;
    width: auto !important;
}

[dir="rtl"] .pageTitleWithLogo {
    background-position: right center !important;
}

.pageTitleWithLogo img,
.pageTitleWithLogo svg {
    opacity: 0 !important;
}

.adminDrawerLogo {
    background-image: url("logo.png") !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    height: 4.2rem !important;
    min-width: 4.2rem !important;
    object-fit: contain !important;
    width: 4.2rem !important;
}

.layout-mobile .adminDrawerLogo {
    align-items: center !important;
    background-image: none !important;
    border-bottom: none !important;
    display: block !important;
}

img.adminDrawerLogo,
.layout-mobile .adminDrawerLogo img,
.dashboardDocument .adminDrawerLogo img,
.dashboardDocument .MuiListItemIcon-root img[src*="icon-transparent"],
.dashboardDocument img.MuiBox-root[src*="icon-transparent"],
img[src*="icon-transparent"][class*="MuiBox-root"] {
    content: url("logo.png") !important;
    height: 4.2rem !important;
    max-height: 4.2rem !important;
    object-fit: contain !important;
    opacity: 1 !important;
    width: 4.2rem !important;
}

.adminDrawerLogo svg {
    opacity: 0 !important;
}

/* Final header geometry: overrides Jellyfin dashboard CustomCss sizing. */
.layout-desktop .skinHeader,
.layout-tv .skinHeader,
.layout-desktop .skinHeader.skinHeader-withBackground,
.layout-tv .skinHeader.skinHeader-withBackground {
    min-height: var(--goodvidx-header-height) !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
}

.layout-desktop .skinHeader .headerTop.flex.align-items-center.flex-grow,
.layout-tv .skinHeader .headerTop.flex.align-items-center.flex-grow,
.layout-desktop .skinHeader .headerTop,
.layout-tv .skinHeader .headerTop {
    box-sizing: border-box !important;
    height: var(--goodvidx-header-height) !important;
    min-height: var(--goodvidx-header-height) !important;
    padding-bottom: 0.125rem !important;
    padding-top: 0.125rem !important;
}

.skinHeader .headerLeft,
.skinHeader .headerRight,
.skinHeader .headerTabs.sectionTabs,
.skinHeader .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs,
.skinHeader .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs .emby-tabs-slider {
    align-items: center !important;
    box-sizing: border-box !important;
    height: var(--goodvidx-header-control-height) !important;
    max-height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.skinHeader .headerRight {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.skinHeader .headerTabs.sectionTabs {
    font-size: 100% !important;
    text-size-adjust: 100% !important;
}

.skinHeader .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs .emby-tab-button.emby-button,
.skinHeader .headerTabs.sectionTabs .tabs-viewmenubar.emby-tabs a.emby-tab-button,
.skinHeader .sectionTabs .emby-tab-button.emby-button,
.skinHeader .sectionTabs a.emby-tab-button {
    box-sizing: border-box !important;
    height: var(--goodvidx-header-control-height) !important;
    line-height: 1 !important;
    max-height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.skinHeader .headerTabs .emby-button-foreground,
.skinHeader .sectionTabs .emby-button-foreground {
    line-height: 1 !important;
}

.skinHeader .pageTitle,
.skinHeader .pageTitleWithLogo,
.skinHeader img.pageTitleWithLogo,
.skinHeader img[src*="banner-light"] {
    box-sizing: border-box !important;
    height: var(--goodvidx-header-control-height) !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    max-height: var(--goodvidx-header-control-height) !important;
    min-height: var(--goodvidx-header-control-height) !important;
}

.skinHeader .pageTitleWithLogo {
    width: calc(var(--goodvidx-header-control-height) * 5.58) !important;
}

.layout-desktop .skinHeader .headerTabs.sectionTabs,
.layout-tv .skinHeader .headerTabs.sectionTabs {
    left: 50% !important;
    margin: 0 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    z-index: 2 !important;
}
