/* =========================================================
   LUNÉA Premium Checkout Popup
   Namespaced to avoid conflicts with the landing page.
========================================================= */

:root{
  --lunea-navy:#10253e;
  --lunea-blue:#2563eb;
  --lunea-blue-dark:#1d4ed8;
  --lunea-blue-soft:#eff6ff;
  --lunea-gold:#b98935;
  --lunea-surface:#ffffff;
  --lunea-border:#e5eaf2;
  --lunea-muted:#687386;
  --lunea-danger:#c62828;
  --lunea-success:#0f8a5f;
}

body.lunea-lock{
  overflow:hidden;
  touch-action:none;
}

.lunea-modal,
.lunea-modal *{
  box-sizing:border-box;
}

.lunea-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:20px;
  direction:rtl;
  font-family:Manrope,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--lunea-navy);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .26s ease,visibility .26s ease;
}

.lunea-modal.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.lunea-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgba(9,24,44,.56);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  cursor:default;
}

.lunea-dialog{
  position:relative;
  z-index:1;
  width:min(100%,620px);
  max-height:min(92dvh,920px);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.64);
  border-radius:30px;
  background:rgba(255,255,255,.97);
  box-shadow:0 34px 100px rgba(8,24,48,.28);
  transform:translateY(22px) scale(.975);
  transition:transform .3s cubic-bezier(.2,.8,.2,1);
}

.lunea-modal.is-open .lunea-dialog{
  transform:translateY(0) scale(1);
}

.lunea-drag-handle{display:none}

.lunea-popup-header{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:76px;
  padding:15px 20px;
  border-bottom:1px solid rgba(16,37,62,.07);
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.lunea-popup-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1;
  direction:ltr;
}

.lunea-popup-brand strong{
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:32px;
  font-weight:600;
  letter-spacing:2.4px;
}

.lunea-popup-brand span{
  margin-top:5px;
  color:var(--lunea-muted);
  font-size:9px;
  font-weight:700;
  letter-spacing:2px;
}

.lunea-close{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid var(--lunea-border);
  border-radius:50%;
  background:#fff;
  color:var(--lunea-navy);
  cursor:pointer;
  box-shadow:0 7px 18px rgba(16,37,62,.07);
  transition:transform .2s ease,border-color .2s ease,background .2s ease;
}

.lunea-close:hover{
  border-color:#cbd6e6;
  background:#f7f9fc;
  transform:rotate(4deg);
}

.lunea-close:active{transform:scale(.94)}

.lunea-close svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
}

.lunea-popup-scroll{
  max-height:calc(min(92dvh,920px) - 76px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:25px 25px 28px;
  scrollbar-width:thin;
  scrollbar-color:#ccd7e8 transparent;
}

.lunea-intro{
  margin-bottom:24px;
  text-align:center;
}

.lunea-kicker{
  display:inline-flex;
  align-items:center;
  min-height:29px;
  padding:5px 11px;
  border-radius:999px;
  background:var(--lunea-blue-soft);
  color:var(--lunea-blue-dark);
  font-size:12px;
  font-weight:800;
}

.lunea-intro h2,
.lunea-success h2{
  margin:10px 0 7px;
  font-size:30px;
  line-height:1.25;
  letter-spacing:-.4px;
}

.lunea-intro p,
.lunea-success p{
  margin:0 auto;
  max-width:440px;
  color:var(--lunea-muted);
  font-size:14px;
  line-height:1.8;
}

.lunea-fieldset{
  min-width:0;
  margin:0 0 23px;
  padding:0;
  border:0;
}

.lunea-fieldset legend{
  width:100%;
  margin-bottom:12px;
  font-size:15px;
  font-weight:800;
}

.lunea-offers{
  display:grid;
  gap:11px;
}

.lunea-offer{
  position:relative;
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:82px;
  padding:15px 17px;
  border:1.5px solid var(--lunea-border);
  border-radius:20px;
  background:#fff;
  color:var(--lunea-navy);
  text-align:right;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(16,37,62,.035);
  transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease;
}

.lunea-offer:hover{
  transform:translateY(-1px);
  border-color:#bed0f7;
  box-shadow:0 12px 28px rgba(37,99,235,.08);
}

.lunea-offer.is-selected{
  border-color:var(--lunea-blue);
  background:linear-gradient(135deg,#f7fbff,#edf5ff);
  box-shadow:0 13px 30px rgba(37,99,235,.13);
}

.lunea-offer-check{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border:1.5px solid #c8d2e0;
  border-radius:50%;
  background:#fff;
}

.lunea-offer.is-selected .lunea-offer-check{
  border:6px solid var(--lunea-blue);
}

.lunea-offer-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:4px;
}

.lunea-offer-copy strong{
  font-size:16px;
  font-weight:800;
}

.lunea-offer-copy small{
  overflow:hidden;
  color:var(--lunea-muted);
  font-size:12px;
  line-height:1.45;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.lunea-offer-price{
  display:flex;
  align-items:baseline;
  gap:4px;
  direction:rtl;
  white-space:nowrap;
}

.lunea-offer-price b{
  color:var(--lunea-blue-dark);
  font-size:24px;
  font-weight:800;
}

.lunea-offer-price small{
  color:var(--lunea-muted);
  font-size:11px;
  font-weight:700;
}

.lunea-badge{
  position:absolute;
  top:-9px;
  left:14px;
  padding:5px 10px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--lunea-blue),var(--lunea-blue-dark));
  color:#fff;
  font-size:10px;
  font-weight:800;
  box-shadow:0 7px 17px rgba(37,99,235,.23);
}

