/* DEMO-MENU: тимчасово, видалити разом з переїздом на admin-CRM (див. DEMO_MENU_RESEARCH.md)
   Стилі демо-модалки «Спробувати безкоштовно». Базові токени й компоненти
   (--accent, .btn, .form__*, .modal__*) успадковуються з app.min.css. */

.modal_demo .modal__container {
  max-width: 480px;
  width: 100%;
  border-radius: 16px;
  padding: 32px;
}

.demo-modal__step {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.demo-modal__step[hidden] {
  display: none;
}

.demo-modal__form .form__controls {
  gap: 24px;
}

/* Роздільник «або» */
.demo-modal__divider {
  align-items: center;
  color: var(--grey);
  display: flex;
  font-size: 14px;
  gap: 16px;
}

.demo-modal__divider::before,
.demo-modal__divider::after {
  background: rgba(40, 40, 40, 0.08);
  content: "";
  flex: 1;
  height: 1px;
}

.demo-modal__contact-btn {
  color: var(--main);
}

/* Помилка запиту (429 / мережа / null-QR) */
.demo-modal__error {
  color: red;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 16px;
}

.demo-modal__error[hidden] {
  display: none;
}

/* Стан лоадингу кнопки */
.btn._loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn._loading::after {
  animation: demo-spin 0.7s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: #fff;
  content: "";
  display: inline-block;
  height: 16px;
  margin-left: 10px;
  width: 16px;
}

@keyframes demo-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Успіх: QR */
.demo-modal__qr-wrap {
  display: flex;
  justify-content: center;
}

.demo-modal__qr {
  border: 1px solid rgba(40, 40, 40, 0.08);
  border-radius: 12px;
  height: auto;
  max-width: 240px;
  width: 100%;
}

/* Успіх: ряд «посилання + копіювати» */
.demo-modal__link-row {
  align-items: center;
  background: rgba(40, 40, 40, 0.04);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
}

.demo-modal__link {
  color: var(--blue);
  flex: 1;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-modal__link:hover {
  text-decoration: underline;
}

.demo-modal__copy-btn {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.demo-modal__copy-btn:hover {
  background: var(--accent);
  color: #fff;
}

.demo-modal__copy-btn._copied {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
}

.demo-modal__note {
  color: var(--grey);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 539px) {
  .modal_demo .modal__container {
    padding: 24px 20px;
  }

  .demo-modal__qr {
    max-width: 200px;
  }

  .demo-modal__link-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
