/* D'Errico Group — "La Cortina" first-visit / returning-visitor popup.
   Scoped entirely under .dg-popup-overlay / .dg-popup so it can never leak into or be
   overridden by unrelated site rules. Reuses the site's own design-system tokens
   (--dark2, --gold, --cream, etc. in :root, css/style.css) rather than a parallel set —
   they're the same oklch ramp under different names, see css/style.css's :root comment. */

.dg-popup-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: oklch(11% 0.01 75 / .62);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: dgPopupFadeIn 300ms var(--ease-out) both;
}
@keyframes dgPopupFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dgPopupSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.dg-popup {
  position: relative; width: 100%; max-width: 560px; box-sizing: border-box;
  background: var(--dark2); border-top: 1px solid var(--gold);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 32px 28px calc(26px + env(safe-area-inset-bottom));
  animation: dgPopupSheetUp 600ms var(--ease-out) both;
  max-height: 90vh; overflow-y: auto;
}
.dg-popup__badge {
  position: absolute; top: -1px; left: 50%; transform: translate(-50%, -50%);
  background: var(--dark2); border: 1px solid var(--gold);
  border-radius: var(--radius-full); width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 12px;
}
.dg-popup__close {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
  background: transparent; border: none; color: var(--muted2); font-size: 20px; line-height: 1;
  border-radius: var(--radius-full); cursor: pointer;
}
.dg-popup__close:hover, .dg-popup__close:focus-visible { color: var(--gold-light); }
[dir="rtl"] .dg-popup__close { right: auto; left: 6px; }

.dg-popup__kicker { font-size: 10px; letter-spacing: .18em; color: var(--gold); margin: 8px 0 10px; }
.dg-popup__title {
  margin: 0 0 18px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: clamp(27px, 5vw, 32px); line-height: 1.15; color: var(--cream);
}
.dg-popup__subtitle { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--muted2); }

.dg-popup__options { display: flex; flex-direction: column; border-top: 1px solid rgba(198,161,91,.22); }
.dg-popup__option {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; box-sizing: border-box; padding: 16px 4px;
  background: transparent; border: none; border-bottom: 1px solid rgba(198,161,91,.22);
  text-align: left; font-family: 'Jost', sans-serif; text-decoration: none; cursor: pointer;
}
[dir="rtl"] .dg-popup__option { text-align: right; }
.dg-popup__option:hover, .dg-popup__option:focus-visible { background: var(--dark3); }
.dg-popup__option-title { display: block; font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--cream); text-transform: uppercase; }
.dg-popup__option-desc { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted2); }
.dg-popup__option-arrow { color: var(--gold); font-size: 16px; flex: none; }
[dir="rtl"] .dg-popup__option-arrow { transform: scaleX(-1); }

.dg-popup__note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted3); }
.dg-popup__back {
  margin-top: 6px; background: transparent; border: none; color: var(--muted3);
  font-size: 12px; letter-spacing: .04em; padding: 12px 4px; font-family: 'Jost', sans-serif; cursor: pointer;
}
.dg-popup__back:hover, .dg-popup__back:focus-visible { color: var(--gold-light); }

.dg-popup__consent { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.dg-popup__consent input { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.dg-popup__consent span { font-size: 12px; line-height: 1.5; color: var(--muted2); }

.dg-popup__submit:disabled { opacity: .45; cursor: not-allowed; }
