/* Homepage WhatsApp / Naturista Pranaa Sathkara popup (shown once per day) */
/* ── Overlay ── */
.wa-popup-overlay {
   position: fixed;
   inset: 0;
   z-index: 100000;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 16px;
   overflow-y: auto; /* last resort for very short screens – the card itself never scrolls */
   background: rgba(7, 30, 22, .72);
   backdrop-filter: blur(4px);
   -webkit-backdrop-filter: blur(4px);
   opacity: 0;
   visibility: hidden;
   pointer-events: none; /* never blocks the page while fading out */
   /* fade-out: opacity eases out, then visibility flips at the very end */
   transition: opacity .6s ease, visibility 0s linear .6s;
}
.wa-popup-overlay[hidden] { display: none; }
.wa-popup-overlay.active {
   opacity: 1;
   visibility: visible;
   pointer-events: auto;
   transition: opacity .4s ease, visibility 0s;
}
.wa-popup-overlay .wa-community-card {
   transform: scale(.92);
   transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.wa-popup-overlay.active .wa-community-card {
   transform: none;
   transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

/* ── Auto-close progress bar ── */
.wa-autoclose-bar {
   position: absolute;
   left: 0;
   bottom: 0;
   height: 4px;
   width: 100%;
   background: rgba(255, 255, 255, .75);
   transform-origin: left center;
   transform: scaleX(1);
}
.wa-popup-overlay.active .wa-autoclose-bar {
   animation: waAutoClose var(--wa-autoclose, 5s) linear forwards;
}
.wa-popup-overlay.paused .wa-autoclose-bar { animation-play-state: paused; }
@keyframes waAutoClose { from { transform: scaleX(1); } to { transform: scaleX(0); } }
body.wa-popup-open { overflow: hidden; }

/* ── Card ── */
.wa-community-card {
   position: relative;
   overflow: hidden;
   width: 100%;
   max-width: 520px;
   margin: auto;
   padding: 40px 32px 26px;
   text-align: center;
   border-radius: 28px;
   color: #fff;
   background: linear-gradient(135deg, #0b4d3a 0%, #1f8f5f 55%, #25d366 100%);
   box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
   isolation: isolate;
}
.wa-blob {
   position: absolute;
   border-radius: 50%;
   background: rgba(255, 255, 255, .09);
   z-index: -1;
}
.wa-blob-1 { width: 280px; height: 280px; top: -110px; right: -80px; }
.wa-blob-2 { width: 200px; height: 200px; bottom: -90px; left: -60px; }

/* ── Close (X) ── */
.wa-popup-close {
   position: absolute;
   top: 14px;
   right: 14px;
   z-index: 2;
   width: 38px;
   height: 38px;
   display: flex;
   align-items: center;
   justify-content: center;
   border: 0;
   border-radius: 50%;
   font-size: 16px;
   color: #fff;
   background: rgba(255, 255, 255, .18);
   cursor: pointer;
   transition: background .2s, transform .2s;
}
.wa-popup-close:hover,
.wa-popup-close:focus-visible { background: rgba(255, 255, 255, .35); transform: rotate(90deg); outline: none; }

.wa-icon-wrap {
   width: 72px;
   height: 72px;
   margin: 0 auto 16px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 40px;
   color: #25d366;
   background: #fff;
   box-shadow: 0 0 0 10px rgba(255, 255, 255, .18);
   animation: waPulse 2.4s ease-in-out infinite;
}
.wa-community-text {
   margin: 0 auto 20px;
   font-family: 'Noto Sans Sinhala', 'Iskoola Pota', 'Nirmala UI', sans-serif;
   font-size: 17px;
   font-weight: 700;
   line-height: 1.6;
   color: #fff;
}
.wa-points {
   margin: 0 auto 22px;
   padding: 0;
   list-style: none;
   text-align: left;
   display: flex;
   flex-direction: column;
   gap: 10px;
}
.wa-points li {
   padding: 10px 14px;
   font-family: 'Noto Sans Sinhala', 'Iskoola Pota', 'Nirmala UI', sans-serif;
   font-size: 14.5px;
   font-weight: 500;
   line-height: 1.6;
   color: #fff;
   border-radius: 14px;
   background: rgba(255, 255, 255, .14);
   border: 1px solid rgba(255, 255, 255, .22);
}
.wa-brand {
   display: inline-block;
   padding: 2px 12px;
   margin-bottom: 4px;
   font-family: inherit;
   font-size: 14px;
   font-weight: 700;
   letter-spacing: .3px;
   border-radius: 50px;
   background: rgba(255, 255, 255, .18);
   border: 1px solid rgba(255, 255, 255, .3);
}
.wa-join-btn {
   display: inline-flex;
   align-items: center;
   gap: 12px;
   padding: 13px 30px;
   font-size: 16px;
   font-weight: 700;
   color: #128c4a;
   text-decoration: none;
   background: #fff;
   border-radius: 60px;
   box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
   transition: transform .25s, box-shadow .25s, background .25s, color .25s;
}
.wa-join-btn .fa-whatsapp { font-size: 26px; color: #25d366; transition: color .25s; }
.wa-join-arrow { font-size: 14px; transition: transform .25s; }
.wa-join-btn:hover,
.wa-join-btn:focus-visible {
   color: #fff;
   background: #25d366;
   transform: translateY(-3px);
   box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
}
.wa-join-btn:hover .fa-whatsapp,
.wa-join-btn:focus-visible .fa-whatsapp { color: #fff; }
.wa-join-btn:hover .wa-join-arrow { transform: translateX(5px); }
.wa-note {
   margin: 12px 0 0;
   font-size: 12.5px;
   color: rgba(255, 255, 255, .85);
}
.wa-note i { margin-right: 4px; }
@keyframes waPulse {
   0%, 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .18); }
   50%      { box-shadow: 0 0 0 18px rgba(255, 255, 255, .08); }
}
@media (prefers-reduced-motion: reduce) {
   .wa-icon-wrap { animation: none; }
   .wa-popup-overlay, .wa-popup-overlay.active,
   .wa-popup-overlay .wa-community-card, .wa-popup-overlay.active .wa-community-card,
   .wa-join-btn, .wa-join-arrow, .wa-popup-close { transition-duration: .01s; }
}
@media (max-width: 575px) {
   .wa-community-card { padding: 36px 18px 22px; border-radius: 22px; }
   .wa-community-text { font-size: 15.5px; }
   .wa-points li { font-size: 13.5px; padding: 8px 12px; }
   .wa-join-btn { padding: 12px 24px; font-size: 15px; }
}
/* Short screens (e.g. landscape phones / small laptops): compact everything */
@media (max-height: 640px) {
   .wa-community-card { padding: 28px 24px 18px; }
   .wa-icon-wrap { width: 56px; height: 56px; margin-bottom: 10px; font-size: 30px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); animation: none; }
   .wa-community-text { margin-bottom: 10px; font-size: 14.5px; line-height: 1.5; }
   .wa-points { gap: 6px; margin-bottom: 14px; }
   .wa-points li { padding: 6px 10px; font-size: 12.5px; line-height: 1.45; }
   .wa-join-btn { padding: 10px 22px; font-size: 15px; }
   .wa-join-btn .fa-whatsapp { font-size: 22px; }
   .wa-note { margin-top: 8px; }
}
@media (max-height: 460px) {
   .wa-note { display: none; }
   .wa-icon-wrap { display: none; } /* frees vertical space so the card never needs a scrollbar */
}
