/*
 * Bonus dialog «Дарим до 1 100 бонусов на цветы» (lead_capture.php variant B, tech-dr 18.11.2026).
 * Works in both templates: droza_a4 gives the --dn-* brand tokens, the old template gets the fallbacks.
 * Everything is scoped under .dn-bonus because the old screen.css has bare rules on h2, ul, a, button.
 */
dialog.dn-bonus {
  position: fixed;
  inset: 0;
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--dn-paper, #fbfbf8);
  color: var(--dn-ink, #1e2b24);
  box-shadow: 0 30px 80px -20px rgba(30, 43, 36, .6);
  overflow: hidden;
  font: 16px/1.5 var(--dn-font-body, 'Golos Text', Montserrat, Arial, sans-serif);
  text-align: left;
  box-sizing: border-box;
}
dialog.dn-bonus[open] { animation: dn-bonus-in .28s ease-out; }
dialog.dn-bonus::backdrop { background: rgba(30, 20, 24, .62); }
html:has(dialog.dn-bonus[open]) { overflow: hidden; }
@keyframes dn-bonus-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.dn-bonus[open] { animation: none; } }

.dn-bonus *, .dn-bonus *::before, .dn-bonus *::after { box-sizing: border-box; }
.dn-bonus [hidden] { display: none !important; }

.dn-bonus__card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  max-height: calc(100svh - 32px);
}
.dn-bonus__photo {
  min-height: 100%;
  background: var(--dn-wine, #3b1520) center 30% / cover no-repeat;
}
.dn-bonus__body {
  padding: 40px 40px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dn-bonus .dn-bonus__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--dn-ink, #1e2b24);
  box-shadow: 0 4px 14px rgba(30, 43, 36, .18);
  cursor: pointer;
}
.dn-bonus .dn-bonus__close svg { width: 20px; height: 20px; }
.dn-bonus .dn-bonus__close:hover { background: #fff; color: var(--dn-rose, #b8334f); }

.dn-bonus .dn-bonus__eyebrow {
  margin: 0 48px 10px 0;
  color: var(--dn-rose, #b8334f);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dn-bonus .dn-bonus__title {
  margin: 0 0 20px;
  padding: 0;
  color: var(--dn-ink, #1e2b24);
  font: 400 34px/1.15 var(--dn-font-head, 'Prata', Georgia, serif);
  text-transform: none;
  text-align: left;
}
.dn-bonus .dn-bonus__title span { display: block; color: var(--dn-rose, #b8334f); }
.dn-bonus .dn-bonus__text { margin: 0 0 22px; color: var(--dn-ink-soft, #4f5d55); font-size: 16px; }

.dn-bonus .dn-bonus__list {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.dn-bonus .dn-bonus__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--dn-ground, #eef0ea);
  color: var(--dn-ink, #1e2b24);
  font-size: 15px;
  line-height: 1.35;
}
.dn-bonus .dn-bonus__list li::before { content: none; display: none; }
.dn-bonus .dn-bonus__list li > span:first-child { flex: none; font-size: 20px; line-height: 1; }
.dn-bonus .dn-bonus__list li > span + span { flex: 1; min-width: 0; }
.dn-bonus .dn-bonus__list b { font-weight: 700; color: var(--dn-rose-deep, #96233d); }

.dn-bonus .dn-bonus__bots { display: grid; gap: 10px; }
.dn-bonus a.dn-bonus__bot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border: 2px solid var(--dn-rose, #b8334f);
  border-radius: 999px;
  background: var(--dn-rose, #b8334f);
  color: #fff !important;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s;
}
.dn-bonus a.dn-bonus__bot:hover { background: var(--dn-rose-deep, #96233d); border-color: var(--dn-rose-deep, #96233d); }
.dn-bonus a.dn-bonus__bot--max { background: #fff; color: var(--dn-rose-deep, #96233d) !important; }
.dn-bonus a.dn-bonus__bot--max:hover { background: #fbeef1; }
.dn-bonus a.dn-bonus__bot svg, .dn-bonus a.dn-bonus__bot img { flex: none; width: 20px; height: 20px; max-width: none; }

.dn-bonus .dn-bonus__later {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 8px 0 0;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--dn-ink-soft, #4f5d55);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.dn-bonus .dn-bonus__later:hover { color: var(--dn-ink, #1e2b24); }
.dn-bonus a:focus-visible, .dn-bonus button:focus-visible { outline: 2px solid var(--dn-rose, #b8334f); outline-offset: 3px; }

/* phone: compact card that fits a 390x660 visible screen; photo is a short band on top (Ivan 18.11: too big) */
@media (max-width: 680px) {
  dialog.dn-bonus {
    width: calc(100vw - 24px);
    max-width: 400px;
    max-height: calc(100svh - 24px);
    border-radius: 18px;
  }
  .dn-bonus__card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-height: calc(100svh - 24px); }
  .dn-bonus__photo { min-height: 0; height: min(18svh, 120px); background-position: center 30%; }
  .dn-bonus__body { padding: 14px 16px 6px; }
  .dn-bonus .dn-bonus__close { top: 8px; right: 8px; width: 40px; height: 40px; }
  .dn-bonus .dn-bonus__eyebrow { margin: 0 44px 4px 0; font-size: 10px; }
  .dn-bonus .dn-bonus__title { margin-bottom: 10px; font-size: 22px; line-height: 1.2; }
  .dn-bonus .dn-bonus__title span { display: inline; }
  .dn-bonus .dn-bonus__text { margin-bottom: 12px; font-size: 14px; }
  .dn-bonus .dn-bonus__list { gap: 4px; margin-bottom: 12px; }
  .dn-bonus .dn-bonus__list li { gap: 8px; padding: 6px 10px; border-radius: 10px; font-size: 13px; }
  .dn-bonus .dn-bonus__list li > span:first-child { font-size: 16px; }
  .dn-bonus .dn-bonus__bots { gap: 8px; }
  .dn-bonus a.dn-bonus__bot { min-height: 44px; font-size: 15px; }
  .dn-bonus .dn-bonus__later { min-height: 36px; margin-top: 2px; font-size: 13px; }
}
@media (max-width: 680px) and (max-height: 600px) {
  .dn-bonus__photo { display: none; }
}
