/* ============================================================================
   VEYA — Pulse + Flow surface styles
   ============================================================================ */

/* ---- PULSE ------------------------------------------------------------ */
.pulse-search {
  margin: 0 20px 12px; padding: 10px 14px;
  background: var(--void-2); border: 1px solid var(--line);
  border-radius: 12px; display: flex; gap: 10px; align-items: center;
  flex-shrink: 0;
}
.pulse-search svg { width: 16px; height: 16px; stroke: var(--ink-q); stroke-width: 2; fill: none; flex-shrink: 0; }
.pulse-search input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--ink);
  font-family: inherit; font-size: 15px;
}
.pulse-search input::placeholder { color: var(--ink-q); }

.thread {
  display: flex; gap: 12px; padding: 12px 20px;
  align-items: center; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.thread:hover { background: rgba(255,255,255,0.02); }
.thread-main { flex: 1; min-width: 0; }
.thread-row1 { display: flex; align-items: baseline; gap: 8px; }
.thread-name { font-weight: 600; font-size: 16px; color: var(--ink); }
.thread-group-pill { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: rgba(25,210,210,0.15); color: var(--cyan); font-weight: 600; }
.thread-time { font-size: 12px; color: var(--ink-q); margin-left: auto; flex-shrink: 0; }
.thread-preview { font-size: 14px; color: var(--ink-d); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-preview.typing { color: var(--cyan); font-style: italic; }
.thread-online { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: var(--aqua); border: 2px solid var(--void); border-radius: 50%; }
.thread-unread { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); color: white; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* conversation view */
.convo { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--void); z-index: 20; transform: translateX(100%); transition: transform 0.3s ease; }
.convo.open { transform: translateX(0); }
.convo-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.convo-back { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--ink-d); }
.convo-back:hover { background: rgba(255,255,255,0.04); color: var(--ink); }
.convo-back svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.convo-info { flex: 1; min-width: 0; }
.convo-name { font-weight: 600; font-size: 17px; }
.convo-status { font-size: 13px; color: var(--ink-q); display: flex; align-items: center; gap: 5px; }
.convo-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--aqua); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.convo-actions { display: flex; gap: 4px; }
.convo-action { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--ink-d); }
.convo-action:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.convo-action svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.convo-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.convo-body::-webkit-scrollbar { display: none; }
.date-divider { text-align: center; font-size: 11px; color: var(--ink-q); letter-spacing: 0.2em; margin: 8px 0; }
.bubble { max-width: 75%; padding: 11px 15px; border-radius: 18px; font-size: 16px; line-height: 1.42; word-wrap: break-word; animation: fadeUp 0.3s ease both; }
.bubble.in { background: var(--void-2); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.out { background: var(--grad); align-self: flex-end; border-bottom-right-radius: 6px; box-shadow: 0 4px 16px rgba(25,210,210,0.2); }
.bubble-meta { font-size: 11px; color: var(--ink-q); margin-top: 2px; padding: 0 6px; }
.bubble-meta.out { align-self: flex-end; }
.typing-bubble { display: flex; gap: 4px; padding: 12px 16px; background: var(--void-2); border-radius: 18px; align-self: flex-start; }
.typing-bubble span { width: 6px; height: 6px; background: var(--ink-q); border-radius: 50%; animation: typingBounce 1.2s infinite; }
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
.composer-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--ink-d); }
.composer-btn:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.composer-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.composer-input { flex: 1; padding: 11px 16px; background: var(--void-2); border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-family: inherit; font-size: 16px; outline: 0; }
.composer-input:focus { border-color: rgba(25,210,210,0.4); }
.composer-input::placeholder { color: var(--ink-q); }
.composer-send { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: white; display: flex; align-items: center; justify-content: center; opacity: 0.5; transition: all 0.2s; }
.composer-send.active { opacity: 1; transform: scale(1.05); }
.composer-send svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; }

/* ---- FLOW ------------------------------------------------------------- */
.stories { display: flex; gap: 14px; padding: 8px 20px 16px; overflow-x: auto; flex-shrink: 0; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; cursor: pointer; }
.story-ring { width: 58px; height: 58px; border-radius: 50%; padding: 2px; position: relative; }
.story-ring.unread { background: var(--grad); animation: storyPulse 3.5s ease-in-out infinite; }
.story-ring.read { background: var(--line-2); }
.story-ring.mine { background: var(--void-2); border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: center; }
.story-ring.mine::after { content: '+'; font-size: 22px; color: var(--cyan); font-weight: 300; }
@keyframes storyPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.3); } 50% { box-shadow: 0 0 0 5px rgba(139,92,246,0); } }
.story-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--void); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.story-inner img { width: 100%; height: 100%; object-fit: cover; }
.story-name { font-size: 12px; color: var(--ink-d); max-width: 64px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); animation: fadeUp 0.5s ease-out both; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-by { font-weight: 600; font-size: 15px; }
.post-meta { font-size: 12px; color: var(--ink-q); display: flex; align-items: center; gap: 6px; }
.post-circle-pill { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: rgba(25,210,210,0.15); color: var(--cyan); font-weight: 600; }
.post-caption { font-size: 15px; line-height: 1.5; margin: 0 0 12px; color: var(--ink); }
.post-photo { border-radius: var(--r); margin: 0 0 12px; overflow: hidden; max-height: 480px; }
.post-photo img { width: 100%; height: auto; max-height: 480px; object-fit: contain; display: block; }
.post-photo.roast { aspect-ratio: 4/3; background: linear-gradient(135deg, #6B3410 0%, #C77E2C 40%, #E8A858 70%, #4A2208 100%); }
.post-photo.sea   { aspect-ratio: 4/3; background: linear-gradient(180deg, #1E4F6E 0%, #3D8FB5 35%, #E8A858 55%, #C77E2C 75%, #1A2F4A 100%); }
.post-photo.garden{ aspect-ratio: 4/3; background: linear-gradient(135deg, #2D5F3F 0%, #4A8C5F 40%, #8FB87C 70%, #6B5C8B 90%); }
.post-actions { display: flex; gap: 16px; align-items: center; }
.post-action { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--void-2); color: var(--ink-d); font-size: 13px; font-weight: 600; transition: all 0.2s; }
.post-action:hover { background: var(--void-3); color: var(--ink); }
.post-action.active { background: rgba(244,90,110,0.12); color: var(--rose); }
.post-action svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.post-action.active svg { fill: currentColor; }
.heart-pop { animation: heartPop 0.4s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

.fab {
  position: absolute; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); color: white; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(139,92,246,0.35); z-index: 10; transition: transform 0.2s;
  animation: fabBreathe 4s ease-in-out infinite;
}
.fab:hover { transform: translateY(-2px); }
.fab svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
@keyframes fabBreathe {
  0%,100% { box-shadow: 0 8px 28px rgba(139,92,246,0.35); }
  50%     { box-shadow: 0 12px 36px rgba(25,210,210,0.45); }
}
