/* ============================================
   Sirr - Profile Styles
   Dark Theme | RTL | Mobile-First
   ============================================ */

/* ============================================
   PROFILE COVER & AVATAR
   ============================================ */

.profile-cover {
  height: 130px;
  position: relative;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  overflow: hidden;
}

.profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-cover .cover-edit {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

[dir="rtl"] .profile-cover .cover-edit {
  left: auto;
  right: 10px;
}

.profile-pic {
  position: absolute;
  bottom: -30px;
  right: 16px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid var(--bg, #0a0a0f);
  object-fit: cover;
  z-index: 10;
}

[dir="rtl"] .profile-pic {
  right: 16px;
  left: auto;
}

.profile-pic-wrap {
  position: absolute;
  bottom: -30px;
  right: 16px;
  z-index: 10;
}

[dir="rtl"] .profile-pic-wrap {
  right: 16px;
  left: auto;
}

.profile-pic-wrap .profile-pic {
  position: relative;
  bottom: auto;
  right: auto;
}

.profile-pic-wrap .pic-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background: var(--primary, #6c5ce7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg, #0a0a0f);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

[dir="rtl"] .profile-pic-wrap .pic-edit {
  left: 0;
  right: auto;
}

/* ============================================
   PROFILE INFO
   ============================================ */

.profile-info {
  padding: 40px 16px 14px;
}

.profile-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--text, #eee);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-name .verified {
  color: var(--primary, #6c5ce7);
  font-size: 16px;
}

.profile-username {
  font-size: 14px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.profile-bio {
  font-size: 13px;
  color: #bbb;
  line-height: 1.6;
  margin-top: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.profile-bio .hashtag {
  color: var(--primary-light, #a29bfe);
  cursor: pointer;
}

.profile-bio .mention {
  color: var(--accent, #fd79a8);
  cursor: pointer;
}

.profile-bio a {
  color: var(--primary-light, #a29bfe);
  text-decoration: none;
}

.profile-bio a:hover {
  text-decoration: underline;
}

.profile-location,
.profile-link,
.profile-joined {
  font-size: 12px;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.profile-link a {
  color: var(--primary-light, #a29bfe);
  text-decoration: none;
}

.profile-link a:hover {
  text-decoration: underline;
}

/* ============================================
   PROFILE STATS
   ============================================ */

.profile-stats {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stat-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--text, #eee);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted, #888);
}

/* ============================================
   PROFILE ACTIONS
   ============================================ */

.profile-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.edit-profile-btn {
  flex: 1;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  color: var(--text, #eee);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
  font-family: inherit;
}

.edit-profile-btn:hover {
  background: var(--bg-hover, #1e1e2a);
}

.settings-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  color: var(--text, #eee);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.settings-btn:hover {
  background: var(--bg-hover, #1e1e2a);
}

/* Other user profile actions */
.follow-btn {
  flex: 1;
  background: var(--primary, #6c5ce7);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
  font-family: inherit;
}

.follow-btn:hover {
  background: var(--primary-light, #a29bfe);
}

.follow-btn.following {
  background: var(--bg-card, #12121a);
  border: 1px solid var(--primary, #6c5ce7);
  color: var(--primary-light, #a29bfe);
}

.follow-btn.following:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
  color: #e74c3c;
}

.message-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  color: var(--text, #eee);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.message-btn:hover {
  background: var(--bg-hover, #1e1e2a);
}

.block-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  color: var(--text-muted, #888);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.block-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

/* Mutual follow badge */
.mutual-badge {
  font-size: 11px;
  color: var(--primary-light, #a29bfe);
  background: rgba(108, 92, 231, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 6px;
}

/* ============================================
   PROFILE TABS
   ============================================ */

.profile-tabs {
  display: flex;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--bg-card, #12121a);
}

.profile-tab {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-align: center;
  padding: 12px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  background: none;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.profile-tab:hover {
  color: var(--text, #eee);
}

.profile-tab.active {
  color: var(--primary, #6c5ce7);
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary, #6c5ce7);
  border-radius: 2px;
}

.profile-tab .tab-icon {
  font-size: 18px;
  display: block;
  margin: 0 auto 2px;
}

/* ============================================
   POSTS GRID
   ============================================ */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.grid-item {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.grid-item img,
.grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-item .grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 0.2s ease;
}

.grid-item:hover .grid-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.grid-item .grid-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.grid-item:hover .grid-stat {
  opacity: 1;
}

.grid-item .grid-type-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[dir="rtl"] .grid-item .grid-type-icon {
  left: auto;
  right: 8px;
}

/* Empty grid state */
.posts-grid-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.posts-grid-empty .empty-icon {
  font-size: 40px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.posts-grid-empty .empty-text {
  font-size: 14px;
  color: var(--text-muted, #888);
}

/* ============================================
   MY CHANNEL CARD
   ============================================ */

.my-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card, #12121a);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  cursor: pointer;
  transition: background 0.2s ease;
}

.my-channel-card:hover {
  background: var(--bg-hover, #1e1e2a);
}

.my-channel-card .channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.my-channel-card .channel-info {
  flex: 1;
  min-width: 0;
}

.my-channel-card .channel-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #eee);
  display: flex;
  align-items: center;
  gap: 4px;
}

.my-channel-card .channel-name .verified {
  color: var(--primary, #6c5ce7);
  font-size: 13px;
}

.my-channel-card .channel-subs {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.my-channel-card .channel-arrow {
  font-size: 16px;
  color: var(--text-muted, #888);
}

/* Create channel button */
.create-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light, #a29bfe);
  cursor: pointer;
  transition: background 0.2s ease;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  width: 100%;
  font-family: inherit;
}

.create-channel-btn:hover {
  background: var(--bg-highlight, rgba(255, 255, 255, 0.06));
}

/* ============================================
   PROFILE LIST VIEW (followers/following)
   ============================================ */

.profile-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

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

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

.profile-list-item .list-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #eee);
}

.profile-list-item .list-username {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.profile-list-item .list-follow-btn {
  background: var(--primary, #6c5ce7);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.2s ease;
}

.profile-list-item .list-follow-btn:hover {
  background: var(--primary-light, #a29bfe);
}

.profile-list-item .list-follow-btn.following {
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #888);
}

/* ============================================
   PROFILE BLOCKED STATE
   ============================================ */

.profile-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.profile-blocked .blocked-icon {
  font-size: 40px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.profile-blocked .blocked-text {
  font-size: 14px;
  color: var(--text-muted, #888);
  line-height: 1.6;
}

/* Private profile state */
.profile-private {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.profile-private .private-icon {
  font-size: 40px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.profile-private .private-text {
  font-size: 14px;
  color: var(--text-muted, #888);
  line-height: 1.6;
}

.profile-private .private-subtext {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-top: 6px;
}
