/* Общий контейнер */
.menu-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

/* Сайдбар-меню */
.sidebar-menu {
    width: 200px;
    flex-shrink: 0; /* Предотвращает изменение ширины */
    padding: 15px;
}

.menu-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Arial', sans-serif; /* Более стильный шрифт */
}

.menu-list {
    list-style-type: none;
    padding: 0;
}

.menu-list li {
    margin: 10px 0;
    position: relative;
}

/* Ссылки меню */
.menu-list a {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* Анимация при наведении */
.menu-list a:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateX(5px);
}

/* Разделитель пунктов меню */
.menu-list li:not(:last-child)::after {
    content: "";
    display: block;
    height: 1px;
    background-color: #e0e0e0;
    margin: 10px 0;
}

/* Основной блок контента */
.content-area {
    flex-grow: 1;
    padding: 15px;

}

@media (max-width: 992px) {
    .content-area {
        padding: 5px;
        }
}

/* Кнопка-гамбургер */
.menu-toggle {
  display: none; /* по умолчанию скрыта на десктопе */
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 0px; /* отступ под кнопкой */
}

/* ----- Адаптивные стили (для мобильных устройств) ----- */
@media (max-width: 992px) {
  .menu-container {
    display: block; /* переводим в блочный вид: меню над контентом */
    padding: 5px;
  }

  .menu-toggle {
    display: block; /* показываем кнопку на мобильных */
    width: 100%;
    border-radius: 10px;
  }

   /* Центрируем текст внутри пунктов меню */
  .sidebar-menu .menu-list li a {
    text-align: center;
  }

   /* Скрытое состояние меню по умолчанию */
    .sidebar-menu {
      display: block;
      width: auto;
      max-width: 300px;
      margin: 0 auto;       /* Центрируем сам блок меню */
      text-align: center;   /* Центрируем содержимое меню */

      /* Вместо display: none и пр. используем max-height и overflow для анимации */
      max-height: 0;           /* Начальное «закрытое» состояние */
      overflow: hidden;        /* Скрываем содержимое за границей */
      transition: max-height 0.3s ease; /* Анимация */
    }

    /* Класс show - "открытое" состояние */
    .sidebar-menu.show {
      max-height: 500px; /* Задайте достаточно большое значение, чтобы вместить меню */
    }

  /* Вариант меню без анимации */
  .sidebar-menu_no_anim {
    display: none; /* будет показан при клике на кнопку */
    width: 100%;
    margin-bottom: 20px;
  }

  /* Когда у sidebar-menu style.display = 'block' (через JS),
     оно будет занимать всю ширину */
  .sidebar-menu.show {
    display: block;
  }
}

.content-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Arial', sans-serif;
}

.content-list {
    list-style-type: none;
    padding: 0;
}

.content-list li {
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 1px solid #eee; */
}



