/* ==========================================
   STORIES — Faixa horizontal estilo Instagram
   ========================================== */

.stories-section {
  padding: 8px 0 4px;
}

.stories-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-strip::-webkit-scrollbar { display: none; }

/* ── Bolha ── */
.story-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  transition: transform 0.18s ease;
}

.story-ring.seen { background: var(--border-light, #444); }
.story-bubble:active .story-ring { transform: scale(0.91); }

.story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid var(--bg-card);
  overflow: hidden;
}

.story-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   STORY VIEWER
   ========================================== */

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}

.story-viewer.open { display: flex; }

/* ── Card — mobile: full screen, desktop: centrado ── */
.story-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #111;
}

/* ── Barras de progresso ── */
.story-progress {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  gap: 4px;
}

.story-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
}

.story-progress-fill.done  { width: 100%; }
.story-progress-fill.active { animation: storyProgress 5s linear forwards; }

@keyframes storyProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── Barra do topo ── */
.story-top-bar {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 420; /* acima das tap zones (z-index: 410) */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.story-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #818cf8, #c084fc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.story-country-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.story-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── Área do slide — ocupa todo o card ── */
.story-slide-area {
  position: absolute; /* ← fix: não depende de height: 100% */
  inset: 0;
}

/* ── Conteúdo do slide (renderizado pelo JS) ── */
.story-slide-content {
  position: absolute;
  inset: 0;
}

/* Fundo gradiente + emoji */
.story-gradient-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 110px;
}

/* Overlay de texto */
.story-text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 20px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  z-index: 5;
}

.story-slide-titulo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 7px;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.story-slide-texto {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* ── Tap zones — começam abaixo da top bar para não bloquear o × ── */
.story-tap-prev,
.story-tap-next {
  position: fixed;
  top: 72px; /* abaixo da top bar (~22px top + ~50px altura) */
  bottom: 0;
  width: 35%;
  z-index: 410;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }

/* ==========================================
   Desktop — card centrado
   ========================================== */

@media (min-width: 768px) {
  .story-card {
    width: 400px;
    height: min(710px, 92vh);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  }

  .story-tap-prev,
  .story-tap-next {
    width: 28%;
    max-width: 220px;
  }
}
