/* =========================================================
   ELFFEY OPT: ЖИВЫЕ СТОРИС ИЗ TELEGRAM-КАНАЛА ПО ДНЯМ
   ========================================================= */
.elffey-stories-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px 6px;
}

.elffey-stories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.elffey-stories-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.elffey-stories-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  border: 1px solid #DDD6FE;
  color: #6D28D9;
  font-size: 11px;
  font-weight: 800;
}

.elffey-stories-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: efStoryPulse 1.8s infinite;
}

@keyframes efStoryPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.elffey-stories-tglink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 5px 11px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
  white-space: nowrap;
}
.elffey-stories-tglink:hover {
  background: #DBEAFE;
  transform: translateY(-1px);
}

.elffey-stories-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.elffey-stories-track::-webkit-scrollbar { display: none; }

/* Вертикальная карточка-сторис дня */
.elffey-story-card {
  position: relative;
  flex: 0 0 106px;
  height: 146px;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(135deg, #F43F5E 0%, #8B5CF6 48%, #0EA5E9 100%);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
  user-select: none;
  border: 0;
  text-align: left;
}
.elffey-story-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 26px -10px rgba(139, 92, 246, 0.45);
}
.elffey-story-card.is-seen {
  background: linear-gradient(135deg, #CBD5E1, #94A3B8);
}

.elffey-story-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 17px;
  overflow: hidden;
  background: #0F172A;
  border: 2px solid #FFFFFF;
}

.elffey-story-card-inner img,
.elffey-story-card-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 380ms ease;
}
.elffey-story-card:hover .elffey-story-card-inner img {
  transform: scale(1.07);
}

.elffey-story-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.0) 42%, rgba(15, 23, 42, 0.84) 100%);
}

.elffey-story-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.elffey-story-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  color: #FFFFFF;
  line-height: 1.15;
}
.elffey-story-day {
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.elffey-story-sub {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
}

/* Карточка-приглашение в Telegram-канал в конце ленты */
.elffey-story-card.is-tg-cta {
  background: linear-gradient(135deg, #0EA5E9, #2563EB);
}
.elffey-story-card.is-tg-cta .elffey-story-card-inner {
  background: linear-gradient(160deg, #0284C7 0%, #1D4ED8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  color: #FFFFFF;
  gap: 6px;
}

/* Полноэкранный просмотрщик сторис */
.elffey-sv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 11, 22, 0.90);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: efFadeIn 180ms ease;
}
@keyframes efFadeIn { from { opacity: 0; } to { opacity: 1; } }

.elffey-sv-stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: min(86dvh, 760px);
  border-radius: 26px;
  overflow: hidden;
  background: #0B1120;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  user-select: none;
  touch-action: pan-y;
}

@media (max-width: 640px) {
  .elffey-stories-wrap { padding: 10px 12px 4px; }
  .elffey-story-card { flex: 0 0 94px; height: 132px; border-radius: 18px; }
  .elffey-story-card-inner { border-radius: 15px; }
  .elffey-sv-backdrop { padding: 0; }
  .elffey-sv-stage { max-width: 100%; height: 100dvh; border-radius: 0; }
}

.elffey-sv-bgblur {
  position: absolute;
  inset: -18px;
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  object-fit: cover;
  filter: blur(22px) brightness(0.55) saturate(1.15);
  transform: scale(1.08);
  pointer-events: none;
  z-index: 1;
}

.elffey-sv-media {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
}

.elffey-sv-topgrad {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 2;
}
.elffey-sv-botgrad {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

.elffey-sv-header {
  position: relative;
  z-index: 4;
  padding: 12px 14px 8px;
}

.elffey-sv-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.elffey-sv-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.30);
  overflow: hidden;
}
.elffey-sv-bar-fill {
  height: 100%;
  width: 0%;
  background: #FFFFFF;
  border-radius: 99px;
}

.elffey-sv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #FFFFFF;
}
.elffey-sv-meta-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.elffey-sv-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366F1, #0EA5E9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
}
.elffey-sv-daytitle {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.elffey-sv-time {
  font-size: 11px;
  opacity: 0.82;
}
.elffey-sv-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.elffey-sv-iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.elffey-sv-iconbtn:hover { background: rgba(255, 255, 255, 0.28); }

/* Невидимые зоны тапа влево/вправо */
.elffey-sv-tapzones {
  position: absolute;
  inset: 72px 0 130px;
  display: flex;
  z-index: 3;
}
.elffey-sv-tap-prev { width: 35%; height: 100%; cursor: pointer; }
.elffey-sv-tap-next { width: 65%; height: 100%; cursor: pointer; }

/* Стрелки навигации на ПК */
.elffey-sv-nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  font-size: 22px;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, transform 150ms ease;
}
.elffey-sv-nav-arrow:hover { background: rgba(99, 102, 241, 0.85); transform: translateY(-50%) scale(1.07); }
.elffey-sv-nav-prev { left: max(14px, calc(50% - 275px)); }
.elffey-sv-nav-next { right: max(14px, calc(50% - 275px)); }
@media (max-width: 640px) { .elffey-sv-nav-arrow { display: none; } }

/* Нижняя панель с подписью, товаром и кнопками конверсии */
.elffey-sv-footer {
  position: relative;
  margin-top: auto;
  z-index: 4;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.elffey-sv-caption {
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.38;
  max-height: 82px;
  overflow-y: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  white-space: pre-line;
}
.elffey-sv-product-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 12px;
}
.elffey-sv-actions {
  display: flex;
  gap: 8px;
}
.elffey-sv-btn-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px -8px rgba(16, 185, 129, 0.7);
}
.elffey-sv-btn-tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
