/* [tf-fixes S] Левая колонка V3c (утверждено 01.12): «Пригласить людей» + чип N/M, плитки Магазин/Задания 2×52px,
   баннер «Зима 2026» во всю ширину, без отдельной карточки инвайта. Сетка 8px = отступы списка каналов (.ch margin 8px).
   Работает только при html.tflc (ставит tf-leftcol.js). Цвета — только классическая тема; в «Стекле» меняется лишь раскладка. */

/* ---- снег: убираем огрызок над заголовком (I) и старый сугроб над кнопкой — вместо него ровная SVG-шапка (II) ---- */
html.tflc .tf-drift--title,
html.tflc .tf-drift--invite { display: none !important; }

/* ---- «Пригласить людей» ---- */
html.tflc body aside.channels #inviteBtn.invite-banner {
  position: relative !important;
  z-index: 3 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: calc(100% - 16px) !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 10px 8px 8px !important;
  padding: 0 8px 0 10px !important;
  box-sizing: border-box !important;
  text-align: left !important;
}
html.tflc body aside.channels #inviteBtn.invite-banner.hidden { display: none !important; }
html.tflc #inviteBtn .tflc-lbl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
html.tflc #inviteBtn .tflc-chip {
  flex: 0 0 auto; height: 20px; padding: 0 8px; border-radius: 99px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10,36,20,.45); border: 1px solid rgba(220,240,225,.42);
  color: #fff; font-size: 12px; font-weight: 750; letter-spacing: .02em; line-height: 1; text-shadow: none;
}
html.tflc #inviteBtn .tflc-chip.hidden { display: none; }
html.tflc #inviteBtn .tflc-snow {
  position: absolute; left: 50%; bottom: 100%; width: 176px; max-width: calc(100% - 40px); height: 16px;
  transform: translateX(-50%); display: none; overflow: visible; pointer-events: none; z-index: 2;
}
html.tflc.tf-snow #inviteBtn .tflc-snow { display: block; }

/* ---- отдельной карточки инвайта нет: прогресс показывает чип ---- */
html.tflc #gxInvite { display: none !important; }

