/* Stage 4: Social, Community, Notifications, Routes, Habits, Reflections */

/* ── Section titles ──────────────────────────────────── */
.vt-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--intvl-text-primary, #e2e8f0);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vt-section-title .vt-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--intvl-accent, #22c55e);
  color: #fff;
  font-weight: 500;
}
.vt-section-title .vt-badge-warn {
  background: var(--intvl-warn, #f59e0b);
}

/* ── Friend rows ─────────────────────────────────────── */
.vt-friend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.vt-friend-row:hover {
  background: rgba(255,255,255,0.06);
}
.vt-friend-row .vt-avatar-emoji {
  font-size: 1.5rem;
  width: 2rem;
  text-align: center;
}
.vt-friend-row .vt-nickname {
  flex: 1;
  font-weight: 500;
}
.vt-layer-tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--intvl-text-secondary, #94a3b8);
  text-transform: uppercase;
}

/* ── Social search ──────────────────────────────────── */
.vt-social-search .vt-input {
  width: 100%;
}
.vt-social-pending {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(245,158,11,0.08);
  border-radius: 0.5rem;
}

/* ── Community ──────────────────────────────────────── */
.vt-community-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.vt-group-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vt-group-card:hover {
  border-color: var(--intvl-accent, #22c55e);
  background: rgba(34,197,94,0.06);
}
.vt-group-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.vt-group-meta {
  font-size: 0.8rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin-top: 0.25rem;
}
.vt-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.vt-post-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
}
.vt-post-content {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.vt-post-image {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}
.vt-post-actions {
  display: flex;
  gap: 0.5rem;
}
.vt-post-time {
  font-size: 0.75rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin-top: 0.25rem;
}
.vt-post-create {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.vt-post-create .vt-textarea {
  flex: 1;
  min-height: 60px;
}

/* ── Notifications ──────────────────────────────────── */
.vt-bell-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--intvl-text-primary, #e2e8f0);
}
.vt-bell-btn:hover {
  opacity: 0.8;
}
.vt-notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--intvl-danger, #ef4444);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  min-width: 1rem;
  text-align: center;
}
.vt-notif-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--intvl-surface, #1e293b);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  z-index: 1000;
}
.vt-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-weight: 600;
}
.vt-notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.vt-notif-item:hover {
  background: rgba(255,255,255,0.04);
}
.vt-notif-unread {
  background: rgba(34,197,94,0.06);
}
.vt-notif-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.vt-notif-body {
  flex: 1;
  min-width: 0;
}
.vt-notif-title {
  font-weight: 500;
  font-size: 0.85rem;
}
.vt-notif-text {
  font-size: 0.8rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin-top: 0.15rem;
}

/* ── Routes ─────────────────────────────────────────── */
.vt-route-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
}
.vt-route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vt-route-name {
  font-weight: 600;
}
.vt-route-desc {
  font-size: 0.85rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin: 0.25rem 0;
}
.vt-route-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin: 0.4rem 0;
}
.vt-route-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Workout Plans ──────────────────────────────────── */
.vt-plan-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
}
.vt-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.vt-plan-name {
  font-weight: 600;
}
.vt-plan-difficulty {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.vt-plan-difficulty.beginner { background: #22c55e33; color: #22c55e; }
.vt-plan-difficulty.intermediate { background: #f59e0b33; color: #f59e0b; }
.vt-plan-difficulty.advanced { background: #ef444433; color: #ef4444; }
.vt-plan-paused {
  font-size: 0.75rem;
  color: var(--intvl-warn, #f59e0b);
}
.vt-plan-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.vt-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.vt-progress-fill {
  height: 100%;
  background: var(--intvl-accent, #22c55e);
  border-radius: 3px;
  transition: width 0.3s;
}
.vt-plan-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Habits ─────────────────────────────────────────── */
.vt-habit-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--intvl-accent, #22c55e);
  margin-bottom: 0.5rem;
}
.vt-habit-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vt-habit-emoji {
  font-size: 1.3rem;
}
.vt-habit-name {
  font-weight: 600;
  flex: 1;
}
.vt-habit-freq {
  font-size: 0.75rem;
  color: var(--intvl-text-secondary, #94a3b8);
  text-transform: uppercase;
}
.vt-habit-desc {
  font-size: 0.85rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin: 0.25rem 0;
}
.vt-habit-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--intvl-text-secondary, #94a3b8);
  margin: 0.4rem 0;
}
.vt-habit-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Reflections ────────────────────────────────────── */
.vt-mood-selector {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}
.vt-mood-selector p {
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.vt-mood-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.vt-btn-mood {
  min-width: 100px;
}
.vt-reflection-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vt-reflection-mood {
  font-size: 1.5rem;
}
.vt-reflection-date {
  font-size: 0.8rem;
  color: var(--intvl-text-secondary, #94a3b8);
}
.vt-reflection-body {
  flex: 1;
  font-size: 0.85rem;
}
.vt-reflection-xp {
  font-size: 0.75rem;
  color: var(--intvl-accent, #22c55e);
}

/* ── Common ────────────────────────────────────────── */
.vt-loading {
  text-align: center;
  padding: 2rem;
  color: var(--intvl-text-secondary, #94a3b8);
}
.vt-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--intvl-text-secondary, #94a3b8);
  font-size: 0.9rem;
}
.vt-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--intvl-text-primary, #e2e8f0);
  font-size: 0.9rem;
  box-sizing: border-box;
}
.vt-input:focus {
  outline: none;
  border-color: var(--intvl-accent, #22c55e);
}
.vt-textarea {
  resize: vertical;
  font-family: inherit;
}
.vt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--intvl-text-primary, #e2e8f0);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}
.vt-btn:hover {
  background: rgba(255,255,255,0.1);
}
.vt-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
}
.vt-btn-xs {
  padding: 0.15rem 0.35rem;
  font-size: 0.72rem;
}
.vt-btn-primary {
  background: var(--intvl-accent, #22c55e);
  color: #fff;
  border-color: transparent;
}
.vt-btn-primary:hover {
  opacity: 0.9;
}
.vt-btn-success {
  background: #22c55e33;
  color: #22c55e;
  border-color: #22c55e44;
}
.vt-btn-danger {
  background: #ef444433;
  color: #ef4444;
  border-color: #ef444444;
}
.vt-btn-warn {
  background: #f59e0b33;
  color: #f59e0b;
  border-color: #f59e0b44;
}