.content-list h3 {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.content-list p {
    font-size: 14px;
    color: #777;
    margin: 5px 0 0;
}

.content-list li-underlined {
    border-bottom: 1px solid #eee;
}

.bread-crumbs__back {
  color: #0F33EF;
  font-family: "Montserrat";
  font-size: 16rem;
  font-style: normal;
  font-weight: 500;
  line-height: 125%; /* 20px */
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
}
.bread-crumbs__back:hover {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3rem;
}

.bread-crumbs-back__icon {
  padding: 8rem;
  border-radius: 50%;
  background: #fff;
  width: 40rem;
  height: 40rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bread-crumbs__wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.bread-crumb__list {
  display: flex;
  align-items: center;
  gap: 16rem;
  margin: 0;
  padding: 0;
}

.bread-crumb-list__item {
  color: #6b6b6b;
  font-family: "Montserrat";
  font-size: 14rem;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
  text-underline-offset: 3rem;
}
.bread-crumb-list__item a {
  color: #6b6b6b;
  font-family: "Montserrat";
  font-size: 14rem;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
  text-underline-offset: 3rem;
  text-decoration-line: underline;
  transition: all 0.3s ease;
}
.bread-crumb-list__item a:hover {
  font-weight: 700;
  color: #0F33EF;
}

/* список телеграм источников */


/* Общие стили для основного списка */
.custom-content-list {
    padding: 0;
    list-style: none;
    font-family: Arial, sans-serif;
}

.main-item {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-title {

  color: #000;
  font-family: "Montserrat";
  font-size: 22rem;
  font-style: normal;

  font-weight: 700;
  line-height: 125%; /* 27.5px */

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-close-icon {
    font-size: 16px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.main-close-icon:hover {
    color: #ff4d4d; /* Красный при наведении */
    transform: scale(1.05);
}

/* Стили для подэлементов списка */
.sub-items {
    word-break: break-word;
    padding-left: 20px;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media screen and (max-width: 768px) {
    .main-item {
        padding: 0;
    }
    .sub-items {
        padding-left: 0px;
        gap: 10px;
    }

    .sub-item {
        margin-bottom: 10px !important;
    }
}

.sub-item {
    margin-top: 5px; /* Отступ сверху */
    margin-bottom: 5px; /* Отступ снизу */
    position: relative;
    padding: 12px;
    border-radius: 8px;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sub-item:hover {
    background-color: #e8f2ff; /* Немного темнее цвет при наведении */
    transform: scale(1.01);
}

/* Контейнер для иконок в правом верхнем углу */
.icon-container {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
}

/* Иконки крестика и карандаша */
.sub-close-icon, .sub-edit-icon {
    font-size: 16px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sub-close-icon:hover, .main-close-icon:hover {
    color: #ff4d4d; /* Красный цвет для крестика при наведении */
}

.sub-edit-icon:hover {
    color: #4d79ff; /* Синий цвет для карандаша при наведении */
}

.sub-close-icon:hover, .sub-edit-icon:hover {
    transform: scale(1.05); /* Едва заметное увеличение значков при наведении */
}

.sub-item-title {
    font-size: 16px;
    font-weight: bold;
    color: #555;
}

.sub-item-url {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

.sub-item-url a {
    color: #007bff;
    text-decoration: none;
}

.sub-item-url a:hover {
    text-decoration: underline;
}

.sub-item-channel,
.sub-item-status,
.sub-item-used {
    font-size: 14px;
    color: #777;
}

/* sub-itemform */
/* Основные стили для формы редактирования подэлемента */
.sub-item-form {
    padding: 12px;
    border-radius: 8px;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sub-itemform-edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-itemform-field {
    display: flex;
    flex-direction: column;
}

.sub-itemform-field label {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.sub-itemform-field input[type="text"],
.sub-itemform-field input[type="url"] {
    padding: 8px 10px;
    font-size: 14px;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.sub-itemform-field input[type="text"]:focus,
.sub-itemform-field input[type="url"]:focus {
    border-color: #007bff;
    outline: none;
}

/* Стиль для поля чекбокса */
.sub-itemform-checkbox-field {
    display: flex;
    align-items: center;
}

.sub-itemform-checkbox-field label {
    font-size: 14px;
    color: #555;
    margin-right: 10px;
}

.sub-itemform-checkbox-field input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* Кнопки для сохранения и отмены */
.sub-itemform-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 10px;
}

.sub-itemform-save-button, .sub-itemform-cancel-button {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Сохранить - синяя кнопка */
.sub-itemform-save-button {
    color: white;
    background-color: #007bff;
}

.sub-itemform-save-button:disabled:hover,
.sub-itemform-save-button:disabled {
  background-color: gray;
  cursor: not-allowed;
  opacity: 0.5;
}

.sub-itemform-save-button:hover {
    background-color: #0056b3;
}

/* Отменить - серая кнопка */
.sub-itemform-cancel-button {
    color: #333;
    background-color: #e0e0e0;
}

.sub-itemform-cancel-button:hover {
    background-color: #c0c0c0;
}
