/* HermesWorld SocialFeed minimal styling — host shells can override. */

.hermesworld-social-feed {
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  background: rgba(20, 20, 28, 0.85);
  color: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.hermesworld-social-feed .hsf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  gap: 12px;
}

.hermesworld-social-feed .hsf-world-picker {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 4px 6px;
}

.hermesworld-social-feed .hsf-plan-btn {
  background: rgba(122, 199, 255, 0.25);
  color: #cfe6ff;
  border: 1px solid rgba(122, 199, 255, 0.3);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.hermesworld-social-feed .hsf-plan-btn:hover {
  background: rgba(122, 199, 255, 0.35);
}

.hermesworld-social-feed .hsf-invitations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  font-size: 12px;
  color: #ffd58c;
}

.hermesworld-social-feed .hsf-invites-title {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd58c;
}

.hermesworld-social-feed .hsf-invite {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hermesworld-social-feed .hsf-invite-text {
  flex: 1;
}

.hermesworld-social-feed .hsf-invite button {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}

.hermesworld-social-feed .hsf-invite button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hermesworld-social-feed .hsf-feed {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.hermesworld-social-feed .hsf-event {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hermesworld-social-feed .hsf-event-time {
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  min-width: 64px;
}

.hermesworld-social-feed .hsf-event-subject {
  color: #ffe58a;
  font-weight: 600;
}

.hermesworld-social-feed .hsf-event-kind {
  color: rgba(255, 255, 255, 0.85);
}

.hermesworld-social-feed .hsf-event-object {
  color: #cfe6ff;
}

.hermesworld-social-feed .hsf-event-private_world_invited,
.hermesworld-social-feed .hsf-event-private_world_accepted,
.hermesworld-social-feed .hsf-event-private_world_declined {
  color: #ffd58c;
}

.hermesworld-social-feed .hsf-event-relationship_formed,
.hermesworld-social-feed .hsf-event-relationship_strengthened,
.hermesworld-social-feed .hsf-event-place_anchored {
  color: #b8f5c0;
}

/* Drawer host — distinct from legacy inline container */
.social-drawer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(360px, 92vw);
  max-height: min(60vh, 520px);
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms ease, opacity 240ms ease;
  z-index: 50;
}
.social-drawer--open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Mobile full-width */
@media (max-width: 480px) {
  .social-drawer {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: 70vh;
    border-radius: 12px 12px 0 0;
  }
}

/* Ink-drop animation on fresh rows */
@keyframes hsf-ink-drop {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.98); filter: blur(2px); }
  60%  { opacity: 1; transform: translateY(0)    scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hermesworld-social-feed .hsf-event[data-fresh="1"] {
    animation: hsf-ink-drop 420ms ease-out both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-drawer {
    transition: opacity 120ms ease;
    transform: none;
  }
  .social-drawer:not(.social-drawer--open) {
    opacity: 0;
  }
}

/* Dead zone #4: World transition journey card */
.hsf-journey-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(30, 30, 50, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: hsf-journey-in 400ms ease-out;
}
.hsf-journey-card__globe {
  font-size: 20px;
  animation: hsf-globe-spin 1.2s linear infinite;
}
.hsf-journey-card__label {
  font-size: 13px;
  color: #cfe6ff;
  font-weight: 500;
}
@keyframes hsf-globe-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes hsf-journey-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hsf-journey-card { animation: none; }
  .hsf-journey-card__globe { animation: none; }
}

/* Dead zone #3: Relationship toast */
.relationship-toast {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(25, 35, 25, 0.92);
  border: 1px solid rgba(184, 245, 192, 0.3);
  border-radius: 8px;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: #b8f5c0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  animation: hsf-ink-drop 420ms ease-out both;
}
.relationship-toast__initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(184, 245, 192, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.relationship-toast__label {
  font-weight: 500;
}
.relationship-toast__place {
  color: rgba(184, 245, 192, 0.7);
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .relationship-toast { animation: none; }
}

/* Dead zone #5: Visitor arrival toast */
.visitor-toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(207, 230, 255, 0.2);
  border-radius: 8px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: #cfe6ff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  animation: hsf-ink-drop 420ms ease-out both;
}
.visitor-toast__initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(207, 230, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.visitor-toast__text {
  font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
  .visitor-toast { animation: none; }
}

/* Dead zone #7 / drawer: pulse animation on social feed button */
@keyframes social-feed-btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.social-feed-btn--pulse {
  animation: social-feed-btn-pulse 600ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .social-feed-btn--pulse { animation: none; }
}
