/* FlowCraft Smart Popup — style.css
   Positioning and motion for the popup. Tailwind classes handle the
   inside; this file places it on screen as a centred dialog on computers
   and a bottom panel on phones (app.js adds .is-sheet there). */

.fc-popup[hidden], .fc-popup [hidden] { display: none !important; }

.fc-popup { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fc-popup-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); opacity: 0; transition: opacity 250ms ease; }
.fc-popup-dialog {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px); overflow-y: auto;
  border-radius: 24px; opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity 250ms ease, transform 250ms ease;
}
.fc-popup.is-open .fc-popup-overlay { opacity: 1; }
.fc-popup.is-open .fc-popup-dialog { opacity: 1; transform: none; }

/* Two columns on computers: image left, offer right */
.fc-popup-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .fc-popup-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.fc-popup-media { height: 150px; }
@media (min-width: 768px) { .fc-popup-media { height: auto; min-height: 100%; } }

/* Phones: a panel that slides up from the bottom. No dark cover, and the
   page behind stays scrollable, so the content isn't blocked. */
.fc-popup.is-sheet { inset: auto 0 0 0; padding: 0; align-items: flex-end; pointer-events: none; }
.fc-popup.is-sheet .fc-popup-overlay { display: none; }
.fc-popup.is-sheet .fc-popup-dialog {
  pointer-events: auto; max-width: none; max-height: 80vh; border-radius: 24px 24px 0 0;
  transform: translateY(100%); box-shadow: 0 -12px 40px rgba(15, 23, 42, .25);
}
.fc-popup.is-sheet.is-open .fc-popup-dialog { transform: none; }
.fc-popup.is-sheet .fc-popup-media { height: 110px; }

/* While the desktop dialog is open, the page behind doesn't scroll */
html.popup-scroll-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .fc-popup-overlay, .fc-popup-dialog { transition: none; }
}
