/* Seasonals Client Settings Popup & Modal Overlay */
.seasonal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px) saturate(1.8);
  -webkit-backdrop-filter: blur(12px) saturate(1.8);
  z-index: 20000;
  animation: seasonalFadeIn 0.25s ease-out forwards;
}

.seasonal-settings-popup {
  position: fixed;
  z-index: 20001;
  background: rgba(22, 22, 22, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.6em 1.8em;
  border-radius: 1.2em;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  width: 480px;
  height: 550px;
  max-width: calc(100vw - 2.5rem);
  max-height: calc(100vh - 38px);
  color: #fff;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

/* Client Tabs Styling */
.seasonal-client-tabs {
  display: flex;
  gap: 0.4em;
  margin-bottom: 1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.6em;
}

.seasonal-client-tab {
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6em 1em;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
}

.seasonal-client-tab span {
  display: inline-block;
  text-align: center;
  line-height: 1.25;
}

.seasonal-client-tab:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.seasonal-client-tab.active {
  color: #ffffff;
  background-color: #00a4dc;
}

@media (max-width: 500px) {
  .seasonal-settings-popup {
    height: 650px !important;
  }

  .seasonal-client-tabs {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4em !important;
  }

  .seasonal-client-tab {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
  }
}

.seasonal-client-tab-content {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  width: 100%;
}

/* Modal styling (centered, when opened from sidebar) */
.seasonal-settings-popup.seasonal-modal {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  animation: seasonalPopInCenter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Dropdown styling (when opened from navbar header) */
.seasonal-settings-popup.seasonal-dropdown {
  animation: seasonalPopInDropdown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header style with logo */
.seasonal-settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 1.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8em;
  padding-right: 32px;
}

.seasonal-settings-logo {
  height: 24px;
  pointer-events: none;
}

.seasonal-settings-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
}

/* Body Container */
.seasonal-settings-body {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0.8em;
  padding-right: 4px;
}

/* Toggle switch design */
.seasonal-toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0.4em 0;
}

.seasonal-toggle-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.seasonal-toggle-label {
  font-weight: 500;
  font-size: 0.92rem;
  color: #f0f0f0;
}

.seasonal-toggle-desc {
  color: #9c9c9c;
  font-size: 0.8rem;
  margin-top: 0.15em;
  line-height: 1.35;
}

/* The Switch Outer Element */
.seasonal-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.seasonal-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.seasonal-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.seasonal-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #e5e5e5;
  transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.seasonal-switch input:checked+.seasonal-slider {
  background-color: #00a4dc;
}

.seasonal-switch input:checked+.seasonal-slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Select Container and Elements */
.seasonal-select-container {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 0.3em 0;
}

.seasonal-select-info {
  display: flex;
  flex-direction: column;
}

.seasonal-select-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #e0e0e0;
}

.seasonal-select-desc {
  color: #9c9c9c;
  font-size: 0.8rem;
  line-height: 1.3;
}

select.seasonal-select {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0.6em 0.8em !important;
  border-radius: 6px !important;
  outline: none !important;
  transition: all 0.2s ease;
  font-size: 0.88rem;
  width: 100%;
  -webkit-appearance: menulist;
  appearance: menulist;
  margin-top: 0.2em;
}

select.seasonal-select:focus {
  border-color: #00a4dc !important;
  box-shadow: 0 0 0 3px rgba(0, 164, 220, 0.2);
  background-color: rgba(255, 255, 255, 0.08) !important;
}

select.seasonal-select option {
  background-color: #202020 !important;
  color: #ffffff !important;
}

/* Input Container and Elements */
.seasonal-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 0.3em 0;
}

.seasonal-input-info {
  display: flex;
  flex-direction: column;
}

.seasonal-input-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #e0e0e0;
}

.seasonal-input-desc {
  color: #9c9c9c;
  font-size: 0.8rem;
  line-height: 1.3;
}

input.seasonal-input {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0.6em 0.8em !important;
  border-radius: 6px !important;
  outline: none !important;
  transition: all 0.2s ease;
  font-size: 0.88rem;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2em;
}

input.seasonal-input:focus {
  border-color: #00a4dc !important;
  box-shadow: 0 0 0 3px rgba(0, 164, 220, 0.2);
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Button layout */
.seasonal-settings-buttons {
  margin-top: 1.4em;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 12px;
}

.seasonal-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.6em 1.2em;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  outline: none;
  flex: 1 1 0;
  min-width: 0;
  width: 50%;
  text-align: center;
}

