/* Approved Stage 2 History presentation. Keeps canonical History logic intact. */
@import url("./cinema-tabs-shared.css?v=3");

body.cinema-v2.cinema-history-page .page-intro.compact-page-intro,
body.cinema-v2.cinema-history-page .cinema-title-row {
  display: none !important;
}

body.cinema-v2.cinema-history-page .cinema-page-frame {
  padding-top: 8px !important;
}

body.cinema-v2.cinema-history-page .cinema-header-block {
  margin: 0 0 10px !important;
}

body.cinema-v2.cinema-history-page .cinema-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-top: 0 !important;
}

body.cinema-v2.cinema-history-page .cinema-history-approved-section {
  min-width: 0;
  min-height: 680px;
  margin: 0 !important;
  padding: 26px 28px 30px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 16% 8%, rgba(122,64,205,.08), transparent 28%),
    linear-gradient(145deg, rgba(13,17,29,.985), rgba(7,10,17,.995)) !important;
  overflow: hidden;
}

body.cinema-v2.cinema-history-page .cinema-history-heading {
  min-height: 54px;
  margin: 0 0 18px !important;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

body.cinema-v2.cinema-history-page .cinema-history-heading h2 {
  margin: 0 0 6px !important;
  color: #f6f2fa !important;
  font-size: clamp(2rem, 2.5vw, 2.7rem) !important;
  font-weight: 860 !important;
  line-height: 1 !important;
  letter-spacing: -.05em !important;
}

body.cinema-v2.cinema-history-page .cinema-history-heading h2 span {
  color: #b86cff;
}

body.cinema-v2.cinema-history-page .cinema-history-heading p {
  margin: 0 !important;
  color: #9499aa !important;
  font-size: .9rem !important;
  line-height: 1.45 !important;
}

body.cinema-v2.cinema-history-page .cinema-history-heading .cinema-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.cinema-v2.cinema-history-page .cinema-history-heading [data-sync-plex-watched] {
  min-height: 40px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(155,92,255,.24) !important;
  border-radius: 10px !important;
  background: rgba(112,58,180,.14) !important;
  color: #d5bcfa !important;
  font-size: .73rem !important;
  font-weight: 800 !important;
}

body.cinema-v2.cinema-history-page .cinema-history-heading [data-sync-plex-watched]:hover {
  border-color: rgba(155,92,255,.4) !important;
  background: rgba(112,58,180,.22) !important;
  color: #f0e5ff !important;
}

body.cinema-v2.cinema-history-page .history-core-toolbar {
  min-height: 70px !important;
  margin: 0 0 14px !important;
  padding: 9px !important;
  display: grid !important;
  grid-template-columns: minmax(240px,1.5fr) minmax(140px,.72fr) minmax(140px,.72fr) minmax(145px,.78fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  border-radius: 14px !important;
  background: rgba(10,14,24,.86) !important;
}

body.cinema-v2.cinema-history-page .history-core-toolbar label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body.cinema-v2.cinema-history-page .history-core-toolbar label > span {
  padding-left: 2px;
  color: #73798b !important;
  font-size: .59rem !important;
  font-weight: 760 !important;
  letter-spacing: .01em;
}

body.cinema-v2.cinema-history-page .history-core-toolbar input,
body.cinema-v2.cinema-history-page .history-core-toolbar select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  border-radius: 9px !important;
  background: #0c101a !important;
  color: #dedce5 !important;
  font: inherit !important;
  font-size: .72rem !important;
  box-shadow: none !important;
  outline: none;
}

body.cinema-v2.cinema-history-page .history-core-toolbar input:focus,
body.cinema-v2.cinema-history-page .history-core-toolbar select:focus {
  border-color: rgba(155,92,255,.45) !important;
}

body.cinema-v2.cinema-history-page .history-core-total {
  min-height: 42px !important;
  padding: 0 8px 0 10px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  color: #73798a !important;
  font-size: .66rem !important;
  white-space: nowrap;
}

body.cinema-v2.cinema-history-page .history-core-total strong {
  color: #e5e1eb !important;
  font-size: .78rem !important;
}

body.cinema-v2.cinema-history-page .history-core-column-head,
body.cinema-v2.cinema-history-page .history-core-row {
  grid-template-columns: minmax(220px,1.45fr) 132px minmax(150px,.85fr) 110px 88px 74px !important;
  gap: 12px !important;
  align-items: center !important;
}

body.cinema-v2.cinema-history-page .history-core-column-head {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-bottom: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  background: #0c101a !important;
  color: #656b7d !important;
  font-size: .56rem !important;
  font-weight: 760;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.cinema-v2.cinema-history-page .history-core-table {
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 0 0 12px 12px !important;
  background: #0e121d !important;
}

body.cinema-v2.cinema-history-page .history-core-column-head[hidden] + .history-core-table {
  border-radius: 12px !important;
}

body.cinema-v2.cinema-history-page .history-core-row {
  min-height: 66px !important;
  padding: 10px 15px !important;
  border-bottom: 1px solid rgba(255,255,255,.065) !important;
  background: transparent;
  transition: background .14s ease;
}

body.cinema-v2.cinema-history-page .history-core-row:hover {
  background: rgba(255,255,255,.018);
}

body.cinema-v2.cinema-history-page .history-core-row:last-child {
  border-bottom: 0 !important;
}

body.cinema-v2.cinema-history-page .history-core-title {
  min-width: 0;
  display: grid !important;
  gap: 3px !important;
}

body.cinema-v2.cinema-history-page .history-core-title strong {
  overflow: hidden;
  color: #f0edf5 !important;
  font-size: .8rem !important;
  font-weight: 800 !important;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.cinema-v2.cinema-history-page .history-core-title small,
body.cinema-v2.cinema-history-page .history-core-row time,
body.cinema-v2.cinema-history-page .history-core-watch-count {
  color: #777d8f !important;
  font-size: .65rem !important;
}

body.cinema-v2.cinema-history-page .history-core-source {
  min-height: 26px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: .61rem !important;
  font-weight: 790 !important;
}

body.cinema-v2.cinema-history-page .history-core-reaction select {
  width: 100% !important;
  min-height: 34px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 8px !important;
  background: #0a0e17 !important;
  color: #c3c0cb !important;
  font-size: .65rem !important;
}

body.cinema-v2.cinema-history-page .history-core-open {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(155,92,255,.22) !important;
  border-radius: 8px !important;
  background: rgba(112,58,180,.10) !important;
  color: #c7a9ef !important;
  font-size: .62rem !important;
  font-weight: 800 !important;
}

body.cinema-v2.cinema-history-page .history-core-open:hover {
  border-color: rgba(155,92,255,.4) !important;
  background: rgba(112,58,180,.20) !important;
  color: #f1e7ff !important;
}

body.cinema-v2.cinema-history-page .history-core-state {
  min-height: 470px !important;
  padding: 28px !important;
  border: 0 !important;
  background: transparent !important;
}

body.cinema-v2.cinema-history-page .history-core-state img {
  width: min(250px, 58vw) !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

body.cinema-v2.cinema-history-page .history-core-state strong {
  color: #c17cff !important;
  font-size: 1.15rem !important;
}

body.cinema-v2.cinema-history-page .history-core-state span {
  color: #858b9d !important;
  font-size: .76rem !important;
}

body.cinema-v2.cinema-history-page .history-core-status {
  margin: 10px 0 0 !important;
}

body.cinema-v2.cinema-history-page .history-core-load-more {
  min-height: 40px !important;
  margin: 14px auto 0 !important;
  padding: 0 18px !important;
  display: block;
  border-radius: 9px !important;
}

@media (min-width: 981px) {
  body.cinema-v2.cinema-history-page .sidebar {
    overflow: visible;
  }

  body.cinema-v2.cinema-history-page .cinema-minimize-button {
    position: absolute;
    z-index: 40;
    top: 106px;
    right: -17px;
    width: 34px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 10px;
    background: #090c14;
    color: #a2a6b6;
    box-shadow: 0 10px 28px rgba(0,0,0,.24);
    font-size: 0;
  }

  body.cinema-v2.cinema-history-page .cinema-minimize-button svg,
  body.cinema-v2.cinema-history-page .cinema-minimize-button span {
    display: none !important;
  }

  body.cinema-v2.cinema-history-page .cinema-minimize-button::before {
    content: "‹";
    font-size: 25px;
    line-height: 1;
  }

  body.cinema-v2.cinema-history-page.cinema-sidebar-minimized .cinema-minimize-button::before {
    content: "›";
  }

  body.cinema-v2.cinema-history-page .cinema-account-control {
    display: none !important;
  }

  body.cinema-v2.cinema-history-page.cinema-sidebar-minimized .home-brand {
    width: 58px;
    height: 58px;
    background: url("../assets/images/comrade-logo-compact.png?v=1") center / contain no-repeat;
  }

  body.cinema-v2.cinema-history-page.cinema-sidebar-minimized .home-brand img {
    opacity: 0;
  }
}

body.cinema-v2.cinema-history-page .home-level-badge {
  display: none !important;
}

@media (max-width: 1180px) {
  body.cinema-v2.cinema-history-page .history-core-toolbar {
    grid-template-columns: minmax(200px,1.3fr) repeat(2,minmax(130px,.75fr)) !important;
  }
  body.cinema-v2.cinema-history-page .history-core-toolbar label:nth-child(4) {
    grid-column: 2 / 4;
  }
  body.cinema-v2.cinema-history-page .history-core-total {
    display: none !important;
  }
  body.cinema-v2.cinema-history-page .history-core-column-head,
  body.cinema-v2.cinema-history-page .history-core-row {
    grid-template-columns: minmax(185px,1.25fr) 120px minmax(135px,.9fr) 92px 72px !important;
  }
  body.cinema-v2.cinema-history-page .history-core-column-head > :nth-child(5),
  body.cinema-v2.cinema-history-page .history-core-row > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 760px) {
  body.cinema-v2.cinema-history-page .cinema-history-approved-section {
    min-height: 0;
    padding: 20px !important;
  }
  body.cinema-v2.cinema-history-page .cinema-history-heading {
    align-items: stretch;
    flex-direction: column;
  }
  body.cinema-v2.cinema-history-page .cinema-history-heading [data-sync-plex-watched] {
    width: 100%;
  }
  body.cinema-v2.cinema-history-page .history-core-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }
  body.cinema-v2.cinema-history-page .history-core-search,
  body.cinema-v2.cinema-history-page .history-core-toolbar label:nth-child(4) {
    grid-column: 1 / -1 !important;
  }
  body.cinema-v2.cinema-history-page .history-core-column-head {
    display: none !important;
  }
  body.cinema-v2.cinema-history-page .history-core-table {
    border-radius: 12px !important;
  }
  body.cinema-v2.cinema-history-page .history-core-row {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 8px 12px !important;
  }
  body.cinema-v2.cinema-history-page .history-core-title { grid-column: 1; }
  body.cinema-v2.cinema-history-page .history-core-row > div:nth-child(2) { grid-column: 2; grid-row: 1; }
  body.cinema-v2.cinema-history-page .history-core-reaction { grid-column: 1 / -1; }
  body.cinema-v2.cinema-history-page .history-core-row time,
  body.cinema-v2.cinema-history-page .history-core-watch-count { grid-column: auto; }
  body.cinema-v2.cinema-history-page .history-core-open { grid-column: 1 / -1; }
}
