/* ==========================================================================
   APEX - PROFILE VIEW & EDIT MODAL STYLES
   Twitter/X Style Profile Header, Tabs, Bio, Stats, and Customizer
   ========================================================================== */

.profile-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.profile-header-sticky {
  position: sticky;
  top: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 90;
}

.profile-back-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.profile-back-btn:hover {
  background-color: var(--bg-hover);
}

.profile-header-titles {
  display: flex;
  flex-direction: column;
}

.profile-header-name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-header-posts-count {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Banner & Avatar */
.profile-banner-box {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--color-accent-light));
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-details-box {
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -65px;
  margin-bottom: 12px;
}

.profile-large-avatar {
  width: 120px !important;
  height: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  min-height: 120px !important;
  max-height: 120px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  border: 4px solid var(--bg-primary);
  background-color: var(--bg-tertiary);
  display: block;
}

.btn-edit-profile {
  background-color: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-edit-profile:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-secondary);
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.profile-full-name {
  font-size: 20px;
  font-weight: 800;
}

.profile-handle {
  font-size: 14px;
  color: var(--text-secondary);
}

.profile-bio-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
  margin-top: 10px;
  word-break: break-word;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  font-size: 14px;
}

.profile-stat-item {
  color: var(--text-secondary);
}

.profile-stat-num {
  font-weight: 800;
  color: var(--text-primary);
  margin-right: 4px;
}

/* Profile Content Tabs */
.profile-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-top: 14px;
}

.profile-tab {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.profile-tab:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.profile-tab.active {
  font-weight: 800;
  color: var(--text-primary);
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 9999px;
}
