/* ============================================================
   AI Smart Ad Injector – Public Styles v2.0
   ============================================================ */

/* ── Reset / Base ────────────────────────────────────────── */
.asai-ad-wrap {
  position: relative;
  display: block;
  margin: 1.5em 0;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.asai-ad-wrap.asai-lazy {
  opacity: 0;
  min-height: 90px;
}

.asai-ad-wrap.asai-loaded {
  opacity: 1;
  animation: asaiFadeIn 0.4s ease;
}

@keyframes asaiFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);  }
}

.asai-ad-inner {
  display: block;
  width: 100%;
  overflow: hidden;
}

/* ── Fallback (adblock detected) ─────────────────────────── */
.asai-fallback-ad {
  background: #f8f8f8;
  border: 1px dashed #ccc;
  padding: 1em 1.5em;
  text-align: center;
  font-size: 0.9em;
  color: #666;
  border-radius: 4px;
}

/* ── Exit-Intent Popup ───────────────────────────────────── */
.asai-popup {
  position: fixed;
  inset: 0;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: asaiFadeIn 0.3s ease;
}

.asai-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}

.asai-popup-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  padding: 2em;
  max-width: 560px;
  width: 92%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: asaiSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes asaiSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.asai-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.asai-popup-close:hover { background: #f0f0f0; color: #333; }

/* ── Sticky Banner (bottom) ──────────────────────────────── */
.asai-sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999980;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 0.6em 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  animation: asaiSlideFromBottom 0.4s ease;
}

@keyframes asaiSlideFromBottom {
  from { transform: translateY(100%); }
  to   { transform: translateY(0);   }
}

.asai-sticky-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #999;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s;
}
.asai-sticky-close:hover { background: #f0f0f0; color: #333; }

/* ── Slide-In ─────────────────────────────────────────────── */
.asai-slide-in {
  position: fixed;
  bottom: 80px;
  right: -400px;
  z-index: 999970;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 24px rgba(0,0,0,0.15);
  padding: 1.2em;
  max-width: 320px;
  transition: right 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

.asai-slide-in--visible { right: 0; }

.asai-slide-close {
  position: absolute;
  top: 8px;
  left: -36px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50% 0 0 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s;
}
.asai-slide-close:hover { background: #f9f9f9; }

/* ── WhatsApp CTA ─────────────────────────────────────────── */
.asai-whatsapp-cta {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999960;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  padding: 10px 18px 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(37,211,102,0.5);
  transition: transform 0.25s, box-shadow 0.25s;
}
.asai-whatsapp-cta:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(37,211,102,0.55);
  color: #fff;
  text-decoration: none;
}

/* ── Image Ad ─────────────────────────────────────────────── */
.asai-image-ad-wrap {
  margin: 0;
  padding: 0;
  display: block;
  text-align: center;
}

.asai-image-ad-link {
  display: inline-block;
  line-height: 0;
  border: 0;
  outline: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.asai-image-ad-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.asai-image-ad {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 4px;
  margin: 0 auto;
}

.asai-image-ad-caption {
  font-size: 0.65rem;
  color: #aaa;
  text-align: center;
  margin: 4px 0 0;
  letter-spacing: 0.03em;
}

/* ── Affiliate links ──────────────────────────────────────── */
.asai-affiliate-link {
  color: inherit;
  border-bottom: 1px dotted currentColor;
  text-decoration: none;
}
.asai-affiliate-link:hover { border-bottom-style: solid; }

/* ── Responsive device visibility ────────────────────────── */
@media (max-width: 767px) {
  .asai-device-desktop { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .asai-device-mobile  { display: none !important; }
  .asai-device-desktop { display: none !important; }
}
@media (min-width: 1025px) {
  .asai-device-mobile { display: none !important; }
  .asai-device-tablet { display: none !important; }
}
