.bf-popup {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #161618;
  box-shadow: 0 20px 70px #0008;
  overscroll-behavior: contain;
}

.bf-popup[data-bf-stage="offer"] {
  width: min(460px, calc(100% - 32px), calc((100dvh - 32px) * .87179));
  overflow: hidden;
}

.bf-popup::backdrop { background: #08090ac9; }
.bf-scroll-lock { overflow: hidden; }
.bf-popup [hidden] { display: none !important; }

.bf-poster { position: relative; }
.bf-poster img { display: block; width: 100%; height: auto; }

.bf-close {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #fff4;
  border-radius: 50%;
  background: #17181b;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.bf-popup[data-bf-stage="offer"] .bf-close {
  top: max(22px, 4.5%);
  right: max(22px, 5.3%);
  transform: translate(50%, -50%);
}

.bf-popup[data-bf-stage="offer"] .bf-close:focus-visible { outline-offset: -4px; }

.bf-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #f7d486;
  border-radius: 9px;
  background: #f1c36a;
  color: #15110c;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.bf-action:hover { background: #ffda8e; }
.bf-action:disabled { opacity: .7; cursor: wait; }
.bf-popup :focus-visible { outline: 2px solid #ffe7af; outline-offset: 2px; }

.bf-poster-action {
  position: absolute;
  top: 91%;
  left: 14.6%;
  width: 70.8%;
  height: 10%;
  transform: translateY(-50%);
  border-radius: 999px;
}

.bf-content { padding: 28px 24px 24px; }
.bf-content h2 {
  margin: 0 38px 12px 0;
  color: #f1c36a;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
}

.bf-content p { margin: 0 0 10px; color: #f3eee5; font-size: 14px; }
.bf-content .bf-intro { font-weight: 700; }
.bf-content .bf-dates { color: #f1c36a; font-weight: 700; }
.bf-form { display: grid; gap: 6px; margin-top: 16px; }
.bf-form label { font-size: 14px; font-weight: 600; }
.bf-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  margin-bottom: 5px;
  padding: 8px 12px;
  border: 1px solid #ffffff40;
  border-radius: 8px;
  background: #242428;
  color: #fff;
  font-size: 16px;
}

.bf-form .bf-action { margin-top: 6px; }
.bf-form .bf-error { color: #ffb6ad; }
.bf-content .bf-success { margin: 16px 0; }

@media (max-height: 620px) {
  .bf-content { padding-block: 20px 16px; }
  .bf-content p { margin-bottom: 8px; }
  .bf-form { margin-top: 12px; }
}

@media (max-width: 360px) {
  .bf-content { padding-inline: 16px; }
  .bf-poster-action { font-size: 13px; }
}
