/* ============================================================
   HAVEN — Vietnam Stories CSS
   ============================================================ */

/* STORIES HERO OVERRIDE */
.stories-hero { text-align: center; }
.stories-hero h1 { font-size: clamp(48px,7vw,80px) !important; }

/* MOMENTS TICKER */
.moments-ticker {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
}
.ticker-inner { display: flex; align-items: center; gap: 20px; }
.ticker-label {
  flex-shrink: 0; padding: 6px 16px;
  background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.3);
  border-radius: 50px; font-size: 12px; font-weight: 700; color: var(--coral);
  margin-left: 24px;
}
.ticker-scroll {
  display: flex; gap: 32px; white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
}
.ticker-item { font-size: 14px; color: var(--text-2); font-weight: 500; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.moments-ticker:hover .ticker-scroll { animation-play-state: paused; }

/* FILTER BAR */
.filter-bar { padding: 28px 0; position: sticky; top: 60px; background: var(--bg-dark); z-index: 50; border-bottom: 1px solid var(--border); }
.filter-row { display: flex; flex-direction: column; gap: 12px; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; color: var(--text-2); font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  background: rgba(79,142,247,0.12); border-color: rgba(79,142,247,0.4); color: var(--accent);
}
.filter-chip.small { font-size: 12px; padding: 6px 12px; }
.filter-meta { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.filter-sep { opacity: 0.3; }

/* STORIES MASONRY WALL */
.stories-wall-section { padding: 48px 0 80px; }
.stories-masonry {
  columns: 3; column-gap: 20px;
}

/* STORY CARD */
.story-card {
  break-inside: avoid; margin-bottom: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); cursor: pointer;
}
.story-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.story-visual {
  height: var(--visual-height, 200px); position: relative; overflow: hidden;
}
.story-gradient {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 64px; transition: transform 0.4s ease;
}
.story-card:hover .story-gradient { transform: scale(1.05); }

.story-content { padding: 24px; }
.story-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.story-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.story-author-info { flex: 1; }
.story-author-name { font-size: 14px; font-weight: 700; }
.story-author-from { font-size: 11px; color: var(--text-3); }

.story-city-tag {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 600; background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2); color: var(--accent); margin-bottom: 10px;
}
.story-headline {
  font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 10px;
}
.story-body { font-size: 14px; color: var(--text-2); line-height: 1.65; margin-bottom: 16px; }
.story-tip {
  padding: 12px 16px; background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.15); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-2); margin-bottom: 16px;
}
.story-tip strong { color: var(--gold); }

.story-actions { display: flex; align-items: center; gap: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.story-action {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-3); background: none; border: none; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-weight: 500; transition: color 0.2s;
  padding: 4px 8px; border-radius: 6px;
}
.story-action:hover { color: var(--text-1); background: var(--surface); }
.story-action.liked { color: #ef4444; }
.story-action-spacer { flex: 1; }
.story-time { font-size: 11px; color: var(--text-3); }

/* FEATURED STORY */
.story-card.featured-story { border-color: rgba(245,158,11,0.3); }
.story-card.featured-story .story-visual { --visual-height: 260px; }
.story-featured-label {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px;
  background: rgba(245,158,11,0.9); border-radius: 50px;
  font-size: 11px; font-weight: 700; color: white; z-index: 2;
}

/* LOAD MORE */
.load-more { text-align: center; margin-top: 32px; }

/* SHARE PROMPT */
.share-prompt-section { padding: 80px 0; }
.share-prompt-card {
  background: linear-gradient(135deg, rgba(79,142,247,0.08), rgba(124,58,237,0.06));
  border: 1px solid rgba(79,142,247,0.2); border-radius: var(--radius-xl);
  padding: 60px 40px; text-align: center; position: relative; overflow: hidden;
}
.sp-emoji { font-size: 56px; margin-bottom: 20px; }
.share-prompt-card h2 { font-size: clamp(28px,4vw,42px); font-weight: 700; margin-bottom: 16px; line-height: 1.2; }
.share-prompt-card p { color: var(--text-2); font-size: 16px; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.sp-stats { display: flex; gap: 28px; justify-content: center; margin-top: 24px; font-size: 14px; color: var(--text-2); flex-wrap: wrap; }
.sp-stats strong { color: var(--text-1); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(12px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl); max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0; position: sticky; top: 0;
  background: var(--bg-card); z-index: 1;
}
.modal-header h2 { font-size: 20px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-2); font-size: 16px; cursor: pointer; transition: var(--transition);
}
.modal-close:hover { background: var(--surface-hover); color: var(--text-1); }
.modal-body { padding: 24px 28px 28px; }
.modal-actions { margin-top: 8px; }
.modal-note { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 10px; }

.story-textarea { resize: vertical; min-height: 80px; }

.emoji-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-btn {
  width: 42px; height: 42px; font-size: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.emoji-btn:hover, .emoji-btn.active {
  background: rgba(79,142,247,0.12); border-color: var(--accent);
  transform: scale(1.1);
}

/* SHARE MODAL */
.share-modal-card { max-width: 480px; }
.share-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px; text-align: center;
}
.share-preview-emoji { font-size: 40px; margin-bottom: 8px; }
.share-preview-headline { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.share-preview-city { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.share-preview-author { font-size: 12px; color: var(--text-3); }
.share-btn-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.share-btn-social {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-2);
  font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.share-btn-social span { font-size: 20px; }
.share-btn-social:hover { background: var(--surface-hover); border-color: var(--border-hover); color: var(--text-1); }
.share-btn-social.fb:hover { border-color: #1877f2; color: #1877f2; }
.share-btn-social.tw:hover { border-color: #1da1f2; color: #1da1f2; }
.share-btn-social.ig:hover { border-color: #e4405f; color: #e4405f; }
.share-btn-social.zl:hover { border-color: #0068ff; color: #0068ff; }
.share-btn-social.tt:hover { border-color: #ff0050; color: #ff0050; }

/* RESPONSIVE */

/* CRUD: Owner actions (edit/delete) */
.story-owner-actions { display: flex; gap: 4px; margin-left: auto; }
.story-owner-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; transition: var(--transition);
}
.story-owner-btn:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.story-owner-btn.delete:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); }

/* Confirm dialog */
.confirm-dialog {
  background: var(--bg-card); border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg); padding: 32px; max-width: 400px; width: 100%; text-align: center;
}
.confirm-dialog h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.confirm-dialog p { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-overlay { z-index: 3000; }

/* Loading state */
.loading-state {
  text-align: center; padding: 60px 20px; font-size: 16px;
  color: var(--text-3); font-weight: 500;
}
@media (max-width: 900px) {
  .stories-masonry { columns: 2; }
  .share-btn-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 600px) {
  .stories-masonry { columns: 1; }
  .share-btn-grid { grid-template-columns: repeat(2,1fr); }
  .filter-bar { position: static; }
}
