/* Блокировка скролла основной страницы при открытом попапе */
body.cocon-overflow-hidden {
  overflow: hidden;
}

/* Скрываем исходные попапы до инициализации JS безопасным для SEO образом:
   они занимают место в DOM для роботов, но скрыты визуально на оверлее */
.cocon,
.cocon-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Класс активации оверлея (добавляется через JS) */
.cocon-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Внутренняя обертка контента */
.cocon-inner {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -45%);
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Анимация контента при открытии */
.cocon-overlay.is-active .cocon-inner {
  transform: translate(-50%, -50%);
}

/* Стилизация кнопки закрытия кокона */
.cocon-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    
    /* Сброс стандартных стилей кнопки браузера */
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    
    /* Центрирование крестика */
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    /* Стили самого крестика */
    font-family: Arial, sans-serif !important;
    font-size: 36px !important;
    line-height: 1 !important;
    color: #333333 !important; /* Цвет крестика (можно заменить на фирменный) */
    
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0 !important;
}

/* Эффект при наведении на крестик */
.cocon-close-btn:hover {
    color: #0066ff !important; /* При наведении крестик станет синим в цвет сайта */
    transform: rotate(90deg);  /* Легкий красивый поворот крестика на 90 градусов */
}

.cocon-inner img {
    max-width: 100%;    /* Картинка никогда не будет шире родительского div */
    height: auto;       /* Пропорции картинки сохраняются автоматически */
    display: block; 
}
.cocon-inner h2,
.cocon-inner h3 {
    margin:1rem 0;
}
/* Базовые стили для кнопок-ссылок */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 6px;
  justify-content: center;
}
.tags a.tag {
    display: inline-block;
    padding: 12px 28px;
    background-color: #f1f1f1; /* Фирменный синий цвет Sellerport */
    color: #292929;   /* Белый текст */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important; /* Убираем подчеркивание ссылки */
    border-radius: 8px;          /* Скругление углов */
    /*box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2); */ /* Легкая тень */
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-align: center;
    flex-grow: 1;
}

/* Эффект при наведении (Hover) */
.tags a.tag:hover {
    background-color: #ffffff; /* Более темный оттенок синего при наведении */
    box-shadow:0 0px 10px rgb(22, 169, 122, .2);
    transform: translateY(-1px); /* Легкий эффект приподнимания */
}

/* Эффект при клике (Active) */
.tags a.tag:active {
    background-color: #0044b3;
    transform: translateY(1px);  /* Эффект нажатия */
    box-shadow: 0 0px 10px rgb(22, 169, 122, .2);
}