/* Badge row: Telegram + theme + language */
.c-header__badges-desctop,
.c-aside__badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.c-header__badges-desctop > a,
.c-header__badges-desctop > button,
.c-header__badges-desctop > span,
.c-aside__badges > a,
.c-aside__badges > button,
.c-aside__badges > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  min-width: 35px;
  min-height: 35px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  line-height: 0;
}

.c-header__badges-desctop__theme,
.c-aside__badges__theme {
  border: 1px solid #dde3e9;
  background: #fff;
  color: #555964;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.c-header__badges-desctop__theme:hover,
.c-aside__badges__theme:hover {
  opacity: 0.75;
}

.c-header__badges-desctop__language,
.c-aside__badges__language {
  border: 1px solid #dde3e9;
  background: #fff;
}

.c-header__badges-desctop__theme svg,
.c-aside__badges__theme svg {
  width: 18px;
  height: 18px;
  display: block;
}

.c-header__badges-desctop__language-icon,
.c-aside__badges__language-icon {
  display: block;
  width: 20px;
  height: 15px;
  border-radius: 4px;
  overflow: hidden;
}

.c-header__badges-desctop__telegram svg,
.c-aside__badges__telegram svg {
  width: 18px;
  height: 16px;
}

/* --- Dark theme base (palette synced with site-skin / zerkalo) --- */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background-color: #050a12;
  color: #e8eef7;
}

html[data-theme="dark"] .c-aside,
html[data-theme="dark"] .c-text-container,
html[data-theme="dark"] .c-footer__info,
html[data-theme="dark"] .c-header__burger,
html[data-theme="dark"] .c-table-of-content__wrapper,
html[data-theme="dark"] .c-faq__item,
html[data-theme="dark"] .c-comment,
html[data-theme="dark"] .c-live-card {
  background-color: #0f1c30;
  color: #e8eef7;
}

html[data-theme="dark"] .c-footer {
  background-color: #0a1422;
}

html[data-theme="dark"] .c-header__nav-desctop a,
html[data-theme="dark"] .c-text a:not([class]),
html[data-theme="dark"] .c-table-of-content a {
  color: #93a4bc;
}

html[data-theme="dark"] .c-header__badges-desctop__theme,
html[data-theme="dark"] .c-aside__badges__theme,
html[data-theme="dark"] .c-header__badges-desctop__language,
html[data-theme="dark"] .c-aside__badges__language {
  background: #0f1c30;
  border-color: rgba(148, 180, 220, 0.22);
  color: #e8eef7;
}

html[data-theme="dark"] .c-header__title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: #ffffff;
}

html[data-theme="dark"] .c-header__card {
  filter: brightness(0.95);
}

html[data-theme="dark"] table,
html[data-theme="dark"] .c-table__wrapper {
  color: #e8eef7;
}

html[data-theme="dark"] .c-mobile-cta {
  background: rgba(5, 10, 18, 0.94);
  border-top-color: rgba(148, 180, 220, 0.14);
}

/* Mobile-friendly overrides (html root is 62.5% in app.min.css) */
@media (max-width: 768px) {
  html[data-theme="dark"] .c-header__badges-desctop > a,
  html[data-theme="dark"] .c-header__badges-desctop > button,
  html[data-theme="dark"] .c-aside__badges > a,
  html[data-theme="dark"] .c-aside__badges > button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  html[data-theme="dark"] .c-aside__nav__support {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 1.6rem;
  }
}
