/* Modex — Modern Community Sub-Strip & Header Button System (Whop Aesthetic) */

/* Modernized community sub-strip: sleek, compact, sits right under the header */
body.home-discovery .home-creator-bar.modex-community-strip,
.home-creator-bar.modex-community-strip {
  position: static !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 1260px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin: 10px auto 14px !important;
  padding: 6px 16px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 12px;
  background: rgba(18, 20, 28, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  isolation: isolate;
}

/* Left kicker & glowing indicator */
body.home-discovery .home-creator-bar.modex-community-strip > div:first-child,
.home-creator-bar.modex-community-strip .strip-kicker {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: none;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  line-height: 1.4;
  color: #94a3b8;
  text-transform: uppercase;
  justify-content: flex-start;
}

body.home-discovery .home-creator-bar.modex-community-strip > div:first-child > span:last-child,
.home-creator-bar.modex-community-strip .strip-kicker > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-discovery .home-creator-dot,
.home-creator-bar .home-creator-dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: #a78bfa;
  border-radius: 50%;
  box-shadow: 0 0 8px #a78bfa, 0 0 14px rgba(167, 139, 250, 0.4);
}

/* Right actions container */
body.home-discovery .home-creator-bar.modex-community-strip > div:last-child,
.home-creator-bar.modex-community-strip .strip-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: auto;
  min-width: 0;
  margin: 0;
  flex-shrink: 0;
}

/* Common base for professional action buttons */
body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link,
body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button,
.home-creator-bar.modex-community-strip .home-discord-link,
.home-creator-bar.modex-community-strip .home-publish-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px;
  margin: 0;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Discord button: Sleek indigo glass button */
body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link,
.home-creator-bar.modex-community-strip .home-discord-link {
  background: rgba(88, 101, 242, 0.12) !important;
  border: 1px solid rgba(88, 101, 242, 0.3) !important;
  color: #c7d2fe !important;
  gap: 7px;
}

body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link:hover,
.home-creator-bar.modex-community-strip .home-discord-link:hover {
  background: rgba(88, 101, 242, 0.24) !important;
  border-color: rgba(99, 102, 241, 0.55) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(88, 101, 242, 0.3) !important;
  transform: translateY(-1px);
}

body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link:active,
.home-creator-bar.modex-community-strip .home-discord-link:active {
  transform: translateY(0);
}

body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link > .icon:first-child {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link > .icon:last-child {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  color: #818cf8;
}

/* Publish button: Modern glowing brand purple button */
body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button,
.home-creator-bar.modex-community-strip .home-publish-button {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
  border: 1px solid rgba(196, 181, 253, 0.4) !important;
  color: #ffffff !important;
  padding: 0 16px;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button:hover,
.home-creator-bar.modex-community-strip .home-publish-button:hover {
  background: linear-gradient(135deg, #9969f8 0%, #8b5cf6 100%) !important;
  border-color: rgba(221, 214, 254, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
}

body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button:active,
.home-creator-bar.modex-community-strip .home-publish-button:active {
  transform: translateY(0);
}

body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button > .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ==========================================================================
   Header Buttons Modernization (Sleek Whop Style)
   ========================================================================== */

/* Navigation Links (Pill Style) */
.site-header #site-navigation {
  display: flex;
  align-items: center;
  gap: 6px !important;
}

.site-header #site-navigation > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px !important;
  border-radius: 8px;
  border-bottom: none !important;
  font-size: 12.5px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
}

.site-header #site-navigation > a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.site-header #site-navigation > a.active {
  color: #ffffff !important;
  font-weight: 600;
  background: rgba(167, 139, 250, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}

/* Migrate resources link in nav */
.site-header #site-navigation > a.migration-nav {
  color: #c4b5fd !important;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.2);
  padding: 5px 11px !important;
  font-weight: 600;
}

.site-header #site-navigation > a.migration-nav:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.45);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Staff shortcut (Dashboard button) */
.staff-shortcut {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  background: rgba(139, 92, 246, 0.12) !important;
  border: 1px solid rgba(167, 139, 250, 0.26) !important;
  color: #e9d5ff !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  gap: 7px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.staff-shortcut:hover {
  background: rgba(139, 92, 246, 0.24) !important;
  border-color: rgba(167, 139, 250, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.28) !important;
  transform: translateY(-1px);
}

.staff-shortcut:active {
  transform: translateY(0);
}

.staff-shortcut .icon {
  width: 14px !important;
  height: 14px !important;
}

.staff-shortcut .creator-review-count {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

/* Language picker trigger button */
.lang-picker .lang-trigger {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 11px !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.lang-picker .lang-trigger:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

/* Account dropdown trigger */
.account-dropdown summary {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px 0 4px !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  gap: 8px !important;
  transition: all 0.15s ease !important;
}

.account-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.account-dropdown summary .account-role-badge {
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
}

/* Logged-out Auth Actions */
.auth-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding-left: 14px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.auth-actions .auth-signin {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  color: #cbd5e1 !important;
  text-decoration: none !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
}

.auth-actions .auth-signin:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.auth-actions .auth-join {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 15px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
  border: 1px solid rgba(196, 181, 253, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35) !important;
  text-decoration: none !important;
  gap: 6px !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.auth-actions .auth-join:hover {
  background: linear-gradient(135deg, #9969f8 0%, #8b5cf6 100%) !important;
  border-color: rgba(221, 214, 254, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5) !important;
  transform: translateY(-1px);
}

.auth-actions .auth-join:active {
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================= */
@media (max-width: 800px) {
  body.home-discovery .home-creator-bar.modex-community-strip,
  .home-creator-bar.modex-community-strip {
    gap: 12px;
    padding: 6px 12px;
    margin: 8px auto 12px !important;
  }
  body.home-discovery .home-creator-bar.modex-community-strip > div:first-child,
  .home-creator-bar.modex-community-strip .strip-kicker {
    font-size: 9.5px;
    letter-spacing: 0.5px;
  }
  body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link,
  body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button,
  .home-creator-bar.modex-community-strip .home-discord-link,
  .home-creator-bar.modex-community-strip .home-publish-button {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 11px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  body.home-discovery .home-creator-bar.modex-community-strip,
  .home-creator-bar.modex-community-strip {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    min-height: 0 !important;
    margin: 8px 0 12px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    width: 100% !important;
  }
  body.home-discovery .home-creator-bar.modex-community-strip > div:first-child,
  .home-creator-bar.modex-community-strip .strip-kicker {
    display: flex !important;
    font-size: 9px !important;
    letter-spacing: 0.4px !important;
    gap: 7px !important;
    justify-content: flex-start !important;
  }
  body.home-discovery .home-creator-bar.modex-community-strip > div:first-child > span:last-child,
  .home-creator-bar.modex-community-strip .strip-kicker > span:last-child {
    white-space: normal !important;
  }
  body.home-discovery .home-creator-bar.modex-community-strip > div:last-child,
  .home-creator-bar.modex-community-strip .strip-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }
  body.home-discovery .home-creator-bar.modex-community-strip .home-discord-link,
  body.home-discovery .home-creator-bar.modex-community-strip .home-publish-button,
  .home-creator-bar.modex-community-strip .home-discord-link,
  .home-creator-bar.modex-community-strip .home-publish-button {
    height: 32px !important;
    min-height: 32px !important;
    width: 100% !important;
    font-size: 11px !important;
    padding: 0 8px !important;
    gap: 5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-discovery .home-creator-bar.modex-community-strip a,
  .site-header a,
  .site-header button {
    transition: none !important;
    transform: none !important;
  }
}