.seasonal-btn-cancel {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.seasonal-btn-cancel:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.seasonal-btn-submit {
  background: linear-gradient(135deg, #00a4dc, #0084b0);
  box-shadow: 0 4px 12px rgba(0, 164, 220, 0.25);
}

.seasonal-btn-submit:hover {
  filter: brightness(1.15);
}

/* Footer layout */
.seasonal-settings-footer {
  margin-top: 1.5em;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.8em;
  font-size: 0.78rem;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Custom Scrollbar for Settings Popup & Body */
.seasonal-settings-popup::-webkit-scrollbar,
.seasonal-settings-body::-webkit-scrollbar {
  width: 6px;
}

.seasonal-settings-popup::-webkit-scrollbar-track,
.seasonal-settings-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.seasonal-settings-popup::-webkit-scrollbar-thumb,
.seasonal-settings-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.seasonal-settings-popup::-webkit-scrollbar-thumb:hover,
.seasonal-settings-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Close button for client settings popup */
.seasonal-settings-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  outline: none;
}

.seasonal-settings-close-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.seasonal-settings-close-button:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* GitHub link styling in settings popup */
.seasonal-settings-popup a.seasonal-github-link {
  color: #00a4dc !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s, color 0.2s;
}

.seasonal-settings-popup a.seasonal-github-link:hover {
  opacity: 0.8;
  color: #0084b0 !important;
}

/* Keyframe Animations */
@keyframes seasonalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes seasonalPopInCenter {
  from {
    opacity: 0;
    transform: translate(-50%, -47%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes seasonalPopInDropdown {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.seasonal-settings-button {
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: auto 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  color: inherit !important;
  border-radius: 50% !important;
  vertical-align: middle !important;
  outline: none !important;
  box-sizing: border-box !important;
  width: 40px !important;
  height: 40px !important;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out !important;
}

.seasonal-settings-button:hover {
  background-color: rgba(0, 164, 220, 0.2) !important;
  color: #00a4dc !important;
}

@media (hover: hover) and (pointer: fine) {
  .seasonal-settings-button:hover:not(:disabled) {
    background-color: rgba(0, 164, 220, 0.2) !important;
    color: #00a4dc !important;
  }
}

/* Jellyfin v12 Full Header Height Grey Hover */
body.jellyfin-v12 .seasonal-settings-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  box-sizing: border-box !important;
  background-color: transparent !important;
  outline: 0 !important;
  border: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
  vertical-align: middle !important;
  appearance: none !important;
  text-decoration: none !important;
  text-align: center !important;
  flex: 0 0 auto !important;
  border-radius: 50% !important;
  overflow: visible !important;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: inherit !important;
  padding: 12px !important;
  font-size: 1.75rem !important;
  width: auto !important;
  height: auto !important;
}

body.jellyfin-v12 .seasonal-settings-button:hover {
  color: inherit !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(var(--jf-palette-action-activeChannel, 255 255 255) / var(--jf-palette-action-hoverOpacity, 0.08)) !important;
  border-radius: 50% !important;
}

/* MUI Profile Menu Item Styling */
.seasonal-usermenu-item {
  display: flex !important;
  align-items: center !important;
  padding: 6px 16px !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  width: 100% !important;
  margin: 0 !important;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms !important;
}

.seasonal-usermenu-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(var(--jf-palette-action-activeChannel, 255 255 255) / var(--jf-palette-action-hoverOpacity, 0.08)) !important;
}

.seasonal-usermenu-item .MuiListItemIcon-root {
  min-width: 36px !important;
  width: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-shrink: 0 !important;
  margin-right: 0 !important;
}

.seasonal-usermenu-item img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  pointer-events: none !important;
  margin: 0 !important;
}

.seasonal-usermenu-item .MuiListItemText-root {
  flex: 1 1 auto !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Hide Seasonals settings icon strictly during active Video Playback / OSD */
.headerVideo .seasonal-settings-button,
.videoPlayerContainer:not(.hide) .seasonal-settings-button,
.videoPlayerContainer-onTop .seasonal-settings-button,
#videoOsdPage:not(.hide) .seasonal-settings-button,
body:has(#videoOsdPage:not(.hide)) .seasonal-settings-button,
body:has(.videoPlayerContainer:not(.hide)) .seasonal-settings-button,
body:has(.videoPlayerContainer-onTop) .seasonal-settings-button {
  display: none !important;
}

.seasonal-settings-button img {
  width: 24px !important;
  height: 24px !important;
  vertical-align: middle !important;
  pointer-events: none !important;
  transition: transform 0.2s ease !important;
}

/* Scoped TV Mode Focus & Highlighting for Seasonals */
.layout-tv .seasonal-settings-button:focus,
.seasonal-tv-mode .seasonal-settings-button:focus {
  background: none !important;
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  transform: scale(1.35) !important;
  transition: transform 0.2s ease-in-out !important;
}

.layout-tv .seasonal-settings-button:focus img,
.seasonal-tv-mode .seasonal-settings-button:focus img {
  filter: invert(47%) sepia(87%) saturate(1982%) hue-rotate(167deg) brightness(96%) contrast(101%) !important;
  transform: scale(1.1) !important;
  transition: transform 0.2s ease-in-out !important;
}

.layout-tv .seasonal-client-tab:focus,
.seasonal-tv-mode .seasonal-client-tab:focus,
.layout-tv .seasonal-switch:focus,
.seasonal-tv-mode .seasonal-switch:focus,
.layout-tv .seasonal-select:focus,
.seasonal-tv-mode .seasonal-select:focus,
.layout-tv .seasonal-input:focus,
.seasonal-tv-mode .seasonal-input:focus,
.layout-tv .seasonal-btn:focus,
.seasonal-tv-mode .seasonal-btn:focus,
.layout-tv .seasonal-settings-close-button:focus,
.seasonal-tv-mode .seasonal-settings-close-button:focus {
  outline: 3px solid var(--jf-palette-primary-main, #00a4dc) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 12px rgba(0, 164, 220, 0.8) !important;
  border-radius: 6px !important;
}

/* Stopping & Stopped State for Play Duration */
body.seasonals-stopping .seasonals-container,
body.seasonals-stopping .autumn-container,
body.seasonals-stopping .birthday-container,
body.seasonals-stopping .carnival-container,
body.seasonals-stopping .cherryblossom-container,
body.seasonals-stopping .christmas-container,
body.seasonals-stopping .earthday-container,
body.seasonals-stopping .easter-container,
body.seasonals-stopping .eid-container,
body.seasonals-stopping .eurovision-container,
body.seasonals-stopping .filmnoir-tint,
body.seasonals-stopping .filmnoir-effects,
body.seasonals-stopping .filmnoir-container,
body.seasonals-stopping .fireworks,
body.seasonals-stopping .frost-container,
body.seasonals-stopping .friday13-container,
body.seasonals-stopping .halloween-container,
body.seasonals-stopping .hearts-container,
body.seasonals-stopping .marioday-container,
body.seasonals-stopping .matrix-container,
body.seasonals-stopping .nightsky-container,
body.seasonals-stopping .oktoberfest-container,
body.seasonals-stopping .olympia-container,
body.seasonals-stopping .oscar-container,
body.seasonals-stopping .pride-container,
body.seasonals-stopping .rain-container,
body.seasonals-stopping .resurrection-container,
body.seasonals-stopping .santa-container,
body.seasonals-stopping .snowfall-container,
body.seasonals-stopping .snowflakes,
body.seasonals-stopping .snowstorm-container,
body.seasonals-stopping .space-container,
body.seasonals-stopping .spooky-container,
body.seasonals-stopping .sports-container,
body.seasonals-stopping .spring-container,
body.seasonals-stopping .starwars-container,
body.seasonals-stopping .storm-container,
body.seasonals-stopping .summer-container,
body.seasonals-stopping .underwater-container,
body.seasonals-stopping .underwater-fg-container {
  opacity: 0 !important;
  transition: opacity 1.5s ease-out !important;
  pointer-events: none !important;
}

body.seasonals-stopped .seasonals-container,
body.seasonals-stopped .autumn-container,
body.seasonals-stopped .birthday-container,
body.seasonals-stopped .carnival-container,
body.seasonals-stopped .cherryblossom-container,
body.seasonals-stopped .christmas-container,
body.seasonals-stopped .earthday-container,
body.seasonals-stopped .easter-container,
body.seasonals-stopped .eid-container,
body.seasonals-stopped .eurovision-container,
body.seasonals-stopped .filmnoir-tint,
body.seasonals-stopped .filmnoir-effects,
body.seasonals-stopped .filmnoir-container,
body.seasonals-stopped .fireworks,
body.seasonals-stopped .frost-container,
body.seasonals-stopped .friday13-container,
body.seasonals-stopped .halloween-container,
body.seasonals-stopped .hearts-container,
body.seasonals-stopped .marioday-container,
body.seasonals-stopped .matrix-container,
body.seasonals-stopped .nightsky-container,
body.seasonals-stopped .oktoberfest-container,
body.seasonals-stopped .olympia-container,
body.seasonals-stopped .oscar-container,
body.seasonals-stopped .pride-container,
body.seasonals-stopped .rain-container,
body.seasonals-stopped .resurrection-container,
body.seasonals-stopped .santa-container,
body.seasonals-stopped .snowfall-container,
body.seasonals-stopped .snowflakes,
body.seasonals-stopped .snowstorm-container,
body.seasonals-stopped .space-container,
body.seasonals-stopped .spooky-container,
body.seasonals-stopped .sports-container,
body.seasonals-stopped .spring-container,
body.seasonals-stopped .starwars-container,
body.seasonals-stopped .storm-container,
body.seasonals-stopped .summer-container,
body.seasonals-stopped .underwater-container,
body.seasonals-stopped .underwater-fg-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}