.bot-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 600px;   /* ограничение ширины всей секции */
  margin: 0 auto;     /* центрируем на странице */
  padding: 1rem;
  margin-bottom: 80px;
}

.bot-card {
  background-color: rgba(73,204,144,.1); /* Стандартный зеленый фон */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  width: 100%;

}

.bot-card:hover {
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.bot-card.status-running {
  background-color: rgba(73, 204, 144, .1); /* Зеленый фон */
}

.bot-card.status-stopped {
  background-color: rgba(249, 62, 62, .1); /* Красный фон */
}

.bot-status.status-running {
  color: #49cc90;
}

.bot-status.status-stopped {
  color: #f93e3e;
}


.bot-card.open.status-running {
  background-color: rgba(73, 204, 144, .1); /* Зеленый фон */
}

.bot-card.open.status-stopped {
  background-color: rgba(249, 62, 62, .1); /* Красный фон */
}

.bot-card.open:hover {
  transform: translateY(0px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #666;
  cursor: pointer;
}

.close-btn:hover {
  color: #000;
}

.bot-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #333;
}

.bot-card .details {
  display: none;
  margin-top: 1rem;
}

.bot-card.open .details {
  display: block;
}

.bot-cards .bot-details {
  display: none;
}

.bot-cards .bot-card.open .bot-details {
  display: block;
}

.bot-details {
  position: relative;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05); /* Легкая, едва заметная тень */
}

