/* Оверлей оплаты поверх сайта. Отдельный файл, чтобы не смешивать
   с payment-widget.css: тот отвечает за сам виджет, этот — за его рамку. */

.opw-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* выше плавающих кнопок сайта и виджета чата */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}

.opw-overlay__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.opw-overlay__close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 1;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 26px;
  line-height: 34px;
  cursor: pointer;
}

.opw-overlay__close:hover {
  background: #f3f4f6;
  color: #111827;
}

.opw-overlay__mount {
  padding: 8px;
}

/* --- окно счёта --- */

/* Счёт — лист A4, а не карточка на 420px: клиент снимает с него скриншот,
   и документ должен читаться целиком без прокрутки вбок. */
.opw-overlay--invoice .opw-overlay__box {
  max-width: 900px;
}

.opw-invoice__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 52px 12px 18px; /* справа — место под крестик закрытия */
  border-bottom: 1px solid #e5e7eb;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.opw-invoice__title {
  flex: 1 1 auto;
  min-width: 160px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.opw-invoice__btn {
  padding: 9px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.opw-invoice__btn:hover { border-color: #1f7a3d; background: #f8fdfa; }

.opw-invoice__btn--primary {
  border-color: transparent;
  background: #16a34a;
  color: #fff;
}

.opw-invoice__btn--primary:hover { background: #15803d; color: #fff; }

.opw-invoice__frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: #f2f3f5;
}

/* --- окно выбора способа оплаты (быстрая покупка с карточки) --- */

.opw-choice {
  padding: 22px 20px 20px;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.opw-choice__title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.opw-choice__sum {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.opw-choice__btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.opw-choice__btn:hover { border-color: #1f7a3d; background: #f8fdfa; }

.opw-choice__btn--primary {
  border-color: transparent;
  background: #16a34a;
}

.opw-choice__btn--primary:hover { background: #15803d; border-color: transparent; }

.opw-choice__btn--primary .opw-choice__btn-title,
.opw-choice__btn--primary .opw-choice__btn-note { color: #fff; }

.opw-choice__btn--primary .opw-choice__btn-note { opacity: .85; }

.opw-choice__btn-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.opw-choice__btn-note {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.35;
}
