/**
 * SwissFans 2.0 — stories-ui-v2.css
 * Loaded only when corresponding feature flag is true.
 * UI only. Preserve legacy IDs, data-*, forms, AJAX hooks.
 */
.stories_wrapper.sf-stories {
  --sf-v2-bg: var(--sf-color-void);
  --sf-v2-card: #1a1526;
  --sf-v2-card-soft: #21182c;
  --sf-v2-line: rgba(255, 255, 255, 0.09);
  --sf-v2-text: #f5f5f7;
  --sf-v2-muted: #9a9aa6;
  --sf-v2-pink: #e12292;
  --sf-v2-radius: 16px;
  --sf-v2-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  background-color: var(--sf-color-void);
  background-image: var(--sf-bg-canvas);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--sf-v2-text);
}
.stories_wrapper.sf-stories {
  gap: 0.65rem;
  padding: 0.35rem 0.25rem 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stories_wrapper.sf-stories .story-view-item,
.stories_wrapper.sf-stories .story-view-item-fake {
  border-radius: 50%;
  border: 2px solid rgba(195,29,142,0.75);
  box-shadow: 0 0 0 2px var(--sf-color-void);
  min-width: 72px;
  min-height: 72px;
  background-size: cover !important;
  background-position: center !important;
}
.stories_wrapper.sf-stories .story-view-item .name {
  color: #f5f5f7;
  font-size: 0.72rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.stories_wrapper.sf-stories .chsStoryw,
.stories_wrapper.sf-stories .newSto {
  color: #f5f5f7;
}
@media (prefers-reduced-motion: reduce) {
.stories_wrapper.sf-stories *, .stories_wrapper.sf-stories *::before, .stories_wrapper.sf-stories *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ */
/* Story-Erstellung (/createStory?t=image) — Design-System-Ueberarbeitung */
/* Scope: body.sf-stories-v2 (siehe storyImageCreator.php/storyTextCreator.php) */
/* UI only. Bestehende IDs/data-Attribute/Formularfelder unveraendert. */
/* ------------------------------------------------------------------ */

body.sf-stories-v2 .pageMiddle {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 0.85rem 2rem;
}

body.sf-stories-v2 .live_item,
body.sf-stories-v2 .live_item.sf-story-page-head {
  background: linear-gradient(180deg, #221325 0%, #1a0f1c 100%);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  margin-bottom: 0.85rem;
}

body.sf-stories-v2 .live_item:hover {
  background: linear-gradient(180deg, #221325 0%, #1a0f1c 100%);
}

body.sf-stories-v2 .live_title_page.create_stories,
body.sf-stories-v2 .sf-story-heading {
  text-transform: none;
  color: #f7eef8;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  gap: 0.55rem;
  align-items: center;
}

body.sf-stories-v2 .live_title_page.create_stories svg {
  fill: #e12292;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Foto / Text Umschalter */
body.sf-stories-v2 .sf-story-type-switch {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.sf-stories-v2 .sf-story-type-switch__item {
  flex: 1 1 0;
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

body.sf-stories-v2 .sf-story-type-switch__item:hover {
  color: #fff;
}

body.sf-stories-v2 .sf-story-type-switch__item.is-active {
  background: rgba(225, 34, 146, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(225, 34, 146, 0.35);
}

/* Upload-Bereich */
body.sf-stories-v2 .create_sotry_form_container.sf-story-upload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

body.sf-stories-v2 .upload_story_image.sf-story-upload__zone {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

body.sf-stories-v2 .sf-story-upload__canvas {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 168px;
  padding: 1.35rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(225, 34, 146, 0.28);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(225, 34, 146, 0.16), transparent 55%),
    linear-gradient(165deg, #26142a 0%, #150a16 55%, #1c0f1f 100%);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  animation: sfStoryCanvasIn 0.45s ease both;
}

body.sf-stories-v2 .sf-story-upload__canvas:hover {
  border-color: rgba(225, 34, 146, 0.5);
  box-shadow: 0 12px 32px rgba(225, 34, 146, 0.16);
  transform: translateY(-1px);
}

body.sf-stories-v2 .sf-story-upload__canvas:active {
  transform: translateY(0);
}

body.sf-stories-v2 .sf-story-upload__canvas input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

body.sf-stories-v2 .sf-story-upload__glow {
  position: absolute;
  inset: auto auto -20% 50%;
  width: 70%;
  height: 45%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(225, 34, 146, 0.22), transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}

body.sf-stories-v2 .sf-story-upload__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e91e8c, #c31d8e 55%, #9b1f7a);
  color: #fff;
  box-shadow: 0 8px 20px rgba(225, 34, 146, 0.32);
  animation: sfStoryIconFloat 3.2s ease-in-out infinite;
}

body.sf-stories-v2 .sf-story-upload__icon svg {
  width: 24px;
  height: 24px;
}

body.sf-stories-v2 .sf-story-upload__text {
  position: relative;
  z-index: 1;
  color: #f7eef8;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 16rem;
  line-height: 1.3;
}

body.sf-stories-v2 .sf-story-upload__hint {
  position: relative;
  z-index: 1;
  color: rgba(247, 238, 248, 0.58);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Entwuerfe */
body.sf-stories-v2 .sf-story-drafts-head .live_title_page {
  font-size: 0.98rem;
  font-weight: 650;
  color: rgba(247, 238, 248, 0.88);
}

body.sf-stories-v2 .non-shared-yet.sf-story-drafts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: 0.15rem;
}

body.sf-stories-v2 .sf-story-drafts-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.6rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #1a0f1c;
  text-align: center;
}

body.sf-stories-v2 .sf-story-drafts-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(225, 34, 146, 0.12);
  color: #e12292;
  margin-bottom: 0.25rem;
}

body.sf-stories-v2 .sf-story-drafts-empty__icon svg {
  width: 20px;
  height: 20px;
}

body.sf-stories-v2 .sf-story-drafts-empty__title {
  color: #f7eef8;
  font-weight: 650;
  font-size: 0.92rem;
}

body.sf-stories-v2 .sf-story-drafts-empty__text {
  color: rgba(247, 238, 248, 0.55);
  font-size: 0.8rem;
  max-width: 18rem;
  line-height: 1.4;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1c0f1f;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card:hover {
  transform: translateY(-2px);
  border-color: rgba(225, 34, 146, 0.35);
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .shared_storie_time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: #8a7a8d;
  font-size: 0.72rem;
  padding: 0.65rem 0.75rem 0.35rem;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .shared_storie_time svg {
  width: 13px;
  height: 13px;
  fill: #8a7a8d;
}

body.sf-stories-v2 .sf-story-draft-card__time {
  white-space: nowrap;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .uploaded_storie_image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #150a16;
  overflow: hidden;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .uploaded_storie_image img,
body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .uploaded_storie_image video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .add_a_text {
  padding: 0.55rem 0.7rem 0;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .add_my_text {
  background: #150a16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #f5f5f7;
  font-size: 0.8rem;
  padding: 0.55rem 0.65rem;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .add_my_text::placeholder {
  color: #8a7a8d;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .share_story_btn_cnt {
  margin: 0.65rem 0.7rem 0.75rem;
  width: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #e91e8c, #c31d8e);
  text-transform: none;
  font-weight: 700;
  justify-content: center;
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .share_story_btn_cnt:hover {
  background: linear-gradient(135deg, #e91e8c, #c31d8e);
  filter: brightness(1.08);
}

body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card .dmyStory {
  z-index: 2;
}

@keyframes sfStoryCanvasIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sfStoryIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 480px) {
  body.sf-stories-v2 .pageMiddle {
    padding: 0.55rem 0.7rem 5.5rem;
  }

  body.sf-stories-v2 .sf-story-upload__canvas {
    min-height: 148px;
    padding: 1.15rem 1rem;
    border-radius: 16px;
  }

  body.sf-stories-v2 .sf-story-upload__icon {
    width: 50px;
    height: 50px;
  }

  body.sf-stories-v2 .sf-story-upload__icon svg {
    width: 22px;
    height: 22px;
  }

  body.sf-stories-v2 .sf-story-upload__text {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sf-stories-v2 .sf-story-upload__canvas,
  body.sf-stories-v2 .sf-story-upload__icon,
  body.sf-stories-v2 .uploaded_storie_container.sf-story-draft-card {
    animation: none !important;
    transition: none !important;
  }
}

/* Text-Story (/createStory?t=text) */
body.sf-stories-v2 .create_sotry_form_container.sf-story-text {
  margin-bottom: 1rem;
}

body.sf-stories-v2 .create_text_story_bg_wrapper.sf-story-text__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(225, 34, 146, 0.22);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(225, 34, 146, 0.12), transparent 55%),
    linear-gradient(165deg, #26142a 0%, #150a16 55%, #1c0f1f 100%);
}

body.sf-stories-v2 .sf-story-text__label {
  width: 100%;
  color: rgba(247, 238, 248, 0.72);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.15rem;
}

body.sf-stories-v2 .sf-story-text__panel .st_bg_cont {
  margin: 0;
}

body.sf-stories-v2 .sf-story-text__panel .st_img_wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

body.sf-stories-v2 .sf-story-text__panel .st_img_wrapper:hover {
  transform: translateY(-1px);
}

body.sf-stories-v2 .sf-story-text__panel .st_img_wrapper.choosed_bg {
  border-color: #e12292;
  box-shadow: 0 0 0 2px rgba(225, 34, 146, 0.25);
}

body.sf-stories-v2 .sf-story-text__input {
  width: 100%;
  margin-top: 0.35rem !important;
}

body.sf-stories-v2 .sf-story-text__input .strt_typing {
  width: 100%;
  min-height: 96px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: #f7eef8;
  font-size: 0.95rem;
  resize: vertical;
}

body.sf-stories-v2 .sf-story-text__input .strt_typing:focus {
  outline: none;
  border-color: rgba(225, 34, 146, 0.45);
}

body.sf-stories-v2 .sf-story-text__preview {
  width: 100%;
  margin-top: 0.35rem;
}

body.sf-stories-v2 .sf-story-text__preview .choosed_image_or {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.sf-stories-v2 .sf-story-text__share {
  width: 100%;
  margin-top: 0.35rem;
}

body.sf-stories-v2 .sf-story-text__share .share_story_btn_cnt {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #e91e8c, #c31d8e);
  color: #fff;
  box-shadow: 0 8px 22px rgba(195, 29, 142, 0.28);
}