/* Profile Styles */
.profile-page {
  width: 100%;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  background: #eee;
  flex-shrink: 0;
}

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

.profile-name {
  margin: 0 0 8px;
  font-size: 24px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-weight: bold;
  font-size: 16px;
}

.stat-label {
  color: #666;
  font-size: 14px;
}

.profile-bio {
  margin: 0 0 16px;
  color: #555;
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-edit,
.btn-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Main Tabs */
.general-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab.active {
  color: #000;
  border-bottom-color: #000;
}

/* Sub Tabs */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.sub-tab {
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.sub-tab.active {
  color: #000;
  border-bottom-color: #000;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.sub-tab-panel {
  display: none;
}

.sub-tab-panel.active {
  display: block;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .profile-header {
    gap: 16px;
  }

  .profile-avatar {
    width: 90px;
    height: 90px;
  }

  .profile-name {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .profile-stats {
    gap: 12px;
    margin-bottom: 10px;
  }

  .stat-number {
    font-size: 14px;
  }

  .stat-label {
    font-size: 12px;
  }

  .profile-bio {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .tab {
    padding: 10px 12px;
    font-size: 15px;
  }

  .general-tabs {
    gap: 4px;
  }

  .sub-tab {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* overrides for the grid modules to make titles smaller */
.profile-content .grid-section-header h2 {
  font-size: 1rem;
}

/* new styles for profile */
/**************************/
.profile-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-topline .profile-name {
  margin-bottom: 8px;
}

.profile-topline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.profile-socials {
  display: flex;
  gap: 6px;
}

.profile-socials .si {
  width: 38px;
  height: 38px;
  color: #334155;
}

.profile-socials .si svg {
  width: 17px;
  height: 17px;
}

.profile-more-wrap {
  position: relative;
}

.profile-more-btn.si {
  width: 38px;
  height: 38px;
  color: #334155;
  cursor: pointer;
  font: inherit;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.profile-more-btn.si:hover {
  background: #f3f4f6;
}

.profile-more-btn.si svg {
  width: 17px;
  height: 17px;
}

.profile-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(12, 18, 34, 0.12);
  z-index: 100;
}

.profile-more-menu.active {
  display: block;
}

.profile-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: #374151;
  background: none;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.profile-more-item:hover {
  background: #f3f4f6;
}

.profile-more-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* kebab "Links" section — mobile only (desktop has inline socials) */
.profile-more-links {
  display: none;
}

.profile-more-divider {
  height: 1px;
  margin: 6px 4px;
  background: rgba(12, 18, 34, 0.08);
}

.profile-more-label {
  display: block;
  padding: 4px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9ca3af;
}

/* action buttons: shared sizing */
.profile-actions .btn {
  padding: 8px 16px;
  font-size: 14px;
  gap: 5px;
}

@media (max-width: 768px) {
  .profile-topline {
    gap: 8px;
  }

  .profile-socials .si,
  .profile-more-btn.si {
    width: 34px;
    height: 34px;
  }

  .profile-socials .si svg,
  .profile-more-btn.si svg {
    width: 15px;
    height: 15px;
  }

  .profile-more-btn.si {
    border: none;
    background: none;
    width: auto;
  }

  /* hide top-right inline socials on mobile — kebab handles them */
  .profile-topline-actions .profile-socials {
    display: none;
  }

  /* socials now live in the kebab Links section on mobile */
  .profile-more-links {
    display: block;
  }

  /* action row is just buttons — no negative margin, works for any profile */
  .profile-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.profile-identity {
  min-width: 0;
}

.profile-topline .profile-name {
  margin-bottom: 2px;
}

.profile-handle {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.profile-bio {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .profile-bio {
    -webkit-line-clamp: 2;
  }
}
