/*
 * Spicy discovery refresh
 * A quiet editorial extension of the existing navy / pepper-pink identity.
 * The profile/player and existing suggestion groups remain untouched.
 */

body[data-spicy-page] {
  padding-bottom: 0 !important;
}

body[data-spicy-page] .spicy-mobile-account {
  display: none;
}

@media (max-width: 767px) {
  body[data-spicy-page] {
    padding-bottom: calc(68px + env(safe-area-inset-bottom)) !important;
  }

  body[data-spicy-page] .spicy-mobile-account {
    position: fixed;
    z-index: 120;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    min-height: calc(68px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    background: var(--spicy-pink, #fb4d94);
    color: white;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 -8px 24px rgba(5,5,20,.2);
  }

  body[data-spicy-page] .spicy-mobile-account:focus-visible {
    outline: 2px solid white;
    outline-offset: -5px;
  }
}

body[data-spicy-page] [data-spicy-retired-footer],
body[data-spicy-page] [data-spicy-retired-chat],
body[data-spicy-page] [data-spicy-retired-navigation] {
  display: none !important;
}

/* Some inherited layouts place this mobile CTA outside the React root. */
body[data-spicy-page] [data-testid="streamates-floating-account"],
body[data-spicy-page] [data-testid="mobile-account-bar"] {
  display: none !important;
}

body[data-spicy-page] .spicy-simple-footer {
  display: flex !important;
}

/* Keep the original header, logo, search and account controls.
   Only the Browse dropdown and hamburger navigation are retired. */
body[data-spicy-page] #root header details {
  display: none !important;
}

body[data-spicy-page] #root header form[role="search"],
body[data-spicy-page] #root header button[aria-controls="template3-mobile-search"],
body[data-spicy-page] #template3-mobile-search {
  display: none !important;
}

body[data-spicy-page] .spicy-header-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--spicy-white, #fff);
}

body[data-spicy-page] .spicy-header-discover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(251,77,148,.35);
  border-radius: 7px;
  background: rgba(251,77,148,.08);
  color: var(--spicy-pink, #fb4d94);
  cursor: pointer;
}