.bot-actions {
  display: flex;
  gap: 0.75rem; /* Увеличено пространство между кнопками */
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.bot-actions button {
  flex: 1;
  min-width: 110px; /* Увеличена минимальная ширина для лучшей читаемости */
  padding: 0.5rem 0.5rem; /* Увеличены отступы для кнопок */
  border: none;
  border-radius: 10px; /* Углы кнопок более мягкие */
  color: #333; /* Темно-серый текст для лучшей читаемости */
  cursor: pointer;
  font-size: 1.05rem; /* Немного увеличен размер шрифта для лучшего восприятия */
  font-weight: 500; /* Меньше жирности, чтобы текст не был слишком "тяжелым" */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Легкая тень */
}

/* Кнопка для запуска в сером оттенке */
.btn-start {
  background-color: rgba(73, 204, 144, .3); /* Зеленый фон */
  color: #333; /* Темно-серый текст */
}

.btn-start:hover {
  background-color: rgba(73, 204, 144, .5); /* Зеленый фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-start:active {
  background-color: #8c8c8c; /* Еще более темный серый при нажатии */
  transform: translateY(1px); /* При нажатии кнопка немного опускается */
}

/* Кнопка остановки в сером оттенке */
.btn-stop {
  background-color: rgba(249, 62, 62, .3); /* Красный фон */
  color: white; /* Белый текст */
}

.btn-stop:hover {
  background-color: rgba(249, 62, 62, .5); /* Красный фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

/* Серая кнопка */
.btn-grey {
    background-color: #d3d3d3; /* Цвет фона */
    color: #808080; /* Цвет текста */
    cursor: not-allowed; /* Убираем курсор */
}

/* Для disabled кнопки */
.disabled-btn {
    opacity: 0.5;  /* Уменьшаем непрозрачность для блокированных кнопок */
    pointer-events: none; /* Отключаем любые события кликов */
}

.btn-docs,
.btn-download {
  background-color: rgba(97,175,254,.3)
}
.btn-docs:hover,
.btn-download:hover {
  background-color: rgba(97,175,254,.5);
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-delete-bot
{
  background-color:  rgba(249, 62, 62, .3); /* Красный фон */
}

.btn-delete-bot:hover {
  background-color:  rgba(249, 62, 62, .5); /* Красный фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-delete {
  background-color:  rgba(249, 62, 62, .3); /* Красный фон */
}
.btn-delete:hover {
  background-color:  rgba(249, 62, 62, .5); /* Красный фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
  }


.bot-docs {
  margin-top: 1.5rem;
  padding: 12px;
  background-color: #f7f7f7;
  border: 1px solid #cce0f5;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bot-docs ul li {
  /* display: flex; */
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* Стиль для имени документа */
.doc-name {
  display: block; /* Имя документа будет на новой строке */
  margin-bottom: 5px; /* Немного пространства между именем документа и кнопками */
  overflow: hidden;  /* Обрезать текст, если он выходит за пределы */
  text-overflow: ellipsis; /* Многоточие для слишком длинных текстов */
  white-space: nowrap; /* Не переносить текст на новую строку */
}

.button-container {
  display: block; /* Блок для кнопок */
}

.bot-docs ul {
  padding-left: 1.2rem;
  margin: 0;
}
.bot-docs li {
  list-style-type: none;
  color: #333;
  margin-bottom: 0.5rem;
}

.hidden {
  display: none !important;
}

/* Стиль для кнопок */
.doc-btn {
 /* display: block;  Каждая кнопка будет на новой строке */
  margin-bottom: 10px; /* Немного пространства между кнопками */
  margin-left: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 40%; /* Заставляем кнопки занимать всю доступную ширину */
}

.btn-update {
  background-color: rgba(97,175,254,.3);
}
.btn-update:hover {
  background-color: rgba(97,175,254,.5);
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-delete {
  background-color:  rgba(249, 62, 62, .3); /* Красный фон */
}
.btn-delete:hover {

  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-add {
  background-color: rgba(73, 204, 144, .3); /* Зеленый фон */
}
.btn-add:hover {
   background-color: rgba(73, 204, 144, .5); /* Зеленый фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.btn-stop:active, .btn-start:active,
.btn-docs:active, .btn-download:active,
.btn-delete-bot:active, .btn-delete:active,
.btn-update:active, .btn-add:active, .btn-delete:active    {
  background-color: #7d7d7d; /* Очень темный серый при нажатии */
  transform: translateY(1px); /* При нажатии кнопка немного опускается */
}


/* Вращение иконки
#loading-indicator .spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 1.25rem;
} */

/* Основной контейнер для скачивания диалогов */
.bot-download {
  margin-top: 1.5rem;
  padding: 12px;
  background-color: #f7f7f7;
  border: 1px solid #cce0f5;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Стилизация списка */
.bot-download ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Стилизация каждого элемента списка */
.dialog-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.2s;
}

.dialog-item:hover {
  background: #f9fafb;
}

.dialog-name {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

.dialog-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.icon-btn:hover {
  background: #e5e7eb;
  transform: scale(1.1);
}

.download-btn svg {
  stroke: #16a34a; /* зелёная стрелка */
}

.delete-btn svg {
  stroke: #dc2626; /* красный крестик */
}

.telegram-link {
  color: #0088cc;
  text-decoration: none;
  font-weight: 600;
  font-family: Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.telegram-link:hover {
  color: #005f8d;
  text-decoration: underline;
}

.telegram-link svg {
  flex-shrink: 0;
}

/* Стилизация кнопки для скачивания */
.download-dialog-btn {
  background: none;
  color: #007bff;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: underline;
  transition: color 0.3s ease;
}

/* Стилизация кнопки при наведении */
.download-dialog-btn:hover {
  color: #0056b3;
}

/* Иконка перед кнопкой */
.download-dialog-btn::before {
  content: "📄";
  margin-right: 8px;
  font-size: 16px;
}

/* Отключенная кнопка */
.download-dialog-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

#loading-indicator {
  position: fixed;
  top: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none;

  background-color: #fff;
  color: #333;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

@media (max-width: 1734px) {
  .bot-cards{
   padding-top: 4rem;
  }
}

@media (max-width: 1335px) {
  .create-bot-sidebar {
  right: 20px; /* Отступ от правого края */
  top: auto;
  }
}


@media (max-width: 1280px) {

  .create-bot-sidebar {
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  width: 100%; /* пусть карточка занимает всю ширину родителя */
  right: 0px;
  z-index: 0; /* Ставим на самый задний план */
  }

}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

