/* =========================================================
   Social Proof – Frontend Popup
   ========================================================= */

.social-proof-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

/* Positions */
.social-proof-container.sp-bottom-left  { bottom: 20px; left: 20px;  }
.social-proof-container.sp-bottom-right { bottom: 20px; right: 20px; }
.social-proof-container.sp-top-left     { top: 20px;    left: 20px;  }
.social-proof-container.sp-top-right    { top: 20px;    right: 20px; }

/* Notification card */
.sp-notification {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 340px;
    min-width: 280px;
    pointer-events: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    opacity: 0;
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.4s ease;
}

/* Slide-in from right for right-side positions */
.sp-bottom-right .sp-notification,
.sp-top-right .sp-notification {
    transform: translateX(120%);
}

/* Visible state */
.sp-notification.sp-show {
    transform: translateX(0);
    opacity: 1;
}

/* Hide state */
.sp-notification.sp-hide {
    opacity: 0;
}
.sp-bottom-left .sp-notification.sp-hide,
.sp-top-left .sp-notification.sp-hide {
    transform: translateX(-120%);
}
.sp-bottom-right .sp-notification.sp-hide,
.sp-top-right .sp-notification.sp-hide {
    transform: translateX(120%);
}

/* Close button */
.sp-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 16px;
    color: #999;
    line-height: 1;
    padding: 0;
}
.sp-notification:hover .sp-close-btn {
    opacity: 1;
}
.sp-close-btn:hover {
    color: #333;
}

/* Avatar (Gravatar image) */
.sp-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Monogram fallback */
.sp-monogram {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    user-select: none;
}

/* Content */
.sp-body {
    flex: 1;
    min-width: 0;
}

.sp-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sp-message {
    font-size: 13px;
    color: #555;
    margin: 0 0 2px;
    line-height: 1.3;
}

.sp-location {
    font-size: 11px;
    color: #999;
    margin: 0;
    line-height: 1.3;
}

.sp-time {
    font-size: 11px;
    color: #bbb;
    margin: 2px 0 0;
    line-height: 1.3;
}

/* Hide on mobile when configured */
.social-proof-container.sp-hide-mobile {
    /* JS adds this class; CSS hides it at the breakpoint */
}

@media (max-width: 480px) {
    .social-proof-container.sp-hide-mobile {
        display: none !important;
    }

    .sp-notification {
        max-width: calc(100vw - 40px);
        min-width: 260px;
    }

    .social-proof-container.sp-bottom-left,
    .social-proof-container.sp-bottom-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .social-proof-container.sp-top-left,
    .social-proof-container.sp-top-right {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}
