/* v5.41 — (1) Category chips get a real box on all 4 sides (older v5.35 "border:0" rule was beating v5.39),
           (2) Telegram chip: own blue + animation, different tone per theme,
           (3) slider dots: no black box on change / click. Loaded last. */

/* ---- theme colours for the boxes ---- */
html { --lm-box: #ffc233; --lm-box-bg: rgba(255,194,51,.07); --lm-box-hov: rgba(255,194,51,.18); --lm-box-glow: rgba(255,194,51,.35);
       --lm-tg: #29a9eb; --lm-tg-2: #6fd0ff; --lm-tg-bg: rgba(41,169,235,.16); --lm-tg-glow: rgba(41,169,235,.55); }
html.lm-light { --lm-box: #0fb5ab; --lm-box-bg: rgba(15,181,171,.08); --lm-box-hov: rgba(15,181,171,.18); --lm-box-glow: rgba(15,181,171,.30);
       --lm-tg: #1688d0; --lm-tg-2: #0b5fa5; --lm-tg-bg: rgba(22,136,208,.10); --lm-tg-glow: rgba(22,136,208,.45); }

/* ---- 1. category chips: border on every side ---- */
html body nav.lm-chips > a.lm-chip.lm-chip:nth-child(n),
html body nav.lm-chips > a.lm-chip.lm-chip:nth-child(n):focus {
  border: 2px solid var(--lm-box) !important;
  border-radius: 10px !important;
  background: var(--lm-box-bg) !important;
  padding: 8px 10px !important;
  min-height: 40px !important;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.45) !important;
  transition: transform .2s ease, background .2s ease, box-shadow .25s ease, border-color .2s ease, color .2s ease !important;
}
html body nav.lm-chips > a.lm-chip.lm-chip:nth-child(n):hover,
html body nav.lm-chips > a.lm-chip.lm-chip:nth-child(n):focus-visible {
  background: var(--lm-box-hov) !important;
  box-shadow: 0 0 0 3px var(--lm-box-glow) !important;
  transform: translateY(-2px) !important;
}
html body nav.lm-chips > a.lm-chip.lm-chip.is-active:nth-child(n) {
  background: var(--lm-box) !important;
  border-color: var(--lm-box) !important;
  color: #14161a !important;
}

/* ---- 2. Telegram: own blue + animation (dark = bright sky blue, mint theme = deeper blue) ---- */
html body nav.lm-chips > a.lm-chip.lm-chip-tg.lm-chip-tg:nth-child(n) {
  position: relative !important; overflow: hidden !important;
  border: 2px solid var(--lm-tg) !important;
  background: var(--lm-tg-bg) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  animation: lmTgPulse 2.2s ease-in-out infinite !important;
}
html body nav.lm-chips > a.lm-chip.lm-chip-tg.lm-chip-tg:nth-child(n):hover {
  background: var(--lm-tg-bg) !important;
  border-color: var(--lm-tg-2) !important;
  box-shadow: 0 0 0 3px var(--lm-tg-glow), 0 6px 18px -6px var(--lm-tg-glow) !important;
}
html body nav.lm-chips > a.lm-chip.lm-chip-tg.lm-chip-tg:nth-child(n)::after {
  content: "" !important; display: block !important;
  position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, var(--lm-tg-glow) 50%, transparent 80%);
  transform: translateX(-130%); animation: lmTgShine 3.2s ease-in-out infinite;
}
html body nav.lm-chips > a.lm-chip.lm-chip-tg .lm-ico { animation: lmTgIcon 2.2s ease-in-out infinite !important; display: inline-block; }
@keyframes lmTgPulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent, 0 0 10px -4px var(--lm-tg-glow); border-color: var(--lm-tg); }
  50%      { box-shadow: 0 0 0 4px var(--lm-tg-glow), 0 0 18px -2px var(--lm-tg-glow); border-color: var(--lm-tg-2); }
}
@keyframes lmTgShine { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(330%); } }
@keyframes lmTgIcon { 0%, 100% { transform: rotate(0) scale(1); } 40% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(10deg) scale(1.1); } }