.lunea-badge-gold{
  background:linear-gradient(180deg,#c99a43,#a97926);
  box-shadow:0 7px 17px rgba(185,137,53,.22);
}

.lunea-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px;
}

.lunea-input-wrap{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:7px;
}

.lunea-input-wrap:last-child{grid-column:1/-1}

.lunea-input-wrap > span{
  font-size:13px;
  font-weight:800;
}

.lunea-input-wrap input,
.lunea-input-wrap textarea{
  width:100%;
  min-height:54px;
  border:1.5px solid var(--lunea-border);
  border-radius:16px;
  outline:none;
  background:#fff;
  color:var(--lunea-navy);
  font:600 15px/1.5 Manrope,system-ui,sans-serif;
  text-align:right;
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.lunea-input-wrap input{padding:0 15px}

.lunea-input-wrap textarea{
  min-height:90px;
  padding:13px 15px;
  resize:vertical;
}

.lunea-input-wrap input::placeholder,
.lunea-input-wrap textarea::placeholder{
  color:#a4adba;
  font-weight:500;
}

.lunea-input-wrap input:focus,
.lunea-input-wrap textarea:focus{
  border-color:var(--lunea-blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.1);
  background:#fcfdff;
}

.lunea-input-wrap.is-invalid input,
.lunea-input-wrap.is-invalid textarea{
  border-color:var(--lunea-danger);
  box-shadow:0 0 0 4px rgba(198,40,40,.08);
}

.lunea-error{
  min-height:16px;
  color:var(--lunea-danger);
  font-size:11px;
  font-weight:700;
}

.lunea-summary{
  margin:1px 0 18px;
  padding:18px;
  border:1px solid var(--lunea-border);
  border-radius:20px;
  background:linear-gradient(145deg,#fff,#f7faff);
}

.lunea-summary-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  padding-bottom:12px;
  border-bottom:1px dashed #d9e1ec;
}

.lunea-summary-head h3{
  margin:0;
  font-size:15px;
}

.lunea-summary-head > span{
  padding:5px 9px;
  border-radius:999px;
  background:#edf8f3;
  color:var(--lunea-success);
  font-size:10px;
  font-weight:800;
}

.lunea-summary-row,
.lunea-summary-total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}

.lunea-summary-row{
  padding:7px 0;
  color:#526176;
  font-size:13px;
}

.lunea-summary-row strong{color:var(--lunea-navy)}
.lunea-free{color:var(--lunea-success)!important}

.lunea-summary-total{
  margin-top:9px;
  padding-top:13px;
  border-top:1px solid #dce4ee;
  font-size:16px;
  font-weight:800;
}

.lunea-summary-total strong{
  color:var(--lunea-blue-dark);
  font-size:21px;
}

.lunea-trust{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:17px;
}

.lunea-trust span{
  display:flex;
  align-items:center;
  min-height:38px;
  padding:8px 10px;
  border:1px solid #e5ecf5;
  border-radius:12px;
  background:#fafcff;
  color:#526176;
  font-size:11px;
  font-weight:700;
}

