/* ========================================
   Sirr - Shared Component Styles
   ======================================== */

/* --- Search Bar --- */
.search-bar {
  margin: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 14px;
  transition: border-color 0.3s;
}

.search-bar:focus-within {
  border-color: var(--primary);
}

.search-bar i,
.search-bar .search-icon {
  color: var(--muted);
  font-size: 16px;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
}

.search-bar input::placeholder {
  color: var(--muted);
}

/* --- Section Title --- */
.section-title {
  font-size: 16px;
  font-weight: 800;
  padding: 12px 16px 8px;
  color: var(--text);
}

.section-title .see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  float: left;
}

/* --- People Scroll --- */
.people-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 8px 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.people-scroll::-webkit-scrollbar {
  display: none;
}

/* --- Person Card --- */
.person-card {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.person-card:active {
  transform: scale(0.97);
}

.person-card .person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.person-card .person-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.person-card .person-username {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* --- Follow Button --- */
.follow-btn {
  width: 100%;
  padding: 8px 0;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: var(--font);
}

.follow-btn:active {
  transform: scale(0.96);
}

.follow-btn.following {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.follow-btn.following:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 260px;
}

/* --- Floating Action Button --- */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 20px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
  z-index: 90;
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
}

.fab:active {
  transform: scale(0.9);
}

/* --- User List Item --- */
.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.2s;
}

.user-list-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.user-list-item .user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-list-item .user-info {
  flex: 1;
  min-width: 0;
}

.user-list-item .user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-list-item .user-handle {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-list-item .user-bio {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-list-item .user-action {
  flex-shrink: 0;
}

.user-list-item .user-action .follow-btn {
  width: auto;
  padding: 8px 20px;
}

/* --- Loading Spinner --- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
}

.badge-accent {
  background: rgba(232, 67, 147, 0.15);
  color: var(--accent);
}

.badge-success {
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
}

.badge-muted {
  background: rgba(136, 136, 136, 0.15);
  color: var(--muted);
}

/* --- Card Base --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* --- Post Card --- */
.post-card {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.post-card .post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-card .post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-card .post-user-info {
  flex: 1;
  min-width: 0;
}

.post-card .post-name {
  font-size: 14px;
  font-weight: 700;
}

.post-card .post-handle {
  font-size: 12px;
  color: var(--muted);
}

.post-card .post-time {
  font-size: 12px;
  color: var(--muted);
}

.post-card .post-content {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.post-card .post-media {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-card .post-media img,
.post-card .post-media video {
  width: 100%;
  display: block;
}

.post-card .post-actions {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 8px;
}

.post-card .post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 6px;
}

.post-card .post-action:active {
  color: var(--primary);
}

.post-card .post-action.liked {
  color: var(--accent);
}

/* --- Story Circles --- */
.stories-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 12px 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
}

.story-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.story-ring.seen {
  background: var(--border);
}

.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
}

.story-name {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* --- Notification Item --- */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.notif-item.unread {
  background: rgba(108, 92, 231, 0.05);
}

.notif-item .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notif-item .notif-body {
  flex: 1;
  min-width: 0;
}

.notif-item .notif-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.notif-item .notif-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* --- Chat List Item --- */
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.chat-item .chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
}

.chat-item .online-dot {
  width: 12px;
  height: 12px;
  background: #00b894;
  border-radius: 50%;
  border: 2px solid var(--bg);
  position: absolute;
  bottom: 0;
  left: 0;
}

.chat-item .chat-info {
  flex: 1;
  min-width: 0;
}

.chat-item .chat-name {
  font-size: 15px;
  font-weight: 700;
}

.chat-item .chat-last {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item .chat-meta {
  text-align: center;
  flex-shrink: 0;
}

.chat-item .chat-time {
  font-size: 11px;
  color: var(--muted);
}

.chat-item .chat-unread {
  min-width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 0 5px;
}

/* --- Settings Item --- */
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.settings-item .settings-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.settings-item .settings-info {
  flex: 1;
}

.settings-item .settings-label {
  font-size: 15px;
  font-weight: 600;
}

.settings-item .settings-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.settings-item .settings-arrow {
  color: var(--muted);
  font-size: 14px;
}
