/* =========================
   THEME VARIABLES
   ========================= */
:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#111111;
  --muted:#666666;
  --border:#e5e5e5;
  --accent:#00A67E;
}

html[data-theme="dark"]{
  --bg:#0d0d0d;
  --card:#1a1a1a;
  --text:#e6e6e6;
  --muted:#a0a0a0;
  --border:#2a2a2a;
}

/* =========================
   BASE
   ========================= */
body{
  background:var(--bg)!important;
  color:var(--text)!important;
  transition:background .25s,color .25s;
}
.t-rec,.t-container,.t-col{background:transparent!important;}
.t-text,.t-descr,.t-name,.t-title{color:var(--text)!important;}
.t-uptitle{color:var(--muted)!important;}
hr,.t-separator__line{border-color:var(--border)!important;}

/* =========================
   HEADER / COVER в СВЕТЛОЙ теме — белый текст
   ========================= */
html[data-theme="light"] header,
html[data-theme="light"] .t-menu__bg{background:transparent!important;}

html[data-theme="light"] header .t-menu__link-item{color:#ffffff!important;}
html[data-theme="light"] header .t-menu__link-item:hover{color:var(--accent)!important;}

html[data-theme="light"] .t-cover,
html[data-theme="light"] .t-cover .t-container,
html[data-theme="light"] .t-cover__wrapper,
html[data-theme="light"] .t-cover__carrier + .t-cover__filter,
html[data-theme="light"] .t-cover .t-title,
html[data-theme="light"] .t-cover .t-descr,
html[data-theme="light"] .t-cover .t-uptitle,
html[data-theme="light"] .t-cover .t-text,
html[data-theme="light"] .t-cover a{color:#ffffff!important;}

html[data-theme="light"] .t228,
html[data-theme="light"] .t396,
html[data-theme="light"] .t450 .t450__burger_text{color:#ffffff!important;}

/* =========================
   HEADER / MENU в ТЁМНОЙ теме
   ========================= */
html[data-theme="dark"] .t-menu__bg,
html[data-theme="dark"] header,
html[data-theme="dark"] .t450__burger_container{background:var(--card)!important;}
.t-menu__link-item{color:var(--text)!important;}
.t-menu__link-item:hover{color:var(--accent)!important;}

/* =========================
   BUTTONS
   ========================= */
.t-btn{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;}
.t-btn:hover{filter:brightness(1.08);}

/* =========================
   FORMS
   ========================= */
input,textarea,select{
  background:var(--card)!important;
  color:var(--text)!important;
  border-color:var(--border)!important;
}
.t-input:focus{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 35%, transparent)!important;
}

/* =========================
   POPUPS / SIDE MENUS
   ========================= */
html[data-theme="dark"] .t-popup,
html[data-theme="dark"] .t-popup__container,
html[data-theme="dark"] .t197__tooltip,
html[data-theme="dark"] .t450__menu{
  background:var(--card)!important;
  color:var(--text)!important;
  border-color:var(--border)!important;
}

/* =========================
   THEME TOGGLE BUTTON (исправленный, финальный)
   ========================= */
.ls-theme-toggle{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:2147483647;
  appearance:none;
  border:0;
  outline:0;
  cursor:pointer;
  user-select:none;
  border-radius:12px;
  padding:10px 14px;
  background:rgba(26,26,26,.6);
  backdrop-filter:blur(6px);
  box-shadow:0 2px 10px rgba(0,0,0,.35);

  display:inline-flex;
  align-items:center;
  justify-content:center;

  /* фиксы чтобы не расширялась */
  min-width:86px;
  box-sizing:border-box;
  white-space:nowrap;
  text-align:center;

  /* скрываем реальный текст */
  color:transparent!important;
  font-size:0 !important;
}

.ls-theme-toggle::before{
  content:"Dark";
  display:block;
  width:100%;
  text-align:center;
  color:#fff!important;
  font-size:13px; /* отображаемый размер */
  line-height:1;
}

html[data-theme="dark"] .ls-theme-toggle::before{
  content:"Light";
}

/* =========================
   LAPSTORE — фиксированные цвета
   ========================= */
:root{
  --uc-keep-bg:#0b0b0b;
  --uc-keep-text:#e8e8e8;
  --uc-keep-accent:#00AEEF;
  --lap-blue:#11A5FF;
}

.uc-keep-colors,
html[data-theme="light"] .uc-keep-colors,
html[data-theme="dark"]  .uc-keep-colors{
  background:var(--uc-keep-bg)!important;
}

.uc-keep-colors :where(.t-text,.t-descr,p,li,span){color:var(--uc-keep-text)!important;}
.uc-keep-colors :where(.t-title,.t-name,.t-uptitle,h1,h2,h3,h4,h5,a){color:var(--uc-keep-accent)!important;}
.uc-keep-colors :where(hr,.t-separator__line){border-color:color-mix(in srgb,var(--uc-keep-accent) 40%, transparent)!important;}
.uc-keep-colors a:hover{color:color-mix(in srgb,var(--uc-keep-accent) 88%, white 12%)!important;}
.uc-keep-colors .tn-atom{color:var(--uc-keep-accent)!important;}
.uc-keep-colors .tn-atom__img,
.uc-keep-colors .tn-atom__shape{filter:none!important;}
.uc-keep-colors .t-container,
.uc-keep-colors .t-col,
.uc-keep-colors .t-rec{background:transparent!important;}

.uc-whyblue{
  background:#0d0d0d!important;
}
.uc-whyblue .t-descr,
.uc-whyblue p,
.uc-whyblue li{color:#ffffff!important;}
.uc-whyblue .t-title,
.uc-whyblue .t-name,
.uc-whyblue h1,
.uc-whyblue h2,
.uc-whyblue h3,
.uc-whyblue h4,
.uc-whyblue a.t-title,
.uc-whyblue a.t-name{color:var(--lap-blue)!important;}

/* Скрыть блок "Наш блог" только на английской версии */
body[data-page-alias*="en"] #rec1407947531 {
  display: none !important;
}
