/* Popups «Получить предложение» (event) and «Забронировать стол» (table).
   base.js toggles [hidden] and .is-open; field styles come from booking.css (.r-form). */

.r-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(3, 6, 18, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s ease;
}
.r-modal[hidden] { display: none; }
.r-modal.is-open { opacity: 1; }

.r-modal__card {
  position: relative;
  width: min(640px, 100%);
  padding: 48px 48px 40px;
  border-radius: 28px;
  background: linear-gradient(109.52deg, #1e2c68 25.32%, #0c1434 61.93%, #03050e 81.48%);
  box-shadow: 0 30px 40px rgba(0, 0, 0, .45);
  color: #fff;
  transform: translateY(24px) scale(.98);
  transition: transform .45s var(--r-ease);
}
.r-modal.is-open .r-modal__card { transform: none; }

.r-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background .2s, transform .3s var(--r-ease);
}
.r-modal__close:hover { background: rgba(255, 255, 255, .08); transform: rotate(90deg); }
.r-modal__close img { width: 44px; height: 44px; }

.r-modal__body, .r-modal__form, .r-modal__done { display: flex; flex-direction: column; gap: 20px; }
.r-modal__body[hidden], .r-modal__done[hidden] { display: none; }
.r-modal__done { align-items: center; text-align: center; padding: 16px 0 0; animation: r-popups-rise .5s var(--r-ease) both; }
.r-modal__done .r-form__submit { width: 100%; }

/* Staggered entrance of the content */
.r-modal.is-open .r-modal__body > * { animation: r-popups-rise .6s var(--r-ease) both; }
.r-modal.is-open .r-modal__body > :nth-child(2) { animation-delay: .05s; }
.r-modal.is-open .r-modal__body > :nth-child(3) { animation-delay: .1s; }
.r-modal.is-open .r-modal__body > :nth-child(4) { animation-delay: .15s; }
@keyframes r-popups-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.r-modal__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/normal var(--r-font);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #dcc088;
}
.r-modal__eyebrow::before { content: ""; width: 26px; height: 1px; background: #dcc088; flex: none; }
.r-modal__eyebrow--center { justify-content: center; }
.r-modal__title { font: 300 52px/1.04 var(--r-font-head); letter-spacing: -.025em; color: #fff; white-space: nowrap; }
.r-modal__title em { font-style: normal; color: #e3c98f; }
.r-modal__text { font: 300 16px/1.5 var(--r-font); color: rgba(255, 255, 255, .7); }

.r-modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r-modal__full { grid-column: 1 / -1; }
.r-modal__submit { width: 100%; }
.r-modal__form .r-form__error { margin-top: -8px; text-align: center; }
.r-modal__note { font: 300 14px/normal var(--r-font); color: rgba(255, 255, 255, .55); text-align: center; }
.r-modal__note a { color: inherit; }

@media (max-width: 767px) {
  .r-modal { padding: 12px; align-items: end; }
  .r-modal__card { padding: 40px 20px 28px; border-radius: 24px; transform: translateY(48px); background: linear-gradient(100deg, #1e2c68 25.32%, #0c1434 61.93%, #03050e 81.48%); }
  .r-modal__close { top: 12px; right: 12px; }
  .r-modal__body, .r-modal__form, .r-modal__done { gap: 16px; }
  .r-modal__title { font-size: 36px; padding-right: 36px; white-space: normal; }
  .r-modal__text { font-size: 15px; }
  .r-modal__grid { grid-template-columns: 1fr; }
  .r-modal__grid .r-form__input, .r-modal__grid .r-form__stepper, .r-modal__submit { height: 54px; }
}