body[data-spicy-page] .spicy-header-discover:hover:not(:disabled) {
  border-color: var(--spicy-pink, #fb4d94);
  background: rgba(251,77,148,.18);
}

body[data-spicy-page] .spicy-header-discover:focus-visible {
  outline: 2px solid var(--spicy-pink, #fb4d94);
  outline-offset: 3px;
}

body[data-spicy-page] .spicy-header-discover:disabled {
  opacity: .45;
  cursor: wait;
}

body[data-spicy-page] .spicy-header-discover-slot {
  display: flex;
  justify-content: center;
  flex: 1;
  min-width: 0;
  margin-inline: 12px;
}

body[data-spicy-page] .spicy-header-discover-desktop {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
}

body[data-spicy-page] .spicy-header-discover-mobile {
  display: none;
}

@media (max-width: 767px) {
  body[data-spicy-page] .spicy-header-discover-slot {
    display: none;
  }

  body[data-spicy-page] .spicy-header-discover-mobile {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
  }
}

/* Retired profile blocks must not leave their original section spacing. */
body[data-spicy-page] [data-live-room-details] {
  margin-top: 24px !important;
}

body[data-spicy-page] [data-live-room-details] > div > :last-child {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body[data-spicy-page] [data-live-room-details] section[aria-labelledby],
body[data-spicy-page] [data-live-room-details] section[aria-labelledby] > div:last-child {
  min-height: 0 !important;
}

body[data-spicy-page] [data-live-room-details] section[aria-labelledby] + section {
  margin-top: 28px !important;
}

body[data-spicy-page] [data-live-room-details] article {
  height: auto !important;
}

@media (min-width: 768px) {
  body[data-spicy-page] [data-live-room-details] section[aria-labelledby] {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  body[data-spicy-page] [data-live-room-details] section[aria-labelledby] + section {
    margin-top: 32px !important;
  }
}

body[data-spicy-page] .spicy-more-models {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1747px;
  margin: 32px auto 40px;
  padding: 39px 34px 32px;
  border: 1px solid var(--spicy-pink, #fb4d94);
  border-radius: 6px;
  color: var(--spicy-white, #fff);
}

body[data-spicy-page] .spicy-more-models::before {
  content: none;
  position: absolute;
  z-index: -1;
  top: -54px;
  right: 4%;
  width: clamp(180px, 27vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 77, 148, .075), transparent 69%);
  pointer-events: none;
}

body[data-spicy-page] .spicy-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 29px;
  min-height: 71px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}

body[data-spicy-page] .spicy-section-heading h2 {
  position: relative;
  margin: 0;
  color: var(--spicy-white, #fff);
  font-size: 32px;
  font-weight: 900;
  line-height: 48px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-spicy-page] .spicy-section-heading h2::after {
  content: none;
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 15px;
  border-radius: 99px;
  background: var(--spicy-pink, #fb4d94);
}

body[data-spicy-page] .spicy-attribution {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin: 0 0 3px;
  color: var(--spicy-white, #fff);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.035em;
}

body[data-spicy-page] .spicy-model-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 40px);
  align-items: start;
}

body[data-spicy-page] .spicy-model-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--spicy-white, #fff);
  text-decoration: none;
  box-shadow: none;
  transition: transform 220ms cubic-bezier(.2, .7, .2, 1), border-color 220ms ease, box-shadow 220ms ease;
}

body[data-spicy-page] .spicy-model-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(251, 77, 148, 0);
  transition: box-shadow 220ms ease;
}

body[data-spicy-page] .spicy-model-card > img {
  display: block;
  width: 100%;
  height: 184px;
  aspect-ratio: auto;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: var(--spicy-surface-raised, #303149);
  transition: transform 380ms cubic-bezier(.2, .7, .2, 1), filter 220ms ease;
}

body[data-spicy-page] .spicy-model-meta {
  display: flex;
  height: 34px;
  min-height: 34px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

body[data-spicy-page] .spicy-model-meta strong {
  overflow: hidden;
  color: var(--spicy-white, #fff);
  min-width: 0;
  max-width: 138px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--spicy-pink, #fb4d94);
  font-size: 11px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-spicy-page] .spicy-model-meta span {
  color: var(--spicy-muted, #a3a3c0);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

body[data-spicy-page] .spicy-model-details {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
}

body[data-spicy-page] .spicy-model-details img.spicy-model-flag {
  display: block;
  width: 12px;
  height: 8px;
  object-fit: cover;
  border-radius: 1px;
}

body[data-spicy-page] .spicy-model-card:hover {
  z-index: 1;
  transform: translateY(-2px);
  border-color: rgba(251, 77, 148, .62);
  box-shadow: none;
}

body[data-spicy-page] .spicy-model-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(251, 77, 148, .12);
}

body[data-spicy-page] .spicy-model-card:hover > img {
  transform: scale(1.025);
  filter: saturate(1.06);
}

body[data-spicy-page] .spicy-model-card:focus-visible,
body[data-spicy-page] .spicy-load-models:focus-visible {
  outline: 2px solid var(--spicy-cyan, #24d2e5) !important;
  outline-offset: 4px;
}

body[data-spicy-page] .spicy-load-models {
  display: flex;
  width: fit-content;
  min-width: 176px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(24px, 3.4vw, 38px) auto 0;
  padding: 0 22px;
  border: 1px solid rgba(251, 77, 148, .58);
  border-radius: 5px;
  background: var(--spicy-pink, #fb4d94);
  color: #210817;
  font: 700 12px/1 "Montserrat", sans-serif;
  letter-spacing: .015em;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

body[data-spicy-page] .spicy-load-models::after {
  content: "→";
  font-size: 16px;
  line-height: 1;
  transition: transform 180ms ease;
}

body[data-spicy-page] .spicy-load-models:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--spicy-pink, #fb4d94);
  background: var(--spicy-pink, #fb4d94);
  color: #210817;
}

body[data-spicy-page] .spicy-load-models:hover:not(:disabled)::after {
  transform: translateX(3px);
}

body[data-spicy-page] .spicy-load-models:disabled,
body[data-spicy-page] .spicy-load-models[aria-busy="true"] {
  cursor: wait;
  opacity: .56;
  transform: none;
}

body[data-spicy-page] .spicy-load-models[aria-busy="true"]::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spicy-load-turn .75s linear infinite;
}

@keyframes spicy-load-turn {
  to { transform: rotate(360deg); }
}

body[data-spicy-page] .spicy-more-status {
  min-height: 1.5em;
  margin: 12px auto 0;
  color: var(--spicy-muted, #a3a3c0);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

body[data-spicy-page] .spicy-more-status:empty {
  display: none;
}

body[data-spicy-page] .spicy-simple-footer {
  width: min(calc(100% - 40px), 1192px);
  min-height: 88px;
  margin: 0 auto;
  padding: 20px 0 max(22px, env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, .075);
  color: var(--spicy-muted, #a3a3c0);
}

body[data-spicy-page] .spicy-simple-footer img {
  display: block;
  width: 104px;
  max-height: 30px;
  object-fit: contain;
  object-position: left center;
  opacity: .88;
}

body[data-spicy-page] .spicy-simple-footer p {
  margin: 0;
}

body[data-spicy-page] .spicy-footer-copy {
  flex: 1 1 auto;
  color: var(--spicy-muted, #a3a3c0);
  font-size: 11px;
  line-height: 1.55;
}

body[data-spicy-page] .spicy-simple-footer small {
  flex: 0 0 auto;
  color: var(--spicy-muted, #a3a3c0);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

@media (min-width: 1440px) {
  body[data-spicy-page] .spicy-simple-footer {
    width: min(calc(100% - 64px), 1240px);
  }
}

@media (max-width: 760px) {
  body[data-spicy-page] .spicy-simple-footer {
    width: min(calc(100% - 32px), 600px);
  }

  body[data-spicy-page] .spicy-more-models {
    width: calc(100% - 28px);
    margin-top: 28px;
    margin-bottom: 36px;
    border: 0;
    padding: 0;
  }

  body[data-spicy-page] .spicy-section-heading {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
    min-height: 0;
    border: 0;
    padding-bottom: 0;
    margin-bottom: 18px;
  }

  body[data-spicy-page] .spicy-section-heading h2 {
    font-size: 20px;
    line-height: 23px;
  }

  body[data-spicy-page] .spicy-attribution {
    font-size: 11px;
  }

  body[data-spicy-page] .spicy-attribution > img {
    width: 18px;
    height: 18px;
  }

  body[data-spicy-page] .spicy-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  body[data-spicy-page] .spicy-model-card {
    border-radius: 8px;
  }

  body[data-spicy-page] .spicy-model-card > img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  body[data-spicy-page] .spicy-model-meta {
    min-height: 34px;
    padding: 0 4px;
  }

  body[data-spicy-page] .spicy-simple-footer {
    flex-wrap: wrap;
    gap: 13px 20px;
  }

  body[data-spicy-page] .spicy-footer-copy {
    flex-basis: calc(100% - 140px);
    text-align: right;
  }

  body[data-spicy-page] .spicy-simple-footer small {
    flex-basis: 100%;
    text-align: left;
  }
}

@media (max-width: 420px) {
  body[data-spicy-page] .spicy-simple-footer {
    width: calc(100% - 24px);
  }

  body[data-spicy-page] .spicy-section-heading {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 11px;
  }

  body[data-spicy-page] .spicy-section-heading h2 {
    font-size: 20px;
  }

  body[data-spicy-page] .spicy-attribution {
    margin: 0;
  }

  body[data-spicy-page] .spicy-model-grid {
    gap: 10px;
  }

  body[data-spicy-page] .spicy-model-meta strong {
    font-size: 12px;
  }

  body[data-spicy-page] .spicy-model-meta span {
    font-size: 10px;
  }

  body[data-spicy-page] .spicy-simple-footer img {
    width: 88px;
  }

  body[data-spicy-page] .spicy-footer-copy {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-spicy-page] .spicy-model-card,
  body[data-spicy-page] .spicy-model-card::after,
  body[data-spicy-page] .spicy-model-card > img,
  body[data-spicy-page] .spicy-load-models,
  body[data-spicy-page] .spicy-load-models::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
