/**
 * SwissFans 2.0 — Premium Creator Discovery / Explore (Phase 1)
 *
 * Scope: body.sf-creator-discovery-v2
 * Loaded only when feature flag creator_discovery_ui_v2 is true.
 * Flag-off: this file is not enqueued → legacy /creators page unchanged.
 *
 * UI only. Preserve: #moreType, data-type, data-last, data-r, .mor,
 * #search_creator, .creator_item a[href], infinite-scroll hooks.
 */

/* ------------------------------------------------------------------ */
/* Tokens & page shell                                                 */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 {
  /* Hard hex fallbacks — legacy .creator_nm {#444} must never win on dark cards. */
  --sf-cd-max: 1480px;
  --sf-cd-bg: #150a16;
  --sf-cd-card: #1c0f1f;
  --sf-cd-card-soft: #221325;
  --sf-cd-line: #2e1a32;
  --sf-cd-text: #f7eef8;
  --sf-cd-muted: #c4b3c6;
  --sf-cd-subtle: #8a7a8d;
  --sf-cd-pink: #e91e8c;
  --sf-cd-pink-soft: rgba(233, 30, 140, 0.16);
  --sf-cd-radius: 16px;
  --sf-cd-radius-sm: 12px;
  --sf-cd-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  background-color: #150a16;
  background-image: none;
  color: #f7eef8;
}

body.sf-creator-discovery-v2 .creators_wrapper.sf-cd-root {
  max-width: var(--sf-cd-max);
  width: min(100%, var(--sf-cd-max));
  margin-inline: auto;
  padding: 1.25rem 1rem 3rem;
  box-sizing: border-box;
  background: transparent;
}

/* ------------------------------------------------------------------ */
/* Header search (global header, scoped to this page)                  */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .i_search {
  max-width: 420px;
}

body.sf-creator-discovery-v2 #search_creator.i_s_input,
body.sf-creator-discovery-v2 .i_s_input#search_creator {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--sf-cd-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sf-cd-text);
  padding-inline: 1rem 1.1rem;
}

body.sf-creator-discovery-v2 #search_creator:focus {
  outline: 2px solid rgba(225, 34, 146, 0.65);
  outline-offset: 2px;
  border-color: rgba(225, 34, 146, 0.45);
}

body.sf-creator-discovery-v2 .i_general_box_search_container.generalBox {
  background: var(--sf-cd-card);
  border: 1px solid var(--sf-cd-line);
  border-radius: var(--sf-cd-radius-sm);
  box-shadow: var(--sf-cd-shadow);
  color: var(--sf-cd-text);
}

/* ------------------------------------------------------------------ */
/* Page header                                                         */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .sf-cd-header {
  margin: 0 0 1rem;
  padding: 0 0.15rem;
}

body.sf-creator-discovery-v2 .sf-cd-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--sf-cd-text);
  line-height: 1.2;
}

/* ------------------------------------------------------------------ */
/* Filters / category chips                                            */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .sf-cd-filters.creators_menu_wrapper,
body.sf-creator-discovery-v2 .sf-cd-tabs.creators_menu_wrapper {
  padding: 0;
  margin-bottom: 1rem;
}

body.sf-creator-discovery-v2 .sf-cd-filters-row.tabing,
body.sf-creator-discovery-v2 .sf-cd-tabs-row.tabing {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem;
  background: #150a16;
  border: 1px solid #2e1a32;
  border-radius: 999px;
}

body.sf-creator-discovery-v2 .sf-cd-tabs-row.tabing::-webkit-scrollbar {
  display: none;
}

body.sf-creator-discovery-v2 .sf-cd-chip-short {
  display: none;
}

