/**
 * TrovTrace Social Proof Notifications
 *
 * Styles for the social proof popup notification system.
 *
 * @package TrovTrace
 */

/* ==========================================================================
   Container
   ========================================================================== */

.trovtrace-social-proof {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    max-width: 100%;
}

.trovtrace-social-proof--bottom-left {
    bottom: 24px;
    left: 24px;
}

.trovtrace-social-proof--bottom-right {
    bottom: 24px;
    right: 24px;
}

/* ==========================================================================
   Notification Card
   ========================================================================== */

.trovtrace-social-proof__notification {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    padding: 16px 20px;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateY(100%) scale(0.95);
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible state - slide in */
.trovtrace-social-proof__notification.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Hiding state - slide out */
.trovtrace-social-proof__notification.is-hiding {
    transform: translateY(100%) scale(0.95);
    opacity: 0;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 1, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 1, 1);
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.trovtrace-social-proof__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary, #1B4D7A), var(--color-primary-dark, #0f3554));
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Content
   ========================================================================== */

.trovtrace-social-proof__content {
    flex: 1;
    min-width: 0;
}

.trovtrace-social-proof__text {
    font-size: 14px;
    color: #1a1a2e;
    line-height: 1.4;
    margin: 0;
}

.trovtrace-social-proof__text strong {
    font-weight: 600;
    color: var(--color-primary, #1B4D7A);
}

.trovtrace-social-proof__time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trovtrace-social-proof__time::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: trovtrace-pulse 2s infinite;
}

/* ==========================================================================
   Close Button
   ========================================================================== */

.trovtrace-social-proof__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    opacity: 0;
}

.trovtrace-social-proof__notification:hover .trovtrace-social-proof__close {
    opacity: 1;
}

.trovtrace-social-proof__close:hover {
    background: #f3f4f6;
    color: #374151;
}

.trovtrace-social-proof__close:focus {
    outline: 2px solid var(--color-primary, #1B4D7A);
    outline-offset: 2px;
    opacity: 1;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes trovtrace-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .trovtrace-social-proof__notification {
        transition: none;
        transform: none;
    }

    .trovtrace-social-proof__notification.is-visible {
        transform: none;
        opacity: 1;
    }

    .trovtrace-social-proof__notification.is-hiding {
        transform: none;
        opacity: 0;
        transition: none;
    }

    .trovtrace-social-proof__time::before {
        animation: none;
    }
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .trovtrace-social-proof--bottom-left,
    .trovtrace-social-proof--bottom-right {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .trovtrace-social-proof__notification {
        max-width: 100%;
        padding: 12px 16px;
        border-radius: 10px;
    }

    .trovtrace-social-proof__text {
        font-size: 13px;
    }

    .trovtrace-social-proof__avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 12px;
    }

    .trovtrace-social-proof__close {
        opacity: 1;
    }
}
