/* Стили для исправления кнопки "В бот" */

/* Селектор для кнопок, содержащих текст "В бот" */
button:has(span:contains("В бот")),
button:contains("В бот"),
a[href*="t.me"]:has(span:contains("В бот")),
a[href*="t.me"]:contains("В бот") {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

/* Если кнопка содержит SVG стрелку, скрываем ее */
button:has(span:contains("В бот")) svg,
button:contains("В бот") svg,
a[href*="t.me"]:has(span:contains("В бот")) svg,
a[href*="t.me"]:contains("В бот") svg {
  display: none !important;
}

/* Альтернативный вариант - если кнопка имеет классы Tailwind */
[class*="bg-astro-primary"]:has(span:contains("В бот")),
[class*="bg-purple"]:has(span:contains("В бот")) {
  white-space: nowrap !important;
}

/* Общие стили для всех кнопок с текстом "В бот" */
* {
  /* Убираем переносы строк для элементов с текстом "В бот" */
}

/* JavaScript fallback для более точного определения */
/* Стили для тегов категорий */
.category-tags-container {
  margin-bottom: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.category-tag {
  background-color: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-tag:hover {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

.category-tag.active {
  background-color: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

.active-filter {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
}

.filter-category {
  font-weight: 600;
  color: #4f46e5;
  margin-left: 8px;
  margin-right: 8px;
}

.clear-filter {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
  margin-left: 4px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-filter:hover {
  background-color: rgba(107, 114, 128, 0.1);
  color: #374151;
}

/* Исправления размеров шрифтов для обеих страниц */

/* Основные размеры шрифтов для заголовков */
h1 {
  font-size: 2rem !important;
  line-height: 1.2 !important;
}

h2 {
  font-size: 1.75rem !important;
  line-height: 1.3 !important;
}

h3 {
  font-size: 1.5rem !important;
  line-height: 1.4 !important;
}

/* Размеры шрифтов для текста промптов */
.prompt-text {
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

/* Размеры шрифтов для категорий и тегов */
.category-tag {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

.tag {
  font-size: 0.75rem !important;
}

/* Размеры шрифтов для описаний */
.description {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

/* Размеры шрифтов для мобильных устройств */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem !important;
  }
  
  h2 {
    font-size: 1.25rem !important;
  }
  
  h3 {
    font-size: 1.125rem !important;
  }
  
  .prompt-text {
    font-size: 0.875rem !important;
  }
}

/* Обеспечиваем читаемость текста */
body {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* Стили для тоста (уведомления о копировании) */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(76, 175, 80, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
}

/* Стили для правильного позиционирования кнопки "В бот" в заголовке */
.flex.justify-between.items-center > button:contains("В бот"),
.flex.justify-between.items-center > button[class*="bg-purple"] {
  flex-shrink: 0 !important;
  max-width: none !important;
  margin-left: auto !important;
}