/* ---- Магазин / Задания: две равные плитки 52px ---- */
html.tflc .tflc-row { display: flex; align-items: stretch; gap: 8px; margin: 0 8px 8px; min-width: 0; }
html.tflc #inviteBtn.hidden + .tflc-row { margin-top: 10px; } /* ЛС: кнопки инвайта нет — тот же отступ от заголовка */
html.tflc .tflc-row:not(:has(> :not(.hidden))), html.tflc .tflc-row.tflc-empty { display: none; }
html.tflc body aside.channels .tflc-row > #shopBtn,
html.tflc body aside.channels .tflc-row > #gxQuestBtn {
  flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; margin: 0 !important;
  display: grid !important; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 8px; row-gap: 2px; align-content: center; align-items: center;
  min-height: 52px; padding: 8px 8px 8px 7px !important; box-sizing: border-box;
  border-radius: 12px; text-align: left; position: relative; font-size: 13px; line-height: 1.15;
}
html.tflc body aside.channels .tflc-row > #shopBtn.hidden,
html.tflc body aside.channels .tflc-row > #gxQuestBtn.hidden,
html.tflc body aside.channels .tflc-row > .hidden { display: none !important; }
html.tflc .tflc-row .tfs-sb-ico { grid-column: 1; grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #5b3fd6 60%, #3b2a8f); box-shadow: 0 2px 8px rgba(124,77,255,.35), inset 0 1px 0 rgba(255,255,255,.25); }
html.tflc .tflc-row .tfs-sb-ico svg { width: 15px; height: 15px; display: block; color: #fff; }
html.tflc .tflc-row .tfs-sb-lbl,
html.tflc .tflc-row #gxQuestBtn > span:not(.tfs-sb-ico):not(.tflc-meta) {
  grid-column: 2; grid-row: 1; flex: none; min-width: 0; font-size: 13px; font-weight: 650; letter-spacing: .1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
html.tflc .tflc-row #shopBtnBal,
html.tflc .tflc-row .tflc-meta {
  grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 4px; min-width: 0;
  margin: 0; padding: 0; border: 0; background: none; border-radius: 0;
  font-size: 11.5px; font-weight: 750; line-height: 1.15; color: #c4b5fd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.tflc .tflc-row #shopBtnBal:empty, html.tflc .tflc-row .tflc-meta:empty { display: none; }
html.tflc .tflc-row #shopBtnBal .tfs-gem { width: 12px; height: 12px; flex: 0 0 12px; }
html.tflc .tflc-row #shopBtnBal > span { overflow: hidden; text-overflow: ellipsis; }
/* значок «есть награда» у заданий — маленький счётчик в углу плитки */
html.tflc .tflc-row #gxQuestBadge { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10.5px; line-height: 16px; border-radius: 99px; }
html.tflc .tflc-row #gxQuestBadge.hidden { display: none; }

/* ---- «Зима 2026»: во всю ширину 8px-сетки, мягкое свечение без обрезки (III) ---- */
html.tflc body aside.channels #tfwBtn.tfw-btn {
  width: calc(100% - 16px); height: 44px; min-height: 44px; margin: 0 8px 8px; padding: 0 11px; box-sizing: border-box; gap: 8px;
}
html.tflc body aside.channels #tfwBtn.tfw-btn svg { width: 18px; height: 18px; }

/* ---- цвета: классическая тема ---- */
html.tflc:not([data-theme="glass"]) body aside.channels .tflc-row > #shopBtn,
html.tflc:not([data-theme="glass"]) body aside.channels .tflc-row > #gxQuestBtn {
  border: 1px solid rgba(139,92,246,.30); color: #ece8ff;
  background: linear-gradient(180deg, #2a2b36 0%, #22232d 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 10px rgba(0,0,0,.18);
  transition: border-color .15s, box-shadow .15s;
}
html.tflc:not([data-theme="glass"]) body aside.channels .tflc-row > #shopBtn:hover,
html.tflc:not([data-theme="glass"]) body aside.channels .tflc-row > #gxQuestBtn:hover {
  border-color: rgba(139,92,246,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 16px rgba(124,77,255,.16);
}
html.tflc .tflc-row > #gxQuestBtn:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
html.tflc:not([data-theme="glass"]) .tflc-row .tfs-sb-lbl,
html.tflc:not([data-theme="glass"]) .tflc-row #gxQuestBtn > span:not(.tfs-sb-ico):not(.tflc-meta) { color: #ece8ff; }
html.tflc:not([data-theme="glass"]) body aside.channels #tfwBtn.tfw-btn {
  border: 1px solid rgba(180,200,255,.28);
  background:
    linear-gradient(90deg, #16122c 0%, rgba(22,18,44,.7) 24%, rgba(22,18,44,.25) 46%, rgba(22,18,44,0) 64%),
    url("/tf-leftcol-aurora.webp?v=s1") right center / cover no-repeat,
    #16122c;
  box-shadow: inset 0 1px 0 rgba(235,245,255,.25), 0 8px 18px -6px rgba(130,125,245,.42), 0 2px 10px -2px rgba(110,120,230,.22);
}
html.tflc:not([data-theme="glass"]) body aside.channels #tfwBtn.tfw-btn:hover {
  box-shadow: inset 0 1px 0 rgba(235,245,255,.35), 0 10px 22px -6px rgba(130,125,245,.6), 0 2px 10px -2px rgba(110,120,230,.3);
}
/* стекло: плитки не «таблетки», а скруглённые прямоугольники */
html.tflc[data-theme="glass"] .tflc-row > #shopBtn, html.tflc[data-theme="glass"] .tflc-row > #gxQuestBtn { border-radius: 14px !important; }

@media (prefers-reduced-motion: reduce) { html.tflc .tflc-row > * { transition: none !important; } }
