/**
 * Afriyah Social Proof - Premium UX with Round Edges
 * Beautiful, conversion-focused design with engaging animations
 * Design System: Premium rounded edges, smooth animations, trust-building visuals
 */

/* Design System Variables */
:root {
    --social-primary: #fe4322;
    --social-primary-dark: #005000;
    --social-gradient: linear-gradient(135deg, #fe4322 0%, #005000 100%);
    --social-shadow: 0 8px 30px rgba(0, 100, 0, 0.15);
    --social-shadow-hover: 0 12px 40px rgba(0, 100, 0, 0.25);
    --social-radius: 20px;
    --social-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Notification Container */
.afriyah-social-proof-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: var(--social-radius);
    box-shadow: var(--social-shadow);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    display: none;
    transform: translateX(-120px) scale(0.9);
    transition: var(--social-transition);
    max-width: 400px;
    min-width: 320px;
    border: 1px solid #f0f0f0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-120px) scale(0.9);
    }
    60% {
        transform: translateX(10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.afriyah-social-proof-notification.show {
    opacity: 1;
    visibility: visible;
    display: flex;
    transform: translateX(0) scale(1);
    animation: notificationSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.afriyah-social-proof-notification.hide {
    animation: notificationSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Ensure notification stays hidden when closed */
.afriyah-social-proof-notification[style*="display: none"],
.afriyah-social-proof-notification[style*="display: none !important"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Notification content uses flexbox */
.afriyah-social-proof-notification .notification-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

@keyframes notificationSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-120px) scale(0.9);
    }
}

/* Premium Content Layout */
.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

/* Premium Product Image */
.notification-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--social-radius-small);
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--social-transition);
    display: flex !important; /* Ensure image container is visible */
    align-items: center;
    justify-content: center;
}

.notification-content:hover .notification-image {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--social-radius-small);
    transition: var(--social-transition);
    display: block !important; /* Ensure image is displayed */
}

/* Premium Text Content */
.notification-text {
    flex: 1;
    min-width: 0;
}

.buyer-name {
    font-weight: 700;
    color: var(--social-primary);
    font-size: 16px;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.buyer-name::before {
    content: "✓";
    background: var(--social-gradient);
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 100, 0, 0.3);
}

.product-name {
    color: #1a1a1a;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.location-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.location {
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.location::before {
    content: "📍";
    font-size: 12px;
}

.time {
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.time-text {
    font-weight: 500;
}

/* Premium Close Button */
.notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: var(--social-transition);
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}

.notification-close:hover {
    background: #e0e0e0;
    color: #1a1a1a;
    transform: rotate(90deg) scale(1.1);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Premium Pulse Animation */
.afriyah-social-proof-notification::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--social-gradient);
    border-radius: var(--social-radius);
    z-index: -1;
    opacity: 0;
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.02);
    }
}

/* Mobile Responsive - Premium Design */
@media (max-width: 768px) {
    .afriyah-social-proof-notification {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100vw - 20px);
        min-width: auto;
        padding: 16px 20px;
    }
    
    .notification-image {
        width: 60px;
        height: 60px;
    }
    
    .buyer-name {
        font-size: 15px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .location-time {
        font-size: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
