/* TV Tracker 0.2.4-dev - read-only show preview */

.preview-id-form {
  margin-top: 12px;
}

.search-result-count {
  margin-top: 12px;
}

.preview-result-card {
  position: relative;
}

.preview-result-poster {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}

.preview-result-poster img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  background: #020617;
}

.preview-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.preview-result-heading h3 {
  margin: 0;
}

.preview-result-heading h3 a {
  color: inherit;
  text-decoration: none;
}

.preview-result-heading h3 a:hover {
  color: #f6dca8;
}

.preview-state-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(226, 176, 79, .24);
  border-radius: 999px;
  background: rgba(226, 176, 79, .10);
  color: #f6dca8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.preview-state-badge.library {
  border-color: rgba(52, 211, 153, .24);
  background: rgba(52, 211, 153, .10);
  color: #a7f3d0;
}

.preview-result-summary {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.preview-open-button {
  width: max-content;
}

.preview-show-hero {
  border-color: rgba(226, 176, 79, .23);
}

.preview-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.preview-source {
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  background: rgba(15, 23, 42, .42);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.preview-notice {
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  margin: 4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 176, 79, .20);
  border-radius: 13px;
  background:
    linear-gradient(
      135deg,
      rgba(226, 176, 79, .11),
      rgba(15, 23, 42, .30)
    );
}

.preview-notice strong {
  color: #f6dca8;
  font-size: 13px;
}

.preview-notice span {
  color: var(--muted);
  font-size: 12px;
}

.preview-follow-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(52, 211, 153, .20);
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 0 0,
      rgba(52, 211, 153, .10),
      transparent 45%
    ),
    rgba(2, 6, 23, .20);
}

.preview-follow-panel > div {
  display: grid;
  gap: 4px;
}

.preview-follow-panel strong {
  color: #d1fae5;
}

.preview-follow-panel span {
  color: var(--muted);
  font-size: 12px;
}

.preview-follow-panel form {
  margin: 0;
}

.preview-follow-button {
  min-width: 132px;
  white-space: nowrap;
}

.preview-episode-section {
  border-color: rgba(148, 163, 184, .15);
}

.episode-row.preview-episode-row {
  grid-template-columns:
    112px
    minmax(0, 1fr);
  opacity: 1;
}

.preview-episode-row .episode-thumb {
  width: 112px;
}

@media (max-width: 760px) {
  .preview-follow-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-follow-panel form,
  .preview-follow-button {
    width: 100%;
  }

  .episode-row.preview-episode-row {
    grid-template-columns:
      82px
      minmax(0, 1fr);
  }

  .preview-episode-row .episode-thumb {
    width: 82px;
  }
}

/* TVTRACKER_MERGED_SEARCH_POLISH_START */

.search-intro {
  max-width: 820px;
}

.merged-search-form {
  margin-top: 18px;
}

.merged-search-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.merged-search-stats span {
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.30);
  color: var(--muted);
  font-size: 12px;
}

.merged-search-stats strong {
  color: #f6dca8;
}

.merged-search-results {
  overflow: visible;
}

.search-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.preview-state-badge.cached {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.10);
  color: #bfdbfe;
}

.preview-search-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.preview-result-card {
  display: grid;
  grid-template-columns:
    116px
    minmax(0, 1fr);
  gap: 14px;

  min-width: 0;
  min-height: 220px;
  padding: 12px;

  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;

  background:
    radial-gradient(
      circle at 0 0,
      rgba(226, 176, 79, 0.055),
      transparent 43%
    ),
    rgba(20, 29, 46, 0.84);

  box-shadow:
    inset 0 1px 0
    rgba(255, 255, 255, 0.025);

  overflow: hidden;
}

.preview-result-card:hover {
  border-color: rgba(226, 176, 79, 0.30);
  transform: translateY(-1px);
}

.preview-result-poster {
  display: block;
  width: 116px;
  height: 174px;
  min-width: 116px;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;

  background: #05070c;
}

.preview-result-poster img,
.preview-result-poster
.poster-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.preview-result-poster img {
  object-fit: cover;
  object-position: center top;
}

.preview-result-poster
.poster-placeholder {
  display: grid;
  place-items: center;
  color: rgba(246, 220, 168, 0.72);
  font-weight: 900;
}

.preview-result-card
.show-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2px 0;
}

.preview-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.preview-result-heading h3 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.preview-result-heading h3 a {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  text-decoration: none;
  text-overflow: ellipsis;
}

.preview-result-heading h3 a:hover {
  color: #f6dca8;
}

.preview-result-heading
.preview-state-badge {
  flex: 0 0 auto;
  font-size: 8px;
}

