/* TikTok-style profile page */

body.sg-profile-tiktok-active {
  background: #000 !important;
  --sg-profile-pink: #fe2c55;
  --sg-profile-pink-hover: #ff4d6d;
  --sg-profile-surface: #1a1a1a;
  --sg-profile-muted: #8a8a8a;
  --sg-immersive-dock-h: 78px;
}

body.sg-profile-tiktok-active[style*="background: url"] {
  background: #000 !important;
}

body.sg-profile-tiktok-active .main-wrapper {
  padding-bottom: 0 !important;
  background: #000 !important;
}

/* Chrome: hide legacy header, keep dock + sidebar */
body.sg-profile-tiktok-active .main-header {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.sg-profile-tiktok-active .main-header .ele_navbar_top,
body.sg-profile-tiktok-active .ele_toggle_sidebar,
body.sg-profile-tiktok-active .ele_sidebar,
body.sg-profile-tiktok-active .ele_sidebar_left,
body.sg-profile-tiktok-active .ele_navbar_top_side,
body.sg-profile-tiktok-active .ele_header_shadow,
body.sg-profile-tiktok-active .chat-sidebar {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-immersive-heartbeat-trackers {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: visible !important;
  border: 0 !important;
  z-index: -1 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 991px) {
  body.sg-profile-tiktok-active .ele_navbar_top_right.sg-immersive-dock {
    display: grid !important;
  }
}

@media (min-width: 992px) {
  body.sg-profile-tiktok-active .main-header .ele_navbar_top_right.sg-immersive-dock {
    display: none !important;
  }

  body.sg-profile-tiktok-active .main-wrapper {
    padding-left: 248px !important;
  }

  body.sg-profile-tiktok-active .sg-immersive-sidebar {
    display: flex !important;
  }
}

body.sg-profile-tiktok-active .container,
body.sg-profile-tiktok-active .ele_prof_cont_wide {
  max-width: 680px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.sg-profile-tiktok-active .profile-header > .container,
body.sg-profile-tiktok-active .profile-header.sg-profile-tiktok {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

body.sg-profile-tiktok-active .sg-profile-content {
  padding-bottom: calc(var(--sg-immersive-dock-h, 78px) + 12px);
  width: 100%;
}

/* Top bar */
.sg-profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
  position: relative;
  z-index: 5;
}

.sg-profile-topbar-end {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sg-profile-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.sg-profile-topbar-btn:hover,
.sg-profile-topbar-btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Header shell */
body.sg-profile-tiktok-active .profile-header.sg-profile-tiktok {
  background: #000;
  margin-bottom: 0;
  border: none;
  box-shadow: none;
}

body.sg-profile-tiktok-active .profile-header .ele_cover_sec_bg,
body.sg-profile-tiktok-active .profile-header .profile-cover-wrapper {
  display: none !important;
}

body.sg-profile-tiktok-active .profile-header .ele_content,
body.sg-profile-tiktok-active .profile-header .profile-info-cont {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 16px 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  clear: both;
  overflow: visible;
}

body.sg-profile-tiktok-active .profile-header .profile-info-cont > * {
  float: none !important;
}

body.sg-profile-tiktok-active .profile-header .container {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

/* Avatar */
body.sg-profile-tiktok-active .profile-avatar-wrapper {
  float: none !important;
  margin: 12px auto 14px !important;
  width: 106px !important;
  height: 106px !important;
  position: relative;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d8d 0%, #a855f7 40%, #3b82f6 75%, #facc15 100%);
  flex-shrink: 0;
  box-sizing: border-box;
}

body.sg-profile-tiktok-active .sg-profile-avatar-story-wrap {
  cursor: default;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid #000;
  display: block;
  position: relative;
  z-index: 1;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper .dropdown {
  position: absolute;
  bottom: 2px;
  right: 2px;
  left: auto;
  top: auto;
  z-index: 2;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper .dropdown .toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.sg-profile-tiktok-active .profile-avatar-wrapper .dropdown .toggle svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: 220px !important;
  min-width: 220px !important;
  margin: 0;
  z-index: 1060;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper .dropdown:not(.show) .dropdown-menu {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-avatar-has-story {
  background: linear-gradient(135deg, #ff2d8d 0%, #00d4ff 50%, #facc15 100%);
}

/* Name block */
body.sg-profile-tiktok-active .profile-name-wrapper {
  float: none !important;
  text-align: center;
  margin: 0 0 10px !important;
  padding: 0 16px;
  width: 100%;
  max-width: 420px;
}

body.sg-profile-tiktok-active .profile-name-wrapper h3 {
  color: #fff;
  font-size: 20px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  margin: 0 0 4px !important;
  display: block;
  width: 100%;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
}

body.sg-profile-tiktok-active .sg-profile-name-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  vertical-align: top;
}

body.sg-profile-tiktok-active .sg-profile-display-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: min(100%, 320px);
}

body.sg-profile-tiktok-active .profile-name-wrapper h3 .verified-color {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

body.sg-profile-tiktok-active .profile-name-wrapper h3 .verified-color svg {
  width: 18px;
  height: 18px;
  color: #20d5ec;
}

body.sg-profile-tiktok-active .profile-name-wrapper h3 .pro-badge {
  display: none;
}

body.sg-profile-tiktok-active .profile-name-wrapper h6 {
  display: none;
}

body.sg-profile-tiktok-active .sg-profile-username {
  color: var(--sg-profile-muted);
  font-size: 14px;
  display: block;
  margin: 0;
  line-height: 1.3;
}

body.sg-profile-tiktok-active .sg-profile-creator-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--sg-profile-surface);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

body.sg-profile-tiktok-active .sg-profile-bio {
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

body.sg-profile-tiktok-active .sg-profile-location {
  margin-top: 6px;
  color: var(--sg-profile-muted);
  font-size: 13px;
}

/* Stats */
body.sg-profile-tiktok-active .sg-profile-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 14px 0 16px;
  padding: 0 8px;
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
}

body.sg-profile-tiktok-active .sg-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  text-decoration: none !important;
  min-width: 64px;
}

body.sg-profile-tiktok-active .sg-profile-stat strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

body.sg-profile-tiktok-active .sg-profile-stat span {
  font-size: 12px;
  color: var(--sg-profile-muted);
}

body.sg-profile-tiktok-active a.sg-profile-stat:hover strong {
  color: #fff;
  opacity: 0.85;
}

/* Action buttons */
body.sg-profile-tiktok-active .sg-profile-actions {
  position: static !important;
  right: auto !important;
  top: auto !important;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin: 0 0 16px;
  padding: 0 16px;
  width: 100%;
  max-width: 420px;
}

body.sg-profile-tiktok-active .sg-profile-actions > .btn,
body.sg-profile-tiktok-active .sg-profile-actions > a.btn,
body.sg-profile-tiktok-active .sg-profile-actions > button.btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  border-radius: 6px !important;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px !important;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: none !important;
  white-space: nowrap;
}

body.sg-profile-tiktok-active .sg-profile-add-story-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-add-story-btn:hover,
body.sg-profile-tiktok-active .sg-profile-add-story-btn:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-add-story-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

body.sg-profile-tiktok-active .sg-profile-actions a.btn-secondary.btn-mat {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-actions a.btn-secondary.btn-mat:hover,
body.sg-profile-tiktok-active .sg-profile-actions a.btn-secondary.btn-mat:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-actions a.btn-secondary.btn-mat svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.sg-profile-tiktok-active .sg-profile-actions .js_follow,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-add {
  background: var(--sg-profile-pink) !important;
  color: #fff !important;
  flex: 2 1 140px;
  max-width: none;
}

body.sg-profile-tiktok-active .sg-profile-actions .js_follow:hover,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-add:hover {
  background: var(--sg-profile-pink-hover) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-actions .js_unfollow,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-remove,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-accept,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-decline,
body.sg-profile-tiktok-active .sg-profile-actions .js_friend-cancel {
  background: var(--sg-profile-surface) !important;
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-actions .btn_prof_msg {
  background: var(--sg-profile-surface) !important;
  color: #fff !important;
  flex: 2 1 140px;
  max-width: none;
}

body.sg-profile-tiktok-active .sg-profile-actions .btn_prof_msg span {
  display: inline !important;
}

body.sg-profile-tiktok-active .sg-profile-actions .btn i.fa {
  display: none;
}

body.sg-profile-tiktok-active .sg-profile-actions .dropdown {
  flex: 0 0 44px;
}

body.sg-profile-tiktok-active .sg-profile-actions .dropdown > button {
  width: 44px;
  height: 44px;
  border-radius: 4px !important;
  background: var(--sg-profile-surface) !important;
  color: #fff !important;
  border: none !important;
  padding: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-actions .dropdown-menu {
  z-index: 1060;
}

/* Social links */
body.sg-profile-tiktok-active .profile-header .valign.mx-n1 {
  justify-content: center;
  padding-bottom: 8px !important;
}

/* Tabs */
body.sg-profile-tiktok-active .sg-profile-tabs {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 0 !important;
  width: 100%;
  align-self: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.sg-profile-tiktok-active .sg-profile-tabs::-webkit-scrollbar {
  display: none;
}

body.sg-profile-tiktok-active .sg-profile-tabs ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-around;
  width: 100%;
  min-width: 100%;
  gap: 0;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
  white-space: normal;
  overflow: visible;
}

body.sg-profile-tiktok-active .sg-profile-tabs li {
  flex: 1 1 0;
  min-width: 48px;
  max-width: 80px;
  list-style: none;
  display: flex;
  justify-content: center;
}

body.sg-profile-tiktok-active .sg-profile-tab {
  color: var(--sg-profile-muted) !important;
  padding: 14px 8px 12px !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  min-width: 48px;
  width: 100%;
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

body.sg-profile-tiktok-active .sg-profile-tab::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  opacity: 0.55;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="timeline"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 4h3v16H4V4zm6.5 0H14v16h-3.5V4zm6.5 0h3v16h-3V4z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 4h3v16H4V4zm6.5 0H14v16h-3.5V4zm6.5 0h3v16h-3V4z' fill='black'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="friends"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M16 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3zm-8 0c1.66 0 3-1.34 3-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M16 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3zm-8 0c1.66 0 3-1.34 3-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z' fill='black'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="photos"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h3l1-2h6l1 2h3a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='13' r='3.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h3l1-2h6l1 2h3a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='13' r='3.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="videos"]::before,
body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="reels"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9l5 3-5 3V9z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9l5 3-5 3V9z' fill='black'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="products"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 7V6a4 4 0 1 1 8 0v1' stroke='black' stroke-width='2'/%3E%3Crect x='4' y='7' width='16' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 7V6a4 4 0 1 1 8 0v1' stroke='black' stroke-width='2'/%3E%3Crect x='4' y='7' width='16' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="pages"]::before,
body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="groups"]::before,
body.sg-profile-tiktok-active .sg-profile-tab[data-sg-tab="events"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='4' width='16' height='16' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 4v16M16 4v16M4 8h16M4 16h16' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='4' width='16' height='16' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 4v16M16 4v16M4 8h16M4 16h16' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-tab .sg-tab-label,
body.sg-profile-tiktok-active .sg-profile-tab .sg-tab-count {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-tab.active {
  color: #fff !important;
}

body.sg-profile-tiktok-active .sg-profile-tab.active::before {
  opacity: 1;
}

body.sg-profile-tiktok-active .sg-profile-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  border-radius: 2px;
  background: var(--sg-profile-pink);
}

/* Hide legacy theme tab decorations only */
body.sg-profile-tiktok-active .ele_user_profile_nav li .active:after {
  display: none !important;
}

/* Content area */
body.sg-profile-tiktok-active .sg-profile-content .row {
  margin-left: 0;
  margin-right: 0;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .leftcol,
body.sg-profile-tiktok-active .sg-profile-view-timeline .rightcol {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0;
  width: 100%;
}

/* Hide publisher + filters on profile grid (use sidebar Create Post) */
body.sg-profile-tiktok-active .sg-profile-view-timeline .publisher,
body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters,
body.sg-profile-tiktok-active .sg-profile-view-timeline .posts-staging-btn {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream {
  width: 100%;
  padding: 0;
}

body.sg-profile-tiktok-active .ele_content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff;
}

body.sg-profile-tiktok-active .ele_page_content {
  background: #000 !important;
  border: none !important;
  box-shadow: none !important;
}

body.sg-profile-tiktok-active .ele_page_hdng {
  color: #fff;
}

body.sg-profile-tiktok-active .empty_state {
  color: var(--sg-profile-muted);
}

/* Publisher compact (other profile views) */
body.sg-profile-tiktok-active .publisher {
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--sg-profile-surface) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Pinned post above grid */
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post {
  margin: 0 0 2px !important;
  border-radius: 0 !important;
  border: none !important;
  background: #111 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-actions,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-footer,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-text {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .pin-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}

/* Pinned post banner */
body.sg-profile-tiktok-active .sg-profile-view-timeline .pin-icon,
body.sg-profile-tiktok-active .sg-profile-view-timeline .post .pin-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  background: var(--sg-profile-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.3;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .pin-icon svg {
  display: none;
}

/* Timeline grid */
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul > li {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #111 !important;
  box-shadow: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-body {
  height: 100%;
  padding: 0 !important;
  position: relative;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-actions,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-footer,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-stats,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-top-alert,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pending-icon,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .boosted-icon,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-snippet,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .funding-description,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .job-description,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-funding-meta .funding-completion,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-product-container,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .poll-options,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-downloader,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-job-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-course-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-merit-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-site-link .post-media:has(.post-media-image) .post-media-meta {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-text {
  display: none !important;
}

/* Text-only posts */
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul > li:not(:has(.post-media)):not(:has(.pg_wrapper)):not(:has(video)):not(:has(.post-colored)):not(:has(.post-map)) .post-text {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: absolute;
  inset: 0;
  margin: 0 !important;
  padding: 12px;
  color: #fff !important;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  background: #161616;
  z-index: 1;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul > li:not(:has(.post-media)):not(:has(.pg_wrapper)):not(:has(video)):not(:has(.post-colored)):not(:has(.post-map)) .post-text .js_readmore {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-colored {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-colored .post-text {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-body > .mt10 {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  height: 100% !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_1o3,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_2x ~ .pg_2x,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_3x .pg_1o3,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_4x .pg_1o3 {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_1x,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_2o3,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_2o3_in,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_2x:first-child,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_3x,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_4x {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper a[style*="background-image"] {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream video.js_video-plyr,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .youtube-player {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream video.js_video-plyr {
  object-fit: cover !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media-image,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media > a,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media > div {
  display: block;
  width: 100%;
  height: 100%;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media img,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media video,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media .plyr,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media .plyr__video-wrapper,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media .image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  background-size: cover !important;
  background-position: center !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media .plyr__controls {
  display: none !important;
}

/* Profile grid: non-photo post types (blog, link, product, poll, file, etc.) */
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-site-link,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-site-link .post-media {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  height: 100% !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"] .post-site-link .post-media:not(:has(.post-media-image)) .post-media-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"] .post-site-link .post-media:not(:has(.post-media-image)) .post-media-meta {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  position: absolute;
  inset: 0;
  margin: 0 !important;
  padding: 10px 10px 26px !important;
  background: linear-gradient(165deg, #243b55 0%, #141e30 48%, #0f1419 100%);
  border: none !important;
  z-index: 1;
  overflow: hidden;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"] .post-site-link .post-media-meta .title,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"] .post-site-link .post-media-meta .title {
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 4px !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"] .post-site-link .post-media-meta .text,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"] .post-site-link .post-media-meta .text {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  max-height: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"] .post-site-link .post-media-meta .source {
  color: var(--sg-profile-cyan, #00d4ff) !important;
  font-size: 9px !important;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="product"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="poll"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="file"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="funding"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="audio"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="offer"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="job"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="course"]::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") center / 14px no-repeat;
  pointer-events: none;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="product"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="poll"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="file"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="audio"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

/* Text-only product / poll / file / audio tiles when no cover media */
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post.sg-grid-has-label .post-body::after {
  content: attr(data-grid-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  background: linear-gradient(165deg, #2d1f3d 0%, #1a1428 50%, #121018 100%);
  z-index: 1;
  pointer-events: none;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"].sg-grid-has-label .post-body::after,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"].sg-grid-has-label .post-body::after {
  content: none;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
  z-index: 2;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .alert-post.see-more,
body.sg-profile-tiktok-active .sg-profile-view-timeline .alert-info.see-more {
  display: block;
  grid-column: 1 / -1;
  background: var(--sg-profile-surface) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 6px;
  margin-top: 8px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_see-more-infinite.done,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_see-more-infinite.sg-profile-see-more-hidden {
  display: none !important;
}

/* Photos / videos grids */
body.sg-profile-tiktok-active .panel-photos ul.row,
body.sg-profile-tiktok-active .panel-photos .row.no-gutters {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin: 0 !important;
}

body.sg-profile-tiktok-active .panel-photos ul.row > li,
body.sg-profile-tiktok-active .panel-photos ul.row > div,
body.sg-profile-tiktok-active .panel-photos .row.no-gutters > div {
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.sg-profile-tiktok-active .panel-photos .pg_img_wrap,
body.sg-profile-tiktok-active .panel-photos a {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

body.sg-profile-tiktok-active .panel-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Friends / lists */
body.sg-profile-tiktok-active .ele_switch_tabs a {
  color: var(--sg-profile-muted);
}

body.sg-profile-tiktok-active .ele_switch_tabs a.active {
  color: #fff;
}

body.sg-profile-tiktok-active .badge-info {
  background: var(--sg-profile-pink) !important;
}

/* Desktop refinements */
@media (min-width: 992px) {
  body.sg-profile-tiktok-active .sg-profile-content {
    padding-bottom: 24px;
  }

  body.sg-profile-tiktok-active .sg-profile-topbar {
    padding-top: 16px;
  }

  body.sg-profile-tiktok-active .main-wrapper > .profile-header,
  body.sg-profile-tiktok-active .main-wrapper > .container.sg-profile-content {
    margin-left: auto;
    margin-right: auto;
  }
}
