/* ===== СТИЛИ AI-КНОПКИ ===== */
.ai-button {
  position: relative;
  z-index: 1000;                       /* ниже, чем у модалки */
  display: inline-block;               /* чтобы padding работал */
  max-width: 300px;                    /* ограничиваем ширину */
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 18px 30px;
  background: linear-gradient(90deg, #005d5b, #00f2ff);
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
  transition: transform .2s;
}
.ai-button:hover {
  transform: scale(1.05);
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0     rgba(0,242,255,0.4); }
  70%  { box-shadow: 0 0 0 20px  rgba(0,242,255,0); }
  100% { box-shadow: 0 0 0 0     rgba(0,242,255,0); }
}

/* ===== СТИЛИ МОДАЛЬНОГО ОКНА ===== */
.modal-bg {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 2000;                       /* выше, чем у кнопки */
}
.modal-bg.show {
  display: flex !important;
  pointer-events: auto !important;
}
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  cursor: pointer;
}

/* ===== Центрируем кнопку в любом блоке ===== */
.ai-button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 40px 0;                     /* отступ сверху/снизу */
  position: relative;                 /* чтобы модалка поверх */
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
  .modal-content { width: 95%; padding: 10px; }
}
@media (max-width: 480px) {
  .ai-button {
    width: 100%;
    padding: 16px;
  }
}