body.sf-creator-discovery-v2 .sf-cd-chip-full {
  display: inline;
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sf-cd-line);
  line-height: 1;
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  color: var(--sf-cd-muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item:hover a {
  color: var(--sf-cd-text);
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item.active_pc {
  background: var(--sf-gradient-accent, linear-gradient(135deg, #e91e8c, #8b2fc9));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(139, 47, 201, 0.28);
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item.active_pc a {
  color: #ffffff;
}

body.sf-creator-discovery-v2 .sf-cd-chip.creator_item:focus-within {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.sf-creator-discovery-v2 .sf-cd-subcats.subcategoryname {
  background: var(--sf-cd-card);
  border: 1px solid var(--sf-cd-line);
  border-radius: var(--sf-cd-radius-sm);
  box-shadow: var(--sf-cd-shadow);
}

body.sf-creator-discovery-v2 .sf-cd-subcats .sub_m_item a {
  color: var(--sf-cd-text);
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .sf-cd-section.creators_container {
  padding: 0.5rem 0 0;
}

body.sf-creator-discovery-v2 .sf-cd-section-title.creator_pate_title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sf-cd-text);
  text-transform: none;
  letter-spacing: -0.01em;
  padding-bottom: 0.85rem;
}

/* ------------------------------------------------------------------ */
/* Grid                                                                */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .sf-cd-grid.creators_list_container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  width: 100%;
}

body.sf-creator-discovery-v2 .sf-cd-grid .creator_list_box_wrp,
body.sf-creator-discovery-v2 .sf-cd-grid .sf-cd-card {
  float: none;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
}

body.sf-creator-discovery-v2 .sf-cd-grid--trending {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

body.sf-creator-discovery-v2 .sf-cd-grid .i_loading {
  grid-column: 1 / -1;
}

body.sf-creator-discovery-v2 .sf-cd-empty.no_creator_f_wrap {
  grid-column: 1 / -1;
  margin: 0.5rem 0;
  padding: 2rem 1.25rem;
  border-radius: var(--sf-cd-radius);
  border: 1px dashed var(--sf-cd-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sf-cd-muted);
  flex-direction: column;
  gap: 0.65rem;
}

body.sf-creator-discovery-v2 .sf-cd-empty .n_c_t {
  color: var(--sf-cd-muted);
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Creator cards                                                       */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .sf-cd-card-inner.creator_l_box,
body.sf-creator-discovery-v2 .creator_l_box.sf-cd-card-inner {
  background: var(--sf-cd-card);
  border: 0.5px solid var(--sf-cd-line);
  border-radius: var(--sf-cd-radius);
  box-shadow: var(--sf-cd-shadow);
  overflow: hidden;
  height: 100%;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

body.sf-creator-discovery-v2 .sf-cd-card:hover .sf-cd-card-inner,
body.sf-creator-discovery-v2 .sf-cd-card:focus-within .sf-cd-card-inner {
  border-color: var(--sf-color-border-accent, rgba(233, 30, 140, 0.35));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

body.sf-creator-discovery-v2 .sf-cd-cover.creator_l_cover {
  height: 168px;
  background-color: var(--sf-bg-elevated, #221325);
  background-image: var(--sf-gradient-placeholder, linear-gradient(160deg, #2a1030, #1c0f1f));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

body.sf-creator-discovery-v2 .sf-cd-cover.creator_l_cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(23, 17, 32, 0.95), transparent);
  pointer-events: none;
}

/* Kartenbild = Profilbild (avatar_url), gross/zentral/quadratisch — kein
   Cover-/Titelbild-Ausschnitt mehr fuer diese Kartenansicht. */
body.sf-creator-discovery-v2 .sf-cd-cover.sf-cd-cover--avatar {
  height: auto;
  aspect-ratio: 1 / 1;
  /* Akzent-Gradient statt neutralem Platzhalter-Verlauf hinter dem
     Profilbild (Design-System). */
  background-image: var(--sf-gradient-accent, linear-gradient(135deg, #e91e8c, #8b2fc9));
}

body.sf-creator-discovery-v2 .sf-cd-cover--avatar::after {
  display: none;
}

body.sf-creator-discovery-v2 .sf-cd-cover-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* Akzent-Gradient statt neutralem Grauton hinter dem Profilbild
     (Design-System: linear-gradient(135deg, #e91e8c, #8b2fc9)). */
  background: var(--sf-gradient-accent, linear-gradient(135deg, #e91e8c, #8b2fc9));
}

body.sf-creator-discovery-v2 .sf-cd-followers {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(21, 10, 22, 0.62);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--sf-text-primary, #f7eef8);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.sf-creator-discovery-v2 .sf-cd-card-body.creator_l_avatar_name,
body.sf-creator-discovery-v2 .creator_l_avatar_name.sf-cd-card-body {
  margin-top: 0 !important;
  padding: 0.85rem 0.85rem 1rem !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  background: #1c0f1f !important;
  position: relative;
  z-index: 1;
}

body.sf-creator-discovery-v2 .sf-cd-avatar-wrap.creator_avatar_container {
  margin-top: 0;
  position: relative;
  z-index: 2;
  display: none;
}

body.sf-creator-discovery-v2 .sf-cd-avatar.creator_avatar,
body.sf-creator-discovery-v2 .sf-cd-avatar.creator_avatar img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

body.sf-creator-discovery-v2 .sf-cd-avatar.creator_avatar {
  border: 3px solid #1a1224;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #101014;
}

body.sf-creator-discovery-v2 .sf-cd-name.creator_nm,
body.sf-creator-discovery-v2 .sf-cd-name.creator_nm a,
body.sf-creator-discovery-v2 .creator_nm.sf-cd-name,
body.sf-creator-discovery-v2 .creator_nm.sf-cd-name a {
  color: #f7eef8 !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0 !important;
  line-height: 1.25;
}

body.sf-creator-discovery-v2 .sf-cd-name.creator_nm a:hover,
body.sf-creator-discovery-v2 .creator_nm.sf-cd-name a:hover {
  color: #ff8fd0 !important;
}

body.sf-creator-discovery-v2 .sf-cd-name.creator_nm a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.sf-creator-discovery-v2 .sf-cd-verified {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: #e91e8c;
}

body.sf-creator-discovery-v2 .sf-cd-verified svg {
  width: 15px;
  height: 15px;
  fill: none !important;
  stroke: none !important;
}

body.sf-creator-discovery-v2 .sf-cd-verified svg path:first-child {
  fill: currentColor !important;
}

body.sf-creator-discovery-v2 .sf-cd-verified svg path:last-child {
  fill: #ffffff !important;
}

body.sf-creator-discovery-v2 .sf-cd-handle {
  margin-top: 0.1rem !important;
  color: #8a7a8d !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.sf-creator-discovery-v2 .sf-cd-free-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.45rem !important;
  padding: 0.28rem 0.65rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(233, 30, 140, 0.35) !important;
  background: rgba(233, 30, 140, 0.12) !important;
  color: #f7a8d0 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Kennzahlen-Reihe (Beitraege/Bilder/Videos/Produkte/Auktionen) — alle
   gleichzeitig sichtbar in einer Reihe, keine feste Breite pro Pill mehr
   (sonst laeuft die Reihe bei 5 Werten aus dem Karten-Rahmen). */
body.sf-creator-discovery-v2 .sf-cd-stats.i_p_items_box_ {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  width: 100%;
}

body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--sf-cd-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sf-cd-muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: 0.85;
}

body.sf-creator-discovery-v2 .sf-cd-stats .sf-cd-stat-value {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Werte von 0 dezent ausgegraut statt gleich stark wie aktive Werte —
   bleiben aber sichtbar (kein display:none). */
body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box.sf-cd-stat-zero {
  color: var(--sf-cd-muted);
  opacity: 0.45;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.015);
}

body.sf-creator-discovery-v2 .sf-cd-previews.creator_last_two_post {
  margin-top: 0.85rem;
  gap: 0.4rem;
  width: 100%;
}

body.sf-creator-discovery-v2 .sf-cd-previews .creator_last_post_item {
  flex: 1 1 0;
  min-width: 0;
}

body.sf-creator-discovery-v2 .sf-cd-previews .creator_last_post_item-box {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--sf-cd-line);
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
}

body.sf-creator-discovery-v2 .sf-cd-previews .creator_last_post_item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.sf-creator-discovery-v2 .sf-cd-previews .onlySubsSuggestion {
  border-radius: 10px;
}

body.sf-creator-discovery-v2 .sf-cd-previews .no_content {
  color: var(--sf-cd-muted);
  font-size: 0.82rem;
  padding: 0.75rem;
  border: 1px dashed var(--sf-cd-line);
  border-radius: 10px;
  width: 100%;
}

/* Trending emphasis */
body.sf-creator-discovery-v2 .sf-cd-grid--trending .sf-cd-card-inner {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(225, 34, 146, 0.12);
}

/* ------------------------------------------------------------------ */
/* Tablet                                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
  body.sf-creator-discovery-v2 .sf-cd-grid.creators_list_container,
  body.sf-creator-discovery-v2 .sf-cd-grid--trending {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ */
/* Mobile                                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 720px) {
  body.sf-creator-discovery-v2 .creators_wrapper.sf-cd-root {
    padding: 0.85rem 0.85rem 5.5rem;
  }

  body.sf-creator-discovery-v2 .sf-cd-title {
    font-size: 1.45rem;
    margin-bottom: 0.85rem;
  }

  body.sf-creator-discovery-v2 .sf-cd-chip-full {
    display: none;
  }

  body.sf-creator-discovery-v2 .sf-cd-chip-short {
    display: inline;
  }

  body.sf-creator-discovery-v2 .sf-cd-tabs-row.tabing {
    width: 100%;
    box-sizing: border-box;
  }

  body.sf-creator-discovery-v2 .sf-cd-tabs .sf-cd-chip.creator_item {
    flex: 1 1 0;
  }

  body.sf-creator-discovery-v2 .sf-cd-tabs .sf-cd-chip.creator_item a {
    width: 100%;
    justify-content: center;
    min-height: 38px;
    font-size: 0.86rem;
  }

  body.sf-creator-discovery-v2 .sf-cd-grid.creators_list_container,
  body.sf-creator-discovery-v2 .sf-cd-grid--trending {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  body.sf-creator-discovery-v2 .sf-cd-cover.creator_l_cover,
  body.sf-creator-discovery-v2 a.sf-cd-cover {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  body.sf-creator-discovery-v2 .sf-cd-card-body.creator_l_avatar_name,
  body.sf-creator-discovery-v2 .creator_l_avatar_name.sf-cd-card-body {
    margin-top: 0 !important;
    padding: 0.7rem 0.55rem 0.8rem !important;
  }

  body.sf-creator-discovery-v2 .sf-cd-name.creator_nm,
  body.sf-creator-discovery-v2 .sf-cd-name.creator_nm a,
  body.sf-creator-discovery-v2 .creator_nm.sf-cd-name,
  body.sf-creator-discovery-v2 .creator_nm.sf-cd-name a {
    font-size: 0.86rem !important;
    color: #f7eef8 !important;
  }

  body.sf-creator-discovery-v2 .sf-cd-handle {
    font-size: 0.72rem !important;
    color: #8a7a8d !important;
  }

  body.sf-creator-discovery-v2 .sf-cd-free-badge {
    font-size: 0.62rem !important;
    padding: 0.22rem 0.5rem !important;
    max-width: 100%;
  }

  /* Stats clutter the 2-col mobile cards — keep hierarchy clean */
  body.sf-creator-discovery-v2 .sf-cd-stats.i_p_items_box_ {
    display: none !important;
  }

  body.sf-creator-discovery-v2 .sf-cd-previews.creator_last_two_post {
    display: none;
  }

  body.sf-creator-discovery-v2 .i_search {
    max-width: 100%;
  }
}

@supports (padding: env(safe-area-inset-bottom)) {
  body.sf-creator-discovery-v2 .creators_wrapper.sf-cd-root {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  body.sf-creator-discovery-v2 *,
  body.sf-creator-discovery-v2 *::before,
  body.sf-creator-discovery-v2 *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* Kill legacy light-theme collisions (style.css .creator_nm #444 etc.) */
/* ------------------------------------------------------------------ */

body.sf-creator-discovery-v2 .creator_list_box_wrp,
body.sf-creator-discovery-v2 .sf-cd-card {
  background: transparent !important;
}

body.sf-creator-discovery-v2 .creator_l_box,
body.sf-creator-discovery-v2 .sf-cd-card-inner {
  background: #1c0f1f !important;
  border: 1px solid #2e1a32 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  flex-direction: column !important;
}

body.sf-creator-discovery-v2 a.sf-cd-cover {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

body.sf-creator-discovery-v2 .sf-cd-followers {
  color: #f7eef8 !important;
  background: rgba(21, 10, 22, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box {
  color: #c4b3c6 !important;
  border-color: #2e1a32 !important;
  background: #150a16 !important;
}

body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box svg,
body.sf-creator-discovery-v2 .sf-cd-stats .i_btn_item_box path {
  fill: currentColor;
  color: #c4b3c6;
}