.preview-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.preview-result-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(226, 176, 79, 0.46);
}

.preview-result-summary {
  display: -webkit-box;
  overflow: hidden;

  margin: 11px 0 12px;

  color: rgba(203, 213, 225, 0.78);
  font-size: 12px;
  line-height: 1.5;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.preview-open-button {
  width: max-content;
  margin-top: auto;
  padding-left: 14px;
  padding-right: 14px;
}

@media (max-width: 1180px) {
  .preview-search-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .preview-search-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .search-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .preview-result-card {
    grid-template-columns:
      92px
      minmax(0, 1fr);
    gap: 11px;
    padding: 10px;
  }

  .preview-result-poster {
    width: 92px;
    min-width: 92px;
    height: 138px;
  }

  .preview-result-summary {
    -webkit-line-clamp: 3;
  }
}

/* TVTRACKER_MERGED_SEARCH_POLISH_END */

/* TVTRACKER_SEARCH_FILTERS_0204_START */

.search-filter-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 18px;
  padding: 10px;

  border:
    1px solid
    rgba(148, 163, 184, 0.16);

  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.55),
      rgba(8, 11, 19, 0.34)
    );
}

.search-source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.search-source-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 36px;
  padding: 7px 11px;

  border:
    1px solid
    rgba(148, 163, 184, 0.16);

  border-radius: 9px;

  background:
    rgba(15, 23, 42, 0.38);

  color:
    rgba(203, 213, 225, 0.80);

  font-size: 11px;
  font-weight: 850;
  text-decoration: none;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.search-source-filter:hover {
  transform: translateY(-1px);

  border-color:
    rgba(226, 176, 79, 0.30);

  color: #f8fafc;
}

.search-source-filter strong {
  display: grid;
  place-items: center;

  min-width: 22px;
  min-height: 20px;
  padding: 2px 6px;

  border-radius: 6px;

  background:
    rgba(255, 255, 255, 0.055);

  color: #f6dca8;

  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.search-source-filter.is-active {
  border-color:
    rgba(226, 176, 79, 0.45);

  background:
    linear-gradient(
      135deg,
      rgba(226, 176, 79, 0.18),
      rgba(226, 176, 79, 0.07)
    );

  color: #fff6df;
}

.search-source-filter.library.is-active {
  border-color:
    rgba(52, 211, 153, 0.42);

  background:
    rgba(52, 211, 153, 0.12);

  color: #d1fae5;
}

.search-source-filter.system.is-active {
  border-color:
    rgba(96, 165, 250, 0.42);

  background:
    rgba(96, 165, 250, 0.12);

  color: #dbeafe;
}

.search-source-filter.tvmaze.is-active {
  border-color:
    rgba(226, 176, 79, 0.45);

  background:
    rgba(226, 176, 79, 0.12);
}

.library-result-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  flex: 0 0 auto;

  min-height: 36px;
  padding: 7px 10px;

  border:
    1px solid
    rgba(148, 163, 184, 0.16);

  border-radius: 9px;

  background:
    rgba(2, 6, 23, 0.34);

  color:
    rgba(203, 213, 225, 0.76);

  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.library-result-toggle:hover {
  border-color:
    rgba(52, 211, 153, 0.30);

  color: #d1fae5;
}

.library-result-toggle.is-on {
  border-color:
    rgba(52, 211, 153, 0.38);

  background:
    rgba(52, 211, 153, 0.10);

  color: #d1fae5;
}

.library-result-toggle-box {
  display: grid;
  place-items: center;

  width: 17px;
  height: 17px;

  border:
    1px solid
    rgba(148, 163, 184, 0.30);

  border-radius: 5px;

  background:
    rgba(15, 23, 42, 0.55);

  color: #6ee7b7;

  font-size: 11px;
  font-weight: 950;
}

.library-result-toggle.is-on
.library-result-toggle-box {
  border-color:
    rgba(52, 211, 153, 0.45);

  background:
    rgba(52, 211, 153, 0.14);
}

.library-filter-info {
  color:
    rgba(167, 243, 208, 0.72);

  font-size: 11px;
  font-weight: 750;
}

.preview-result-card[
  data-search-source="library"
] {
  border-color:
    rgba(52, 211, 153, 0.22);
}

.preview-result-card[
  data-search-source="system"
] {
  border-color:
    rgba(96, 165, 250, 0.22);
}

@media (max-width: 900px) {
  .search-filter-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .library-result-toggle {
    width: max-content;
  }
}

@media (max-width: 560px) {
  .search-source-filters {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .search-source-filter {
    justify-content: space-between;
  }

  .library-result-toggle {
    width: 100%;
  }
}

/* TVTRACKER_SEARCH_FILTERS_0204_END */