/* same blue + pulse for the Telegram links in the burger drawer / header */
html body .lm-drawer-nav > a.lm-telegram, html body .lm-drawer-nav .lm-sidebar-categories a.lm-telegram {
  border: 2px solid var(--lm-tg) !important; background: var(--lm-tg-bg) !important;
  animation: lmTgPulse 2.2s ease-in-out infinite !important;
}
html body .lm-drawer-nav .lm-sidebar-categories a:not(.lm-telegram) { border: 2px solid var(--lm-box) !important; background: var(--lm-box-bg) !important; }
html body .lm-drawer-nav .lm-sidebar-categories a:not(.lm-telegram):hover,
html body .lm-drawer-nav .lm-sidebar-categories a:not(.lm-telegram).is-active { border-color: var(--lm-box) !important; background: var(--lm-box-hov) !important; }

@media (prefers-reduced-motion: reduce) {
  html body nav.lm-chips > a.lm-chip-tg, html body nav.lm-chips > a.lm-chip-tg .lm-ico,
  html body .lm-drawer-nav a.lm-telegram { animation: none !important; }
  html body nav.lm-chips > a.lm-chip-tg::after { display: none !important; }
}
html.lm-tv body nav.lm-chips > a.lm-chip-tg, html.lm-tv body nav.lm-chips > a.lm-chip-tg .lm-ico { animation: none !important; }
html.lm-tv body nav.lm-chips > a.lm-chip-tg::after { display: none !important; }

/* ---- 3. slider dots: never a black box (change, click, tap, focus) ---- */
html body .lm-featured-controls .lm-featured-dots button,
html body .lm-featured-controls .lm-featured-dots button:hover,
html body .lm-featured-controls .lm-featured-dots button:active,
html body .lm-featured-controls .lm-featured-dots button:focus {
  background: transparent !important; background-color: transparent !important;
  border: 0 !important; box-shadow: none !important; outline: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  -webkit-tap-highlight-color: transparent; transform: none !important;
  padding: 0 !important; appearance: none; -webkit-appearance: none;
}
/* keyboard users still get a small visible marker on the dot itself */
html body .lm-featured-controls .lm-featured-dots button:focus-visible::after { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

/* ---- Telegram: the blue itself is animated (flowing gradient), tone differs per theme ---- */
html { --lm-tg-a: #2aabee; --lm-tg-b: #1d7fd6; --lm-tg-c: #7fdcff; }
html.lm-light { --lm-tg-a: #0b6fb8; --lm-tg-b: #1aa0e6; --lm-tg-c: #0a4f8a; }
html body nav.lm-chips > a.lm-chip.lm-chip-tg.lm-chip-tg:nth-child(n),
html body nav.lm-chips > a.lm-chip.lm-chip-tg.lm-chip-tg:nth-child(n):hover,
html body .lm-drawer-nav > a.lm-telegram, html body .lm-drawer-nav .lm-sidebar-categories a.lm-telegram {
  background: linear-gradient(110deg, var(--lm-tg-a), var(--lm-tg-b), var(--lm-tg-c), var(--lm-tg-b), var(--lm-tg-a)) !important;
  background-size: 300% 100% !important;
  border-color: var(--lm-tg-c) !important;
  color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  animation: lmTgPulse 2.2s ease-in-out infinite, lmTgFlow 4s linear infinite !important;
}
html body nav.lm-chips > a.lm-chip.lm-chip-tg > span, html body .lm-drawer-nav a.lm-telegram { color: #fff !important; }
@keyframes lmTgFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@media (prefers-reduced-motion: reduce) {
  html body nav.lm-chips > a.lm-chip-tg, html body .lm-drawer-nav a.lm-telegram { animation: none !important; }
}
html.lm-tv body nav.lm-chips > a.lm-chip-tg { animation: none !important; }

/* ---- Search bar button: readable colours per theme ---- */
html body .lm-search-panel .lm-search button[type="submit"] {
  background: linear-gradient(135deg, #ffd76a, #ffb300) !important; color: #1a1000 !important;
  box-shadow: 0 4px 12px -4px rgba(255,179,0,.55) !important;
}
html.lm-light body .lm-search-panel .lm-search button[type="submit"] {
  background: linear-gradient(135deg, #14c9bd, #0a8f93) !important; color: #fff !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: 0 4px 12px -4px rgba(10,143,147,.6) !important;
}
html.lm-light body .lm-search-panel .lm-search { border-color: var(--lm-box) !important; }
html.lm-light body .lm-search-panel .lm-search::before { background: #0a8f93 !important; }
html.lm-light body .lm-search-panel .lm-search:focus-within {
  border-color: #0a8f93 !important;
  box-shadow: 0 0 0 4px rgba(15,181,171,.25), 0 14px 34px -12px rgba(0,0,0,.35) !important;
}
