/*
 * Design-system page only. Stash's own stylesheet positions card overlays and
 * stacks the rating stars; this file stands in for those few rules so the
 * specimens below match Stash's layout. Everything visual comes from juicy.css.
 */
body {
  font-family: var(--juicy-font-body);
  padding-bottom: 6rem;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.top-nav .nav-utility {
  margin-left: auto;
}

.ds-controls {
  align-items: center;
  background: rgb(13 5 32 / 88%);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--juicy-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 62px;
  z-index: 1020;
}

.ds-controls .label {
  color: var(--juicy-text-dim);
  font-family: var(--juicy-font-display);
  font-weight: 600;
}

.ds-section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 3.5rem 1rem 0;
}

.ds-section > h2 {
  align-items: center;
  color: var(--juicy-pink);
  display: flex;
  font-size: 2rem;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.ds-section > h2 img {
  height: 2.6rem;
  width: 2.6rem;
}

.ds-lede {
  color: var(--juicy-text-muted);
  margin-bottom: 1.5rem;
  max-width: 62ch;
}

.ds-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ds-panel {
  background: var(--juicy-card);
  border: var(--juicy-outline) solid var(--juicy-ink);
  border-radius: var(--juicy-radius-lg);
  box-shadow: var(--juicy-drop-lg);
  padding: 1.25rem;
}

.ds-caption {
  color: var(--juicy-text-dim);
  font-size: 0.85rem;
}

/* Hero */
.ds-hero {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 auto;
  max-width: 1180px;
  padding: 3rem 1rem 1rem;
}

.ds-wordmark {
  display: block;
  height: auto;
  max-width: 640px;
  width: 100%;
}

.ds-hero p {
  color: var(--juicy-text-muted);
  font-family: var(--juicy-font-display);
  font-size: 1.4rem;
  margin: 0.5rem 0 0 0.5rem;
}

.ds-hero-art {
  height: 240px;
  position: relative;
  width: 260px;
}

.ds-hero-art img {
  position: absolute;
}

.ds-hero-art .mascot {
  animation: ds-float 4s ease-in-out infinite;
  height: 210px;
  left: 20px;
  top: 20px;
  width: 210px;
}

.ds-hero-art .s1 {
  animation: juicy-wiggle 2.6s ease-in-out infinite;
  height: 56px;
  right: 0;
  top: 0;
  width: 56px;
}

.ds-hero-art .s2 {
  animation: juicy-wiggle 3.2s ease-in-out infinite reverse;
  bottom: 6px;
  height: 44px;
  left: 0;
  width: 44px;
}

.ds-hero-art .s3 {
  bottom: 0;
  height: 64px;
  right: 6px;
  transform: rotate(14deg);
  width: 64px;
}

@keyframes ds-float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

/* Palette */
.ds-swatches {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.ds-swatch {
  background: var(--juicy-card);
  border: var(--juicy-outline) solid var(--juicy-ink);
  border-radius: var(--juicy-radius-lg);
  box-shadow: var(--juicy-drop-lg);
  overflow: hidden;
}

.ds-swatch .chip {
  border-bottom: var(--juicy-outline) solid var(--juicy-ink);
  box-shadow: inset 0 8px 12px rgb(255 255 255 / 25%);
  height: 86px;
}

.ds-swatch .meta {
  padding: 0.6rem 0.75rem 0.75rem;
}

.ds-swatch code {
  color: var(--juicy-bubblegum);
  font-size: 0.8rem;
}

.ds-swatch .hex {
  color: var(--juicy-text);
  font-family: var(--juicy-font-display);
  font-weight: 600;
}

.ds-swatch .role {
  color: var(--juicy-text-dim);
  font-size: 0.82rem;
  line-height: 1.3;
}

/* Type */
.ds-type .specimen {
  border-bottom: 2px dashed var(--juicy-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 120px 1fr;
  padding: 0.75rem 0;
}

.ds-type .specimen:last-child {
  border-bottom: 0;
}

.ds-type .spec {
  color: var(--juicy-text-dim);
  font-size: 0.8rem;
  padding-top: 0.4rem;
}

/* Icons */
.ds-stickers {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.ds-sticker {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
}

.ds-sticker img {
  height: 84px;
  transition: transform var(--juicy-medium) var(--juicy-ease-bounce);
  width: 84px;
}

.ds-sticker:hover img {
  transform: scale(1.12) rotate(-6deg);
}

.ds-sticker span {
  color: var(--juicy-text-muted);
  font-family: var(--juicy-font-display);
  font-weight: 600;
}

.ds-glyph {
  background-color: currentcolor;
  display: inline-block;
  height: 32px;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  width: 32px;
}

/* Stash layout stand-ins: scene and performer cards */
.ds-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.ds-cards .scene-card {
  width: 300px;
}

.ds-cards .performer-card {
  width: 220px;
}

.scene-card .video-section,
.performer-card .thumbnail-section {
  position: relative;
}

.scene-card-preview {
  align-items: center;
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: center;
}

.performer-card-image {
  align-items: center;
  aspect-ratio: 2 / 3;
  display: flex;
  justify-content: center;
}

/*
 * Image cards and their zoom button, as Stash lays them out. Pictures keep
 * their own shape, so cards in a row differ in height.
 */
.ds-image-cards {
  align-items: flex-start;
}

.ds-cards .image-card {
  width: 240px;
}

.image-card .thumbnail-section {
  position: relative;
}

.grid-card .card-controls {
  align-items: center;
  display: flex;
  left: 0.5rem;
  position: absolute;
  top: 0.7rem;
  z-index: 3;
}

.grid-card .card-check {
  height: 1.2rem;
  opacity: 0;
  width: 1.2rem;
}

.grid-card .card-check:checked,
.grid-card:hover .card-check {
  opacity: 0.75;
}

@media (hover: none), (pointer: coarse) {
  .grid-card .card-check {
    opacity: 0.25;
    width: 1.5rem;
  }
}

.image-card-preview {
  align-items: center;
  aspect-ratio: 4 / 3;
  display: flex;
  justify-content: center;
  position: relative;
}

.image-card-preview.portrait {
  aspect-ratio: 3 / 4;
}

.preview-button {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  position: absolute;
  width: 100%;
}

.preview-button button.btn,
.preview-button button.btn:not(:disabled, .disabled):hover,
.preview-button button.btn:not(:disabled, .disabled):focus,
.preview-button button.btn:not(:disabled, .disabled):active {
  background: none;
  border: none;
  box-shadow: none;
}

.preview-button .fa-icon {
  filter: drop-shadow(2px 4px 6px black);
  height: 5em;
  opacity: 0;
  transition: opacity 0.5s;
  width: 5em;
}

.preview-button .fa-icon:hover {
  opacity: 0.8;
}

@media (hover: none), (pointer: coarse) {
  .preview-button {
    align-items: flex-end;
    justify-content: right;
  }

  .preview-button .fa-icon {
    height: 3em;
    opacity: 0.8;
    width: 3em;
  }
}

.scene-card-preview img,
.image-card-preview img,
.performer-card-image img {
  filter: drop-shadow(0 6px 0 rgb(1 2 36 / 35%));
  height: 46%;
}

.rating-banner {
  font-size: 0.8rem;
  position: absolute;
  z-index: 2;
}

.studio-overlay {
  color: #fff;
  font-family: var(--juicy-font-display);
  font-weight: 700;
  position: absolute;
  right: 0.6rem;
  text-shadow: 0 2px 0 var(--juicy-ink);
  top: 0.45rem;
}

.studio-overlay a {
  color: inherit;
}

.scene-specs-overlay {
  bottom: 0.7rem;
  display: flex;
  font-size: 0.8rem;
  gap: 0.3rem;
  position: absolute;
  right: 0.5rem;
}

.grid-card .progress-bar {
  bottom: 0;
  height: 6px;
  left: 0;
  position: absolute;
  right: 0;
}

.grid-card .progress-indicator {
  height: 100%;
}

.card-section {
  padding: 0.6rem 0.8rem 0.3rem;
}

.card-section-title {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.scene-card__details {
  font-size: 0.85rem;
}

.card > hr {
  margin: 0.4rem 0.8rem;
}

.card-popovers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 0.4rem 0.5rem;
}

.card-popovers .btn {
  align-items: center;
  display: inline-flex;
  font-size: 0.85rem;
  gap: 0.3rem;
}

.ds-ico {
  fill: currentcolor;
  height: 14px;
  width: 14px;
}

.performer-card .favorite-button {
  font-size: 1.3rem;
  left: 0.3rem;
  position: absolute;
  top: 0.2rem;
  z-index: 2;
}

.performer-card .performer-name {
  font-family: var(--juicy-font-display);
}

/* Rating stars stand-in for Stash's Rating/styles.scss */
.rating-stars {
  display: inline-flex;
  font-size: 1.6rem;
  vertical-align: middle;
}

.rating-stars button {
  font-size: inherit;
  line-height: 1;
  padding: 0 0.1rem;
  position: relative;
}

.rating-stars .filled-star {
  height: 100%;
  left: 0.1rem;
  overflow: hidden;
  position: absolute;
  top: 0;
}

.rating-stars .star-fill-0 .filled-star {
  width: 0;
}

.rating-stars .star-fill-100 .filled-star {
  width: 1em;
}

.rating-stars svg {
  display: block;
  height: 1em;
  width: 1em;
}

.star-rating-number {
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

/* Static overlays shown in place */
.ds-static .dropdown-menu,
.ds-static .toast,
.ds-static .modal-content,
.ds-static .tooltip {
  display: block;
  opacity: 1;
  position: static;
}

.ds-static .tooltip-inner {
  display: inline-block;
}

.ds-overlays {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Loading stand-in for Bootstrap's spinner box */
.LoadingIndicator {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.LoadingIndicator .spinner-border {
  border-radius: 50%;
  height: 4rem;
  width: 4rem;
}

.ds-copy {
  width: 100%;
}

.ds-copy td,
.ds-copy th {
  border-top: 2px dashed var(--juicy-line);
  padding: 0.6rem 0.75rem;
}

.ds-copy th {
  color: var(--juicy-text-dim);
  font-family: var(--juicy-font-display);
}

.ds-copy td:last-child {
  color: var(--juicy-bubblegum);
  font-family: var(--juicy-font-display);
  font-weight: 600;
}

.ds-footer {
  color: var(--juicy-text-dim);
  margin: 4rem auto 0;
  max-width: 1180px;
  padding: 0 1rem;
}

@media (width <= 720px) {
  .ds-hero {
    grid-template-columns: 1fr;
  }

  .ds-hero-art {
    display: none;
  }

  .ds-controls {
    top: 0;
  }
}

/* Stash-box specimens: the layout Stash's Tagger and react-select give them */
.search-item {
  padding: 1rem;
}

.search-result {
  padding: 1rem 0;
}

.scene-metadata {
  margin-left: 1rem;
}

.ds-cover {
  background: radial-gradient(circle at 30% 25%, #e9d6ff, #9b30ff);
  height: 7rem;
  object-fit: contain;
  padding: 1.25rem 3rem;
}

.ds-match {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.ds-match .entity-name {
  flex: 1 1 10rem;
}

.ds-match .react-select {
  width: 14rem;
}

.react-select__control {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 0.75rem;
}

.react-select__placeholder {
  color: var(--juicy-text-dim);
}

.stash-id-pill {
  display: inline-flex;
  font-size: 90%;
  line-height: 1;
  white-space: nowrap;
}

.stash-id-pill span,
.stash-id-pill a {
  padding: 0.25em 0.6em;
}

.scrape-dialog {
  max-width: 760px;
}
