/* Targeted responsive corrections V2.4.214. */

/* Frozen banner geometry. Responsive artwork is selected by picture. */
html body .ar-page-banner-home {
  width: 100%;
  height: auto !important;
  aspect-ratio: 1916 / 821 !important;
  overflow: hidden !important;
  border: 1px solid var(--md-outline) !important;
  border-radius: var(--md-radius-shell, 12px) !important;
  background: none !important;
  box-shadow: var(--md-elevation-1) !important;
}

html body .ar-page-banner-home .ar-page-banner-frame {
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .ar-page-banner-home .ar-page-banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center !important;
}

/* The old Aizen popout belonged to the replaced composite banner. Keeping
   this guard prevents its masked frame seam from crossing later artwork. */
html body .ar-page-banner-home .ar-page-banner-popout {
  display: none !important;
}

/* The old mobile genre control is restored below the title search. */
html body #view-search .discover-mobile-genre-field {
  display: none !important;
}

/* Re-enable the existing Seasons archive without duplicating its data flow. */
html body #view-season .seasons-tabrow {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

html body #view-season .seasons-tabs {
  width: auto !important;
  min-width: 0;
  flex: 1 1 auto;
}

html body #view-season .seasons-archive {
  position: relative !important;
  z-index: 40 !important;
  flex: 0 0 140px;
  display: block !important;
}

html body #view-season .seasons-archive summary {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 12px !important;
  align-items: center;
  gap: 8px;
  padding: 0 14px !important;
  border: 1px solid var(--season-ref-border-strong) !important;
  border-radius: 10px !important;
  background: rgba(15, 20, 24, .86) !important;
  color: #d5dade !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

html body #view-season .seasons-archive summary::after {
  border-color: var(--season-ref-muted) !important;
}

html body #view-season .seasons-archive .season-year-menu {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
  max-height: min(420px, 62vh) !important;
  padding: 8px !important;
  border: 1px solid var(--season-ref-border-strong) !important;
  border-radius: 12px !important;
  background: #12181c !important;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .46) !important;
}

html body #view-season .seasons-archive .season-year-option {
  min-height: 38px !important;
  border: 1px solid var(--season-ref-border) !important;
  border-radius: 8px !important;
  background: #0e1316 !important;
  color: var(--season-ref-muted) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

html body #view-season .seasons-archive .season-year-option:hover {
  border-color: rgba(240, 39, 61, .6) !important;
  color: #fff !important;
}

html body #view-season .seasons-archive .season-year-option.is-active {
  border-color: #ff354a !important;
  background: linear-gradient(180deg, #ff3046 0%, #ed2138 100%) !important;
  color: #fff !important;
}

@media (min-width: 761px) {
  html body #view-season .seasons-reference-actions {
    display: flex;
    align-items: center;
  }

  html body #view-season .seasons-sort-label {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    margin: 0 !important;
  }
}

@media (max-width: 760px) {
  html body .ar-page-banner-home {
    width: 100%;
    max-height: none !important;
    margin-bottom: 10px !important;
    border-radius: 10px !important;
  }

  html body #calendarFilters[id].calendar-filters {
    max-height: min(82dvh, 720px) !important;
    display: flex !important;
    flex-direction: column;
    padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    overscroll-behavior: contain;
  }

  html body #calendarFilters[id].calendar-filters .calendar-drawer-head {
    position: static;
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0 0 10px;
    padding: 0;
  }

  html body #calendarFilters[id].calendar-filters .filter-body,
  html body #calendarFilters[id].calendar-filters .filter-body:has(.ar-select.is-open) {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 2px 14px 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  html body #calendarFilters[id].calendar-filters .calendar-apply-filters {
    flex: 0 0 45px;
    width: 100%;
    margin: 10px 0 0;
  }

  html body #view-season .seasons-tabrow {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 102px;
    align-items: stretch;
    gap: 9px;
    margin: 0 0 17px !important;
    overflow: visible;
  }

  html body #view-season .seasons-tabs {
    width: 100% !important;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0 !important;
    scrollbar-width: none;
  }

  html body #view-season .seasons-archive {
    width: 102px;
    margin: 0;
  }

  html body #view-season .seasons-archive summary {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    padding: 0 11px !important;
    font-size: 11px !important;
  }

  html body .season-year-menu.season-year-menu--portal {
    border-color: var(--md-outline) !important;
    background: #12181c !important;
  }

  html body .season-year-menu.season-year-menu--portal .season-year-option {
    border-color: rgba(172, 187, 196, .16) !important;
    border-radius: 9px !important;
    background: #0e1316 !important;
    color: #d5dade !important;
  }

  html body .season-year-menu.season-year-menu--portal .season-year-option.is-active {
    border-color: #ff354a !important;
    background: linear-gradient(180deg, #ff3046 0%, #ed2138 100%) !important;
    color: #fff !important;
  }

  html body #view-search .discover-mobile-genre-field {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block !important;
    margin: 10px 0 18px !important;
  }

  html body #view-search .search-input-label {
    height: 44px !important;
  }

  html body #view-search .discover-mobile-genre-field > select {
    width: 100%;
  }

  html body #view-search .discover-mobile-genre-field > .ar-select {
    width: 100%;
    display: block;
  }

  html body #view-search .discover-mobile-genre-field .ar-select-btn {
    width: 100%;
    height: 42px !important;
    min-height: 42px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px !important;
    border: 1px solid var(--dis-line) !important;
    border-radius: 10px !important;
    background: var(--dis-surface) !important;
    color: var(--dis-text) !important;
    box-shadow: none !important;
    font-size: 12px !important;
  }
}