.lunea-submit{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:58px;
  padding:13px 20px;
  overflow:hidden;
  border:0;
  border-radius:999px;
  background:linear-gradient(180deg,#3b82f6,var(--lunea-blue-dark));
  color:#fff;
  font:800 18px/1 Manrope,system-ui,sans-serif;
  cursor:pointer;
  box-shadow:0 15px 38px rgba(37,99,235,.29);
  transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;
}

.lunea-submit::before{
  content:"";
  position:absolute;
  top:0;
  left:-145%;
  width:38%;
  height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);
  transform:skewX(-24deg);
  animation:luneaShine 5.5s linear infinite;
}

.lunea-submit:hover{
  box-shadow:0 19px 44px rgba(37,99,235,.36);
  transform:translateY(-1px);
}

.lunea-submit:active{transform:scale(.98)}

.lunea-submit:disabled{
  cursor:not-allowed;
  opacity:.72;
}

.lunea-submit.is-loading .lunea-submit-label{opacity:0}

.lunea-spinner{
  position:absolute;
  width:24px;
  height:24px;
  border:3px solid rgba(255,255,255,.42);
  border-top-color:#fff;
  border-radius:50%;
  opacity:0;
  animation:luneaSpin .75s linear infinite;
}

.lunea-submit.is-loading .lunea-spinner{opacity:1}

.lunea-privacy{
  margin:11px auto 0;
  max-width:470px;
  color:#8a94a3;
  font-size:10px;
  line-height:1.7;
  text-align:center;
}

.lunea-success{
  padding:35px 10px 28px;
  text-align:center;
}

.lunea-success-icon{
  display:grid;
  place-items:center;
  width:80px;
  height:80px;
  margin:0 auto 17px;
  border-radius:50%;
  background:linear-gradient(145deg,#effcf7,#dff8ed);
  color:var(--lunea-success);
  box-shadow:0 18px 42px rgba(15,138,95,.13);
}

.lunea-success-icon svg{
  width:42px;
  height:42px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.lunea-success-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  max-width:370px;
  margin:24px auto;
  padding:16px 18px;
  border:1px solid var(--lunea-border);
  border-radius:17px;
  background:#fafcff;
}

.lunea-success-card span{
  color:var(--lunea-muted);
  font-size:12px;
}

.lunea-success-card strong{
  direction:ltr;
  color:var(--lunea-blue-dark);
  letter-spacing:.8px;
}

.lunea-secondary{
  min-height:48px;
  padding:10px 22px;
  border:1px solid #d4deeb;
  border-radius:999px;
  background:#fff;
  color:var(--lunea-navy);
  font:800 14px Manrope,system-ui,sans-serif;
  cursor:pointer;
}

@keyframes luneaShine{
  0%{left:-145%}
  18%{left:145%}
  100%{left:145%}
}

@keyframes luneaSpin{
  to{transform:rotate(360deg)}
}

@media(max-width:640px){
  .lunea-modal{
    place-items:end center;
    padding:0;
  }

  .lunea-dialog{
    width:100%;
    max-height:94dvh;
    border:0;
    border-radius:27px 27px 0 0;
    transform:translateY(100%);
  }

  .lunea-modal.is-open .lunea-dialog{transform:translateY(0)}

  .lunea-drag-handle{
    position:absolute;
    top:8px;
    left:50%;
    z-index:8;
    display:block;
    width:42px;
    height:4px;
    border-radius:999px;
    background:#d5dde8;
    transform:translateX(-50%);
  }

  .lunea-popup-header{
    min-height:72px;
    padding:18px 15px 11px;
  }

  .lunea-popup-brand strong{font-size:29px}

  .lunea-popup-scroll{
    max-height:calc(94dvh - 72px);
    padding:20px 15px calc(24px + env(safe-area-inset-bottom));
  }

  .lunea-intro h2,
  .lunea-success h2{font-size:27px}

  .lunea-fields{grid-template-columns:1fr}
  .lunea-input-wrap:last-child{grid-column:auto}
}

@media(max-width:390px){
  .lunea-offer{
    grid-template-columns:23px minmax(0,1fr) auto;
    gap:9px;
    padding:14px 12px;
  }

  .lunea-offer-copy strong{font-size:14px}

  .lunea-offer-copy small{
    max-width:145px;
    font-size:10px;
  }

  .lunea-offer-price b{font-size:21px}
  .lunea-trust{grid-template-columns:1fr}
}

@media(prefers-reduced-motion:reduce){
  .lunea-modal,
  .lunea-dialog,
  .lunea-offer,
  .lunea-close,
  .lunea-submit{
    transition:none!important;
  }

  .lunea-submit::before,
  .lunea-spinner{
    animation:none!important;
  }
}
