/* ================================================================
   COMMUNE — Theme Toggle Button
   Desktop: circular icon button in nav
   Mobile:  full-width row in mob-menu overlay ONLY
   ================================================================ */

/* ── Desktop circular button ─────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gl-1);
  border: 1px solid var(--gl-bd-1);
  color: var(--tx-1);
  cursor: pointer;
  transition: all 0.2s var(--smooth);
  flex-shrink: 0;
  position: relative;
}
.theme-toggle:hover {
  background: var(--gl-2);
  color: var(--tx-0);
  border-color: var(--gl-bd-2);
  transform: scale(1.08);
}
.theme-toggle:active { transform: scale(0.94); }

/* Icon spans */
.theme-toggle .icon-dark,
.theme-toggle .icon-light {
  display: flex; align-items: center; justify-content: center; line-height: 0;
}

/* Light mode */
[data-theme="light"] .theme-toggle {
  background: rgba(255,255,255,0.65);
  border-color: rgba(0,0,0,0.12);
  color: var(--amber);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(255,255,255,0.90);
  border-color: rgba(217,119,6,0.30);
  box-shadow: 0 0 14px rgba(217,119,6,0.12);
}

/* Portal topbar variant */
.chat-top-acts .theme-toggle { width:34px; height:34px; border-radius:var(--r-sm); }

/* ── mob-theme-btn: ONLY visible inside the mobile menu overlay ──
   Hidden everywhere else at all screen sizes.
   The mob-menu itself controls visibility via display:none / display:flex
   ─────────────────────────────────────────────────────────────── */
.mob-theme-btn {
  /* Hidden by default — only shows when mob-menu.open is active */
  width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--gl-bd-0) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transform: none !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  padding: 14px 0 !important;
  color: var(--tx-0) !important;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 400;
  cursor: pointer;
  transition: color var(--t-xs);
}
.mob-theme-btn:hover {
  color: var(--iris) !important;
  background: transparent !important;
  transform: none !important;
}
/* Label text rendered next to icon via ::after */
.mob-theme-btn::after {
  content: attr(data-label);
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 400;
}
/* Larger icons inside mobile menu */
.mob-theme-btn .icon-dark svg,
.mob-theme-btn .icon-light svg { width: 22px; height: 22px; }

/* Light mode mobile */
[data-theme="light"] .mob-theme-btn {
  border-color: rgba(0,0,0,0.08) !important;
  color: var(--tx-0) !important;
}
[data-theme="light"] .mob-theme-btn:hover { color: var(--iris) !important; }

/* On desktop: hide the mob-theme-btn entirely — it lives inside mob-menu
   which is display:none anyway, but belt-and-braces safety */
@media (min-width: 769px) {
  /* mob-menu is display:none on desktop so this is moot,
     but prevents any bleed if mob-menu ever gets display:block accidentally */
  .mob-menu .mob-theme-btn { display: flex !important; }
}

/* On mobile: hide the desktop-size toggle that sits in nav-cta */
@media (max-width: 768px) {
  .nav-cta .theme-toggle:not(.mob-theme-btn) { display: none !important; }
}
