@tailwind base;
@tailwind components;
@tailwind utilities;



:root{
  --header-h: 56px;
  --gap: 24px;
  --left-w: 264px;
  --right-w: 320px;
  --center-w: 780px;
  --brd: #e5e7eb;
  --panel:#fff;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
    --toastify-icon-color-success: #28a745;
  --toastify-icon-color-error: #dc3545;
  --toastify-icon-color-white: #FFF;
}

body{
  background-color:#f4f4f4 !important;color:#191919 !important;font-family: 'Roboto', 'Figtree', sans-serif;
}
i[class^="ki-"]{ font-size:18px; line-height:1;color:#3479E5;}
.ki-16 { font-size: 16px !important; }
.ki-18 { font-size: 18px !important; }
.ki-20 { font-size: 20px !important; }
.ki-22 { font-size: 22px !important; }
.ki-24 { font-size: 24px !important; }
.ki-26 { font-size: 26px !important; }
.ki-28 { font-size: 28px !important; }
.ki-30 { font-size: 30px !important; }
.ki-32 { font-size: 32px !important; }
.fs-7 {
    font-size: .875rem !important;
}
.btn-primary{background-color:#749BF4 !important;border:0 !important;}
.btn-secondary{background-color:#f0f0f0 !important;border:0 !important;color:#000 !important;}
.dropdown-menu{
    padding: 0 !important;
}
/* общий каркас из трёх соседей */
.frame{
  display:flex;
  gap: var(--gap);
  padding:0;
  min-height: calc(100vh - var(--header-h));
}

.site-header{
  position: sticky;
  top: 0;
  background:#c9eaff;
  z-index: 1040;

  /* было height: 4.5rem; */
  min-height: 4.5rem;       /* пусть растёт при необходимости */
  height: auto;             /* снимаем фикс */
  display: flex;
  align-items: center;
  padding: .5rem 1rem;      /* чуть меньше вертикальные отступы */
  box-sizing: border-box;
}
:root { --center-width: 780px; }

.topbar{
  background: #fff6ea;              /* нежный бежевый */
  border-bottom: 1px solid #f0e3d2;  /* тонкая линия */

}

.topbar-center{
  width: 100%;
  max-width: var(--center-width);
      flex: 1 1 var(--center-w);
}

.topbar-search{
  height: 42px;
  background-color: #9dd4f6 !important;

}
@media (max-width: 767.98px) {
  .topbar-search {
    display: none !important;
  }
}

/* чуть ужимаем центр на узких экранах */
@media (max-width: 992px){
  :root { --center-width: 600px; }
}
@media (max-width: 768px){
  :root { --center-width: 100%; }
  .topbar-center{ padding-left: 8px; padding-right: 8px; }
}
/* левый сайдбар */
.left{
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  flex: 0 0 var(--left-w);
  width: var(--left-w);
  background:#f4f4f4;
  padding-left:15px;
  display: flex;
  flex-direction: column;
}
.left__scroll{
  flex: 1 1 auto;
  min-height: 0;                 /* важно для overflow в flex-контейнере */
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
  padding: 15px 0 0;
}
/* центральная область: растягивается, а внутри — контейнер фикс-ширины */
.middle{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  justify-content:center;  /* центрируем .center */
}
.center{
  flex: 0 0 var(--center-w);
  width: var(--center-w);
  max-width: 100%;
}

/* правый сайдбар — у правого края, без внешних отступов */
.right{
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  flex: 0 0 var(--right-w);
  width: var(--right-w);
  background:#f4f4f4;
  margin-right: 0;            /* критично: без зазора справа */
}

/* свёртывание: убираем колонку полностью, gap исчезает сам */
.left.is-collapsed,
.right.is-collapsed{ display:none; }

/* кнопки (пример) */
.sb-toggle{
  position: fixed; left: 20px; top:90px;
  z-index: 100; width: 36px; height: 36px; border:1px solid var(--brd);
  background:#fff; border-radius:10px; box-shadow: var(--shadow);
}
.rb-toggle{
  position: fixed; right: 15px; top:90px;
  z-index: 100; width: 36px; height: 36px; border:1px solid var(--brd);
  background:#fff; border-radius:10px; box-shadow: var(--shadow);
}

/* адаптив: на планшетах скрываем правый по умолчанию */
@media (max-width: 1024px){
  .right{ display:none; }
}

/* ====== Sidebar (внутренний дизайн) ====== */
.sb-section + .sb-section{ margin-top: 28px; }
.sb-caption{
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
  color: #9aa2b1;
  margin: 10px 12px 12px;
  text-transform: uppercase;
}

.sb-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 6px 8px;
  border-radius: 10px;
  color: #111827;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .02s;
}
.sb-item:hover{
  background: #fff;
}
.sb-item:active{
  transform: translateY(1px);
}
.sb-item.is-active{
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  border: 1px solid #e8ebf1;
}

.sb-ico{
  width: 28px; height: 28px;
  flex: 0 0 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  overflow: hidden;
}
.sb-ico img{ width:100%; height:100%; object-fit: cover; display:block; }
.sb-ico-placeholder{
  width:100%; height:100%;
  display:grid; place-items:center;
  font-weight: 800; color:#9aa2b1;
}

.sb-ico-round{
  border-radius: 50%;
  background: #fff;
}

.sb-title{
  font-size: 16px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sb-content {
    flex: 1; /* занимает всё доступное место */
}

/* футер прибит к низу сайдбара */
.sidebar__footer{
  margin-top: auto;
  padding: 16px;
}
.sidebar__footer a{
  font-size:13px;display:block; color:#6b7280; text-decoration:none; margin:6px 0;
}
.sidebar__footer a:hover{ text-decoration: underline; }

  .stack-avatars { display: flex; flex-direction: column; }
  .avatar-sq {
    width: 44px; height: 44px;
    border-radius: 12px;          /* «скруглённый квадрат» как на скрине */
    object-fit: cover;
    background: #222;
  }
  .post-hero-title {
    font-weight: 700;
    line-height: 1.2;
    /* под тёмную/светлую тему Bootstrap сам подстроится; можно усилить размер: */
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  }
  .post-hero-sub { font-size: 0.95rem; }
  .shadow-sm { box-shadow: 0 2px 6px rgba(0,0,0,.2); }

  .community-hero{
    background:#fff;        /* тёмный фон */
    color:#191919;
    border-radius:0.375rem;
    padding:0;
  }
  .community-title{
    font-weight:800;
    letter-spacing:.2px;
    font-size: 1.875rem;
    line-height: 1.4;
    color:#191919;
  }
  .community-subtitle{
    color:#000;
    font-size:clamp(16px, 2vw, 20px);
    margin:8px 0 16px;
  }
  .community-meta{
    list-style:none; padding:0;
    display:flex; gap:28px; justify-content:center; flex-wrap:wrap;
    color:#000;
  }
  .community-meta li{ display:inline-flex; align-items:center; gap:8px; }
  .community-meta .meta-ico{ font-size:18px; line-height:1; }

  .community-tabs{
    border-top:1px solid rgba(255,255,255,.08);
    background:transparent;
  }
  .community-tabs .nav-underline .nav-link{
    color:#000;
    padding:18px 0 15px;
    border-bottom:3px solid transparent;
  }
  .community-tabs .nav-underline .nav-link:hover{
    color:#000;
  }
  .community-tabs .nav-underline .nav-link.active{
    color:#000;
    border-bottom-color:#ffaf3d;  /* акцент как на скрине */
  }

  .list-group-item:first-child
 {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

@media (min-width: 1200px) {
h1.card-title
 {
  font-size: 1.875rem;
  line-height: 1.4;
}
}

.badge-online{
  background-color:#18b36b; /* мягкий зеленый */
  color:#fff;
  font-weight:600;
  font-size:12px;
  line-height:1;
  box-shadow:0 2px 6px rgba(0,0,0,.15);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pm-avatars {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

/* большой круглый аватар пользователя */
.pm-user {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.pm-user--placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: #3479E5;
}

/* маленький квадратный аватар сообщества */
.pm-comm {
  position: absolute;
  bottom: -7px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
  background: #ddd;
  border: 1px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.pm-comm--placeholder {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  background: #98a2b3;
  border: 2px solid #fff;
}

/* текст и дата */
.pm-text {
  flex: 1;
  min-width: 0;
}

.pm-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pm-title {
  font-size: .875rem;
  letter-spacing: .2px;
  line-height: 1.2;
}

.pm-title a {
  color: #303134;
  text-decoration: none;
}

.pm-title a:hover {
  text-decoration: none;
}

.pm-sub {
  margin-left: 6px;
  color: #6b7280;
  font-size:.875rem;
}

.pm-author {
  color: #4c4d4f;
  text-decoration: none;
}

.pm-author:hover {
  text-decoration: none;
}

.pm-time {
  /*color: #9aa2b1;*/
  font-size: .85rem;
  white-space: nowrap;
}

  #editorjs-view .codex-editor__redactor {
    padding-bottom: 0 !important;
  }

  .ce-block__content{
    max-width:100% !important;
  }
.reactions-block {
    display: none !important;
}
.reaction-container {
    position: relative;
    display: inline-block;
}

.reaction-popup {
    position: absolute;
    bottom: 110%;
    left: 0;
    display: flex;
    gap: 5px;
    background: #fff;
    border-radius: 20px;
    padding: 6px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 999;
}

.reaction-container:hover .reaction-popup {
    opacity: 1;
    visibility: visible;
}

.reaction-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
    padding: 0;
    transition: transform 0.2s ease;
}

.reaction-btn:hover {
    transform: scale(1.15);
}
@keyframes pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.animate-pop {
  animation: pop 0.4s ease;
}
.reaction-splash {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  width: 10px;
  height: 10px;
  background: rgba(0, 123, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: splash 0.6s ease-out forwards;
  z-index: 1000;
}

@keyframes splash {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8);
  }
}
.cursor{
  cursor: pointer;
}
.community-tabs .nav-underline .nav-link{
  font-size: .8rem;
}
.card, .card-img, .community-hero, .alert{ border-radius:.675rem !important; }
.icon-button{
  background: none;
  border: 0;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

/* ================================
   Общий контейнер списка комментов
================================ */
.c-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Один комментарий */
.comment {
  margin-bottom: 16px;
}

/* ================================
   Основной блок комментария
================================ */
.c-body {
  position: relative;
  min-height: 36px; /* чтобы уместить аватар */
}

/* Аватар */
.c-ava {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;    /* можно оставить, но скруглим и картинку */
  display: block;
  overflow: hidden;     /* ВАЖНО: чтобы точка не резалась */
}

.c-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;     /* скругляем саму картинку */
}

/* зелёная точка онлайн */
.c-ava.is-online::after {
  content: "";
  position: absolute;
  right: -1px;            /* наполовину «нависает» за край */
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #30b03d;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #FFF;
    transform: translate(calc (36px - 10px), calc(-1 * 10px + 1px));
}



/* Контент комментария (имя, время, текст, кнопки) */
.c-content {
  margin-top: 0 /* опускаем текст под аватар */
}
.c-content,
[class*="c-content"] {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Имя + время */
.c-content .pm-title {
  line-height: 1.2;
}
.comment-editor textarea,
#reply-form textarea {
  width: 100%;
  background: transparent;
}
/* ================================
   Дети комментариев (ветки)
================================ */
.c-children {
  position: relative;
  padding-left: 18px;
  border-left: 1px solid #dadada; /* вертикальная линия */
}

.c-children:hover{
  border-left: 1px solid #0b5dd7;
}

/* Локоть (горизонтальная часть линии) */
.c-elbow {
  position: absolute;
  top: 12px;   /* высота от верха блока */
  left: 0;
  width: 18px;
  height: 12px;
  border-left: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0 0 0 4px;
}

/* ================================
   Кнопки действий
================================ */
.c-actions a {
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
}
.c-actions a:hover {
  text-decoration: underline;
}

/* ================================
   Форма ответа
================================ */
.c-reply-form {
  margin-top: 8px;
}
.c-content .pm-title > .d-flex.flex-column {
    margin-left: 45px; /* можно 10px, если хочется чуть больше */
}

/* ================================
   Дети комментариев (ветки)
   (единственная версия)
================================ */
:root{
  --c-line: #e5e7eb;  /* цвет линий */
  --elbow-top: 18px;  /* отступ от верха ветки до локтя */
  --elbow-w: 14px;    /* длина локтя вправо */
}


/* где рисуем локоть — подгони под свою шапку комментария */
.c-children::before{
  top: 18px;      /* ↑ по вертикали от верхнего края .c-children */
  left: -2px;     /* совпадает с border-left */
  width: 14px;
  height: 12px;
  border-left: 2px solid var(--c-line);
  border-bottom:2px solid var(--c-line);
  border-bottom-left-radius: 6px;
}

/* вертикаль ТОЛЬКО ниже локтя (не выше) */
.c-children::after{
  content: "";
  position: absolute;
  left: -2px;
  top: calc(var(--elbow-top) + 12px); /* сразу под локтем */
  bottom: 0;                          /* до низа контента ветки */
  border-left: 1 px solid #dadada;
}

/* когда ветка скрыта — линии тоже прячем */
.c-children.d-none::before,
.c-children.d-none::after{ display: none; }

/* чтобы «палка» не выходила ниже последнего ребёнка */
.c-children .c-item:last-child .comment{ margin-bottom: 0; }

/* внутри .c-children — у последнего комментария убрать нижний отступ */
.c-children > .c-list > .comment:last-child {
  margin-bottom: 0;
}

/* если у тебя комментарий завернут в li (как сейчас) —
   подстрахуемся и уберём возможные внутренние отступы у последнего li */
.c-children > .c-list > li:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* у самого контейнера детей не должно быть нижнего padding */
.c-children {
  padding-bottom: 0;
}
/* Верхняя обложка */
.community-cover {
    height: 220px; /* фиксированная высота обложки */
    background-size: cover;
    background-position: center;
}

/* Аватар */
.community-avatar-wrapper {
    position: absolute;
    top: 130px; /* чтобы половина ушла вниз */
    left: 50%;
    transform: translateX(-50%);
}

.community-avatar {
    width: 180px;
    height: 180px;
    border: 4px solid #fff;
    object-fit: cover;
}

/* Текст */
.community-info {
    margin-top: 80px; /* чтобы текст начинался под аватаром */
}
.default-cover {
    height: 40px;
}
.rounded-top-block {
        border-top-left-radius: .675rem !important;
    border-top-right-radius: .675rem !important;
}
.card-body img {
    width: 100%;
    border-radius:.675rem;
}
.editorjs-view img { max-width: 100%; height: auto; border-radius:.675rem; display: block; }
.editorjs-view figure { margin: 1rem 0; }
.editorjs-view figcaption { color: #6c757d; font-size: .9rem; margin-top: .25rem; }
.editorjs-view blockquote { border-left: 4px solid #e5e7eb; padding: .75rem 1rem; color:#444; margin: 1rem 0; }


.post-body{--muted:#6c757d;line-height:1.6;font-size:16px}
.post-body p{}
.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{
  margin:1.25rem 0 .75rem;font-weight:600;line-height:1.25
}
.post-body h1{font-size:2rem}
.post-body h2{font-size:1.75rem}
.post-body h3{font-size:1.5rem}
.post-body h4{font-size:1.25rem}
.post-body h5{font-size:1.125rem}
.post-body h6{font-size:1rem}
.post-body ul,.post-body ol{padding-left:1.25rem;margin:0 0 1rem}
.post-body li+li{margin-top:.25rem}
.post-body a{color:#0b5dd7;text-decoration:none}
.post-body a:hover{text-decoration:underline}

/* цитаты */
.post-body blockquote{margin:0 0 1rem;padding:.75rem 1rem;border-left:4px solid #e5e7eb;background:#fafafa;border-radius:.5rem}
.post-body blockquote p{margin:0}
.post-body blockquote cite{display:block;margin-top:.5rem;color:var(--muted);font-style:normal}

/* разделитель EditorJS */
.post-body hr.edx-delimiter{border:0;height:1px;background:#eee;margin:1.25rem 0}

/* изображения */
.post-body figure{margin:0 0 1rem}
.post-body figure img{max-width:100%;height:auto;display:block;border-radius:.5rem}
.post-body figure figcaption{font-size:.875rem;color:var(--muted);margin-top:.25rem}

/* видео/встраивания (ты оборачиваешь в .ratio) */
.post-body .ratio{margin:0 0 1rem}
.post-body .ratio iframe{width:100%;height:100%;border:0}

/* inline: mark/code/u/s */
.post-body mark{background:#fff3cd;padding:.05em .25em;border-radius:.2em}
.post-body code{background:#f6f8fa;border:1px solid #eee;border-radius:.25rem;padding:.15em .35em;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}
.post-body u{text-decoration:underline}
.post-body s{text-decoration:line-through}

/* ===== чек-лист (максимально близко к EditorJS) ===== */
.post-body .cdx-checklist{margin:0 0 1rem}
.post-body .cdx-checklist__item{display:flex;align-items: flex-start;gap:.5rem;padding:.25rem 0}
.post-body .cdx-checklist__item input[type="checkbox"]{
  width:20px;height:20px;flex:0 0 20px;margin:0;border-radius:.35rem;
  border:2px solid #cbd5e1;background:#fff;cursor:default;position:relative;
  appearance:none !important;-webkit-appearance:none !important;-moz-appearance:none !important;outline:0 !important;
  box-shadow:none !important;background-clip:padding-box;margin-top: calc(.785em - 10px);
}
.post-body .cdx-checklist__item input[type="checkbox"]:checked{
  background:#369fff;border-color:#369fff;margin-top: calc(.785em - 9px);
}
.post-body .cdx-checklist__item input[type="checkbox"]:checked::after{
  content:"";position:absolute;left:1px;top:-2px;right:0;bottom:0;margin:auto;
  width:6px;height:10px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg)
}
.post-body .cdx-checklist__item span{display:inline-block}

/* таблица (если используешь Table tool) */
.post-body table{width:100%;border-collapse:collapse;margin:0 0 1rem}
.post-body td,.post-body th{border:1px solid #e5e7eb;padding:.5rem;vertical-align:top}
.post-body th{background:#fafafa;font-weight:600}

/* спойлер (совместимо с твоим форматером) */
.post-body .ejs-spoiler-block{border:1px solid #e5e7eb;border-radius:.5rem;margin:0 0 1rem;overflow:hidden}
.post-body .ejs-spoiler-head{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:#f9fafb}
.post-body .ejs-spoiler-title{font-weight:600}
.post-body .ejs-spoiler-toggle{margin-left:auto;border:0;background:#eef2ff;color:#1d4ed8;border-radius:.375rem;padding:.25rem .5rem;font-size:.875rem}
.post-body .ejs-spoiler-body{display:none;padding:.75rem}
.post-body .ejs-spoiler-block.is-open .ejs-spoiler-body{display:block}

.ce-delimiter {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  font-size: 1.25rem;
  line-height: 1;
  width: 100%;
    text-align: center;
}

.ce-delimiter:before {
    display: inline-block;
    content: "***";
    font-size: 30px;
    line-height: 65px;
    height: 30px;
    letter-spacing: .2em;
}

/* Универсальный отступ для всех блоков Editor.js */
.ce-block__content,
.ce-toolbar__content {
  margin-left: 20px;   /* ← регулируй это значение по вкусу */
  max-width: calc(100% - 40px);
}
.card-body .ce-block__content {
  margin-left: 0 !important; }
/* Чтобы тулбар "+" всегда был у самого левого края */
.ce-toolbar {
  left: 0 !important;
}

/* Плейсхолдеры для параграфов */
.ce-paragraph[contenteditable="true"]:empty::before,
.ce-paragraph[contenteditable="true"]:has(br:only-child)::before {
  content: attr(data-placeholder);
  color: #9aa1b2;
  display: block;
  pointer-events: none;
}
#editorjs .codex-editor__redactor {min-height:450px;
  padding-bottom: 10px !important;}

.ce-block__content .ce-paragraph{
    padding-top: 5px;
    padding-bottom: 5px;
}
.cdx-block, .card p
 {
    font-size:1.1rem !important;
    line-height: 1.6 !important;
    color: #191919 !important;;
}
.cdx-input
 {
    border:0;
    -webkit-box-shadow: none;
    box-shadow:none;
    border-radius: 0;
    padding: 0;
    color:#9aa2b1;
}
.image-tool__image-picture
 {
    border-radius:.675rem;margin-bottom:0;
}
.image-tool__image {
    margin-bottom: 0 !important;
}
.accordion-button:focus {
    border: 0 !important;box-shadow:none !important;
}
.accordion-button:not(.collapsed) {
    background-color:#f8f9fa !important;
    box-shadow:none !important;
}
.accordion-button:after {
    color:#212529bf !important;
}
/* контейнер с горизонтальной прокруткой */
.tabs-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;  /* плавность на iOS */
  scrollbar-width:thin;              /* firefox */
  scrollbar-color:#d0d0d0 transparent;
}

/* скрыть полосу на webkit (по желанию) */
.tabs-scroll::-webkit-scrollbar{height:6px}
.tabs-scroll::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:10px}
.tabs-scroll::-webkit-scrollbar-track{background:transparent}

/* чтобы элементы не переносились и вели себя как лента */
.tabs-row{
  flex-wrap:nowrap!important; /* переопределяем bootstrap */
  white-space:nowrap;
}

/* небольшие отступы, чтобы крайние не прилипали */
.tabs-row .nav-item{display:inline-flex}
.tabs-row .nav-link{padding-inline:0.75rem}

/* опционально — тонкий градиент по краям, когда есть скролл */
.tabs-scroll.is-scrollable{
  mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}
/* Бэкдроп: плотное затемнение + сильный blur */
.modal-backdrop.show {
  opacity: 1; /* убираем полупрозрачность bootstrap */
}
.modal-backdrop {
  background: rgba(34, 37, 44, 0.65); /* тёмный слой */
  backdrop-filter: blur(34px) saturate(220%);
  -webkit-backdrop-filter: blur(34px) saturate(220%);
}

/* Контейнер модалки */
.auth-modal .modal-dialog {
  max-width: 420px;       /* ширина карточки, как у DTF */
  margin: 1.75rem auto;
  transition: transform .2s ease, opacity .2s ease;
}
@media (max-width: 480px) {
  .auth-modal .modal-dialog { max-width: 92vw; }
}

/* Карточка */
.auth-modal .modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow:
    0 20px 50px rgba(0,0,0,.25),
    0 2px 10px rgba(0,0,0,.08);
  padding: 6px;                 /* для визуальной “толщины” */
}

/* Верх */
.auth-modal .modal-header {
  border: 0;
  justify-content: center;
  padding: 18px 18px 0;
  position: relative;
}
.auth-modal .modal-title {
  font-weight: 700;
  font-size: 18px;
}
.auth-modal .modal-header .btn-close {
  position: absolute;
  right: 12px;
  top: 12px;
  opacity: .6;
}
.auth-modal .modal-header .btn-close:hover { opacity: 1; }

/* Тело */
.auth-modal .modal-body {
  padding: 18px 22px 24px;
}

/* Вводы — чуть крупнее и мягче */
.auth-modal .form-control {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
}
.auth-modal .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

/* Кнопка */
.auth-modal .btn-primary {
  border-radius: 12px;
  height: 44px;
  font-weight: 600;
}

/* Ссылки внизу формы */
.auth-modal .modal-body .auth-links,
.auth-modal .modal-body .d-flex.justify-content-between {
  font-size: 14px;
}
.auth-modal a { text-decoration: none; }
.auth-modal a:hover { text-decoration: underline; }

/* Нежная анимация появления карточки */
.auth-modal.show .modal-dialog { transform: translateY(0) scale(1); opacity: 1; }
.auth-modal .modal-dialog { transform: translateY(4px) scale(.99); opacity: 0; }

/* Опционально: слегка размыть контент под модалкой без учёта backdrop (Safari старый) */
body.modal-open .frame {
  filter: blur(10.2px);
  transition: filter .2s ease;
}
.card iframe {
  border-radius: .675rem;   /* скругление углов */
  overflow: hidden;      /* иногда не обязательно, но лучше указать */
}
.ejs-spoiler-block{
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.ejs-spoiler-head{
  display:flex; gap:8px; align-items:center; margin-bottom:8px;
}
.ejs-spoiler-toggle{
  padding:4px 10px;
  border:1px solid #d1d5db;
  border-radius:6px;
  background:#f8fafc;
  cursor:pointer;
}
.ejs-spoiler-title{
  flex:1;
  border:1px solid #e5e7eb;
  border-radius:6px;
  padding:6px 8px;
  font:inherit;
}
.ejs-spoiler-body{
  display:none;
  border-top:1px dashed #e5e7eb;
  padding-top:8px;
  min-height:20px;
}
.ejs-spoiler-body:empty:before{
  content: attr(data-placeholder);
  color:#9ca3af;
}
.ejs-spoiler-block.is-open .ejs-spoiler-body{
  display:block;
}
/* единый размер и выравнивание */
.bookmark-btn .bookmark-icon svg { vertical-align: -0.125em; }

/* при data-bookmarked="1" — красим контур и заливаем иконку */
.bookmark-btn[data-bookmarked="1"] .bookmark-icon { color: #749BF4; } /* или .text-warning */
.bookmark-btn[data-bookmarked="1"] .bookmark-icon g path:first-child { fill: currentColor; }

/* при data-bookmarked="0" — только обводка */
.bookmark-btn[data-bookmarked="0"] .bookmark-icon g path:first-child { fill: none; }
.actions-row .d-inline-flex svg {
  display: block;            /* убираем лишние "пробелы" как у текста */
}

.actions-row .d-inline-flex span {
  line-height: 1;            /* чтобы цифры не имели лишнего отступа сверху/снизу */
  display: flex;
  align-items: center;       /* центруем цифру внутри */
}

.actions-row .d-inline-flex {
  align-items: center;       /* иконка и цифра по центру */
}
.bookmark-btn svg { display: block; }   /* убирает “просадку” SVG по базовой линии */
.bookmark-count { line-height: 1; display: flex; align-items: center; }
.comment-preview-row:hover svg,  .comment-preview-row:hover span.text-body{
  color: #749BF4 !important;
}
.highlight-comment {
  animation: highlight-fade 5s ease;
}

@keyframes highlight-fade {
  0%   { background-color: #ffffcc; }
  100% { background-color: transparent; }
}
.attach-name{
  min-width: 0; 
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis; 
  white-space: nowrap; 
}

.comment-attach-left{ min-width:0; overflow:hidden; }
  .c-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1060;
    min-width: 240px;
    background: #fff;
    padding: 8px;
  }
  .c-menu .dropdown-item {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: left;
    font-size: .95rem;
    color: #111827;
  }
  .c-menu .dropdown-item:hover { background: #f5f5f7; }

  .dropdown-menu {
    padding: 6px !important;
    background-color: #FFF !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08), 0 0 1px rgba(0, 0, 0, .16) !important;
    border-radius: 10px !important;
    border:0 !important;
}
.dropdown-item {
    border-radius: 6px !important;font-size:15px !important;line-height:22px !important;
}
.dropdown-item:hover {
    background-color:#f2f2f2 !important;
}

.toast-item{
  display:flex; align-items:center; gap:.5rem;
  padding:.75rem 1rem; margin:0 0 .5rem 0; border-radius:7px;
  color:#09090b; box-shadow:0 8px 24px rgba(0,0,0,.12);
  animation:toastIn .18s ease-out;
  backdrop-filter: blur(6px);
}
.toast-item.success{ background:#FFF; border-bottom: 5px solid rgba(30,160,90,.95); }
.toast-item.error  { background:#FFF; border-bottom: 5px solid rgba(200,60,60,.95); }
.toast-item .toast-close{
  margin-left:auto; background:transparent; border:0; color:#fff;
  font-size:20px; line-height:1; opacity:.9; cursor:pointer;
}
@keyframes toastIn { from{ transform:translateY(-6px); opacity:0 } to{ transform:none; opacity:1 } }