/* Theme switcher. Stable block id: global.theme-control.001 */
.themeControl {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.themeControlBtn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0 !important;
  border-radius: 13px !important;
  color: var(--control-text) !important;
}
.themeControlBtn svg { width: 19px; height: 19px; pointer-events: none; }
.themeControlBtn .themeIconMoon { display: none; }
html[data-theme="dark"] .themeControlBtn .themeIconSun { display: none; }
html[data-theme="dark"] .themeControlBtn .themeIconMoon { display: block; }
.themeControlPopover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 2147483647;
  width: min(286px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--popover-border);
  border-radius: 18px;
  background: var(--popover-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}
.themeControlPopover[hidden] { display: none !important; }
.themeControlHead { padding: 7px 9px 10px; }
.themeControlHead strong { display: block; font-size: 14px; }
.themeControlHead small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.themeControlOptions { display: grid; gap: 5px; }
.themeControlOption {
  width: 100%;
  min-height: 44px;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 6px 9px !important;
  text-align: left;
  border-radius: 12px !important;
}
.themeControlOptionIcon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-secondary);
}
.themeControlOptionIcon svg { width: 17px; height: 17px; }
.themeControlOptionCopy { min-width: 0; }
.themeControlOptionCopy b { display: block; color: var(--text-primary); font-size: 13px; }
.themeControlOptionCopy small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; }
.themeControlOptionCheck { color: transparent; font-weight: 900; }
.themeControlOption[aria-checked="true"] {
  background: var(--brand-soft-2) !important;
  border-color: rgba(var(--brand-rgb), .46) !important;
}
.themeControlOption[aria-checked="true"] .themeControlOptionIcon {
  background: rgba(var(--brand-rgb), .17);
  color: var(--brand-hover);
}
.themeControlOption[aria-checked="true"] .themeControlOptionCheck { color: var(--brand-hover); }

.themeStandaloneControl {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2147483645;
}
.themeStandaloneControl .themeControlPopover { position: fixed; top: 66px; right: 14px; }

@media (max-width: 720px) {
  .topbar-actions > .themeControl { display: inline-flex !important; align-self: flex-end; }
  .themeControlPopover { position: fixed; top: 68px; right: 10px; left: 10px; width: auto; }
  .themeStandaloneControl { top: 10px; right: 10px; }
}
