/* assets/social-bot-channels.css */

.c-social__bots{
  padding: 0px 12px 4px;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.c-social__bots[hidden]{ display:none !important; }

.c-social__botsHead{
  display:flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  margin: 2px 2px 8px;
}

.c-social__botsTitle{
  font-weight: 650;
  font-size: 14px;
  line-height: 1.2;
  width: auto;          /* чтобы не растягивался на всю ширину */
  text-align: left;
}

.c-social__botsSub{ display:none !important; }

.c-social__botsRail{
  display:flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
}

.c-social__botsRail::-webkit-scrollbar{ height: 6px; }
.c-social__botsRail::-webkit-scrollbar-thumb{ border-radius: 8px; }

.c-social__botCard{
  flex: 0 0 160px;
  scroll-snap-align: start;

  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;

  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.c-social__botMedia{
  width: 100%;.c-social__botCard.is-skel .c-social__botText{ height: 28px; width: 100%; margin-top: 6px; }
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.05);
  position: relative;
  overflow: hidden;
}

.c-social__botMedia img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: translateZ(0);
  transition: transform .18s ease;
}

.c-social__botCard:hover .c-social__botMedia img{
  transform: scale(1.03);
}

.c-social__botMeta{
  padding: 8px 10px 10px;
  min-height: 58px;
  box-sizing: border-box;
}

.c-social__botUser{
  display:flex;
  align-items:center;
  gap: 0;
  margin-bottom: 6px;
  min-width: 0;
}

.c-social__botUser.has-avatar{
  gap: 8px;
}

.c-social__botAvatar{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0,0,0,.06);
  flex: 0 0 auto;
}

.c-social__botName{
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.c-social__botText{
  font-size: 12px;
  opacity: .86;
  line-height: 1.25;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  min-height: 30px;
}

/* Skeleton */
.c-social__botCard.is-skel{
  pointer-events:none;
}

.c-social__botCard.is-skel .c-social__botMedia{
  background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.03), rgba(0,0,0,.06));
  background-size: 200% 100%;
  animation: cSocialBotSk 1.2s ease-in-out infinite;
}

.c-social__botCard.is-skel .c-social__botAvatar,
.c-social__botCard.is-skel .c-social__botName,
.c-social__botCard.is-skel .c-social__botText{
  background: rgba(0,0,0,.06);
  border-radius: 10px;
  color: transparent;
}
.c-social__botCard.is-skel .c-social__botUser{ gap: 8px; }
.c-social__botCard.is-skel .c-social__botName{ height: 12px; width: 70%; }
.c-social__botCard.is-skel .c-social__botText{ height: 30px; min-height: 30px; width: 100%; margin-top: 0; }

@keyframes cSocialBotSk{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* Center rail only when it DOES NOT overflow */
.c-social__bots.is-centered .c-social__botsRail{
  justify-content: center;
}

/* Desktop nav arrows */
.c-social__botsNavBtn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  user-select: none;
}

.c-social__botsNavBtn span{ font-size: 22px; line-height: 1; }

.c-social__botsNavBtn--prev{ left: 6px; }
.c-social__botsNavBtn--next{ right: 6px; }

.c-social__botsNavBtn:disabled{
  opacity: .35;
  cursor: default;
}

@media (min-width: 768px){
  /* чтобы кнопки не накрывали крайние карточки */
  .c-social__botsRail{ padding-left: 46px; padding-right: 46px; }
  .c-social__bots.is-centered .c-social__botsRail{ padding-left: 2px; padding-right: 2px; }
}

/* Desktop: no mouse/trackpad horizontal scrolling — only arrow buttons */
@media (min-width: 768px) and (hover: hover) and (pointer: fine){
  .c-social__botsRail{ overflow-x: hidden; }
}

@media (max-width: 767px){
  .c-social__botsNavBtn{ display:none !important; }
}

@media (max-width: 520px){
  .c-social__botCard{ flex-basis: 150px; }
}



/* === FIX: Bot cards (Enterprise bots) readable in DARK === */
html[data-clb-theme="dark"] .c-social__botsTitle{
  color: rgba(255,255,255,.92) !important;
}

html[data-clb-theme="dark"] .c-social__botCard{
  background: #171b22 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.28) !important;
  color: rgba(255,255,255,.92) !important;
}

html[data-clb-theme="dark"] .c-social__botCard *{
  color: rgba(255,255,255,.92) !important;
}

html[data-clb-theme="dark"] .c-social__botCard .c-social__botUser,
html[data-clb-theme="dark"] .c-social__botCard .c-social__botText,
html[data-clb-theme="dark"] .c-social__botCard .c-social__botMeta{
  color: rgba(255,255,255,.72) !important;
}

html[data-clb-theme="dark"] .c-social__botCard .c-social__botMedia{
  background: rgba(255,255,255,.05) !important;
}

html[data-clb-theme="dark"] .c-social__botCard .c-social__botAvatar{
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}

html[data-clb-theme="dark"] .c-social__botsNavBtn{
  background: rgba(23,27,34,.94) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.34) !important;
  color: rgba(255,255,255,.92) !important;
}