/* Сегмент переключения темы */
.ac-theme-wrap {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--line, rgba(120, 160, 255, 0.18));
  background: rgba(0, 0, 0, 0.2);
  gap: 2px;
  flex-shrink: 0;
}

html[data-theme="light"] .ac-theme-wrap {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line, rgba(30, 64, 120, 0.16));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ac-theme-wrap--topbar {
  margin-right: 2px;
}

.ac-theme-wrap--corner {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 200;
  margin: 0;
}

@media (max-width: 480px) {
  .ac-theme-wrap--corner {
    right: 12px;
    top: 12px;
  }
}

.ac-theme-wrap--nav {
  margin-right: 6px;
}

.ac-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #8b95a8);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ac-theme-btn:hover {
  color: var(--text, #e8ecf4);
  background: rgba(58, 134, 255, 0.12);
}

html[data-theme="light"] .ac-theme-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text);
}

.ac-theme-btn.is-active {
  color: var(--text, #e8ecf4);
  background: rgba(58, 134, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(46, 197, 255, 0.25);
}

html[data-theme="light"] .ac-theme-btn.is-active {
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.28);
  color: var(--text);
}

.ac-theme-ico {
  width: 16px;
  height: 16px;
  display: block;
}

html[data-theme="light"] #ac-toast-root .ac-toast,
html[data-theme="light"] #ac-toast-root .ac-toast__body {
  color: #0f172a !important;
}

html[data-theme="light"] #ac-toast-root .ac-toast__close {
  color: #64748b !important;
}

html[data-theme="light"] #ac-toast-root .ac-toast__close:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.08) !important;
}
