/* =====================================================
   Engaged Live — Frontend Widgets CSS
   ===================================================== */

/* ── Positioning helpers ── */
.el-pos-bottom-left  { bottom: 20px; left: 20px; }
.el-pos-bottom-right { bottom: 20px; right: 20px; }

/* ── Announcement Bar ── */
.el-announcement-bar {
    position: relative;
    left: 0;
    right: 0;
    z-index: 99999;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
}
.el-announcement-bar.el-ab-pos-bottom { top: auto; }

.el-ab-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}
.el-ab-emoji { margin-right: 2px; }

.el-ab-link {
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.el-ab-cta {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.el-ab-cta:hover { transform: scale(1.04); opacity: 0.92; }

.el-ab-countdown-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}
.el-ab-countdown {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.el-ab-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    line-height: 1;
    color: inherit;
    padding: 4px 6px;
    z-index: 2;
}
.el-ab-close:hover { opacity: 1; }

/* Slide-in animation */
.el-ab-slide { animation: el-ab-slide-in 0.4s ease; }
@keyframes el-ab-slide-in {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
.el-ab-pos-bottom.el-ab-slide { animation-name: el-ab-slide-in-bottom; }
@keyframes el-ab-slide-in-bottom {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Fade-in animation */
.el-ab-fade { animation: el-ab-fade-in 0.5s ease; }
@keyframes el-ab-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Marquee animation */
.el-ab-marquee .el-ab-track {
    display: flex;
    width: max-content;
    animation: el-ab-marquee-scroll 18s linear infinite;
}
.el-ab-marquee .el-ab-track-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-right: 60px;
    white-space: nowrap;
}
@keyframes el-ab-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.el-ab-marquee .el-ab-inner { justify-content: flex-start; }
.el-ab-marquee:hover .el-ab-track { animation-play-state: paused; }

/* ── Social Proof popup ── */
.el-social-proof {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 280px;
    animation: el-slideup 0.35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@keyframes el-slideup {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.el-sp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.el-sp-content { flex: 1; }
.el-sp-name    { font-weight: 600; font-size: 13px; margin: 0 0 2px; color: #111; }
.el-sp-action  { font-size: 12px; color: #374151; margin: 0 0 2px; }
.el-sp-time    { font-size: 11px; color: #9ca3af; margin: 0; }
.el-sp-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.el-sp-close:hover { color: #374151; }

/* ── Live Visitor Count ── */
.el-live-visitors {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 99px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #374151;
}
.el-lv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: el-pulse 2s infinite;
    flex-shrink: 0;
}
@keyframes el-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
.el-lv-count { font-weight: 700; color: #111; }

/* ── Trust Badges ── */
.el-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.el-trust-inline { justify-content: center; padding: 12px 0; }
.el-badge {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #374151;
    white-space: nowrap;
}

/* ── Exit Intent Popup ── */
.el-exit-intent {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.el-ei-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.el-ei-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: el-modal-in 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@keyframes el-modal-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.el-ei-modal h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}
.el-ei-modal p {
    font-size: 16px;
    color: #4b5563;
    margin: 0 0 24px;
    line-height: 1.6;
}
.el-ei-cta {
    display: inline-block;
    background: #111;
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s;
}
.el-ei-cta:hover { background: #333; color: #fff; }
.el-ei-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #9ca3af;
    line-height: 1;
    padding: 4px;
}
.el-ei-close:hover { color: #374151; }
