/* --------- Poster's FAVOURITE & WATCHED BUTTONS always visible if item is favourite/watched --------  START */

/* Make favourite button visible when item is favourite - start */
.layout-desktop .card-hoverable .cardOverlayContainer {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
}
.card-hoverable .cardOverlayContainer:after {
    transform: translateY(-100%) translateX(0) !important;
}
.backdropCard.card-hoverable .cardOverlayContainer:after,
.overflowBackdropCard.card-hoverable .cardOverlayContainer:after {
    transform: translateY(0) translateX(-100%) !important;
}
/* Add shadow to improve visibility over red/white backgrounds */
.cardOverlayButton .material-icons.favorite {
    opacity: 1 !important;
    visibility: visible !important;
	text-shadow: -0.2px -0px 3.5px rgb(0 0 0 / 67%) !important;
}
button.cardOverlayButton.cardOverlayButton-hover.itemAction.paper-icon-button-light.emby-button.ratingbutton-withrating {
    opacity: 1 !important; 
}
/* Make favourite button visible when item is favourite - end */

/* Make Card posters position relative to stay static when UI zoom is above or below 100%*/ 
.cardScalable {
  position: relative !important;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
}

/* Lock favourite button position to top left in relation to poster */
.cardScalable button[is="emby-ratingbutton"] {
	transition: opacity 0.25s ease-in-out;
    visibility: visible !important;
    position: fixed !important;
    top: 0.5em;
    left: 0.5em;
}
/* Pre-move the watched button before transition, when not hovered and not watched, add border for visibility */
.card-hoverable button[is="emby-playstatebutton"] {
    transform: translateX(3em) !important;
	text-shadow: -0.5px 0 4px rgb(8 32 1 / 87%) !important;
    -webkit-text-stroke: 0.5px #0e16009e !important;
}
/* Move the watched button to the left on hover */
.card-hoverable:hover button[is="emby-playstatebutton"] {
    transition: opacity 0.2s ease-in-out;
    transform: translateX(0.2em) !important;
    transition: transform 0.25s ease;
}
.card-hoverable .cardOverlayContainer:after {
    transform: translateY(-100%) translateX(0) !important;
}
.backdropCard.card-hoverable .cardOverlayContainer:after,
.overflowBackdropCard.card-hoverable .cardOverlayContainer:after {
    transform: translateY(0) translateX(-100%) !important;
}
/* Hide watched badge label (episode counter), if show/season/movie is fully watched - avoids double watched icons */
/* Watch badge should still be visible on mobile, which is ideal */
/* KBH-REEPER Update: Use condition targetting for each card to reflect JF stats/data on watched content, instead of CSS class as source of truth*/
.card:has([data-played="true"]) .cardIndicators {
    display: none !important;
}
/* Watched button always visible if item is played */
.cardScalable button.cardOverlayButton.cardOverlayButton-hover.itemAction.paper-icon-button-light.emby-button.playstatebutton-played {
    opacity: 1 !important;
    visibility: visible !important;
}
/* Add transition to play content button */
.cardScalable button.cardOverlayButton.cardOverlayButton-hover.itemAction.paper-icon-button-light.cardOverlayFab-primary {
    transition: opacity 0.25s ease-in-out;
}
/* Improve visibility of three dots button icon on hover for white backgrounds */
.card-hoverable .more_vert {
  transform: scale(1.18) translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-filter: blur(0);
  will-change: transform;
  -webkit-text-stroke: 1px #ffffff !important;
  text-shadow: 0.5px 0.5px 3.5px rgba(0, 0, 0), -0.5px -0.5px 3.5px rgba(0, 0, 0), -1px 0.5px 3px rgba(0, 0, 0), 1px -1px 3px rgba(0, 0, 0) !important;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 1, 1) !important;
}
/*Activates poster function buttons - required for V1.09 and above*/
[dir="ltr"].layout-desktop .card:not([data-type="Actor"]):not([data-type="CollectionFolder"]):not([data-type="UserView"]) .cardOverlayButton-br {
    display: block !important;
}
/* --------- Poster's FAVOURITE & WATCHED BUTTONS always visible if item is favourite/watched --------    END */
