/* Compact View */
.profile-sidebar.collapsed {
  width: 89px;
  padding: 12px;
  overflow: visible;
  min-height: calc(100vh - 160px);
  height: auto;
  transition: all 0.3s ease;
}

/* Adjust add button position when sidebar is collapsed */
.profile-sidebar.collapsed ~ .add-glubler-circle-btn {
  right: 123px; /* 70px + 53px to the left */
}

/* Dynamic height when social list is expanded */
.profile-sidebar.collapsed.social-expanded {
  min-height: calc(100vh - 50px);
  transition: all 0.3s ease;
}

.profile-sidebar.collapsed .profile-content {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  display: none;
  pointer-events: none;
}

.profile-sidebar.collapsed .profile-compact {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.profile-content,
.profile-compact {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.profile-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  width: 100%;
  gap: 16px;
}

.profile-sidebar.collapsed .profile-avatar-container {
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 10px auto 27px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.profile-sidebar.collapsed .profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-sidebar.collapsed .avatar-stroke {
  display: none;
}

/* Toggle Arrow */
.toggle-arrow {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  margin: 0 !important;
  z-index: 101;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.3s ease;
  transform-origin: center center;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.toggle-arrow img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.profile-sidebar.collapsed .toggle-arrow {
  position: relative !important;
  left: 50% !important;
  top: 0px !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  margin: 0px 0px 5px 0px !important;
  width: 26px;
  height: 26px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 101;
}

.profile-sidebar.collapsed .toggle-arrow img {
  width: 16px;
  height: 16px;
  transform: rotateY(180deg);
}

/* Compact Social List */
.compact-social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -12px 0 16px;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 224px;
  overflow: hidden;
  align-items: center;
  width: 100%;
}

.compact-social-list.expanded {
  max-height: 640px;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-social-icon-wrapper {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 231, 37, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.compact-social-icon {
  width: 19px;
  height: 19px;
  filter: brightness(0) saturate(100%) invert(42%) sepia(10%) saturate(1647%)
    hue-rotate(15deg) brightness(92%) contrast(87%);
}

/* More Button */
.compact-more-btn {
  display: none;
  border: none;
  background: none;
  color: #90773c;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  padding: 4px 8px;
  margin: 4px auto 12px;
  text-align: center;
  width: auto;
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-more-btn.visible {
  display: block;
}

.compact-more-btn:hover {
  color: #90773c;
}

/* Compact Stats */
.compact-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.compact-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.compact-stat-icon {
  width: 19px;
  height: 19px;
  opacity: 0.7;
}

.compact-stat-value {
  font-size: 13px;
  font-weight: 500;
  color: #90773c;
}

.compact-stat-icon.followers,
.compact-stat-icon.following {
  width: 22px;
  height: 22px;
  padding: 6px;
  border-radius: 50%;
  background: #f5de24 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-48px);
  transition: all 0.3s ease;
  opacity: 1;
}

.compact-stat-icon.followers svg,
.compact-stat-icon.following svg {
  width: 16px;
  height: 16px;
  fill: #e8d33a;
}

.compact-stat-value.followers,
.compact-stat-value.following {
  transform: translateY(-48px);
  transition: all 0.3s ease;
}

/* Compact Divider */
.compact-divider {
  width: 66%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 26px 0 !important;
  transition: all 0.3s ease;
}

/* Follow Indicator */
.compact-follow-indicator {
  display: none;
}

/* Remove duplicate elements */
.profile-compact .toggle-arrow,
.collapsed-stats {
  display: none !important;
}
