/**
 * Wins 销售通知系统样式
 * 版本: 1.0.0
 */

/* 销售通知弹窗样式 */
.sales-notification {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    max-width: 400px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15), 
                0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    opacity: 0;
    transform: translateY(120%) scale(0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.sales-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.sales-notification.hide {
    opacity: 0;
    transform: translateY(120%) scale(0.95);
    pointer-events: none;
}

/* 头像容器 */
.notification-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.1);
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.notification-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 内容区域 */
.notification-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.notification-checkmark {
    color: #10b981;
    font-size: 14px;
    font-weight: bold;
}

.notification-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.notification-message {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.country-flag {
    font-size: 16px;
}

.product-name {
    font-weight: 600;
    color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 右侧按钮组 */
.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 4px;
}

/* 关闭按钮 - 重新设计 */
.notification-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0;
}

.notification-close:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.notification-close:active {
    transform: scale(0.95);
}

/* 信息按钮 - 重新设计 */
.notification-info-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
}

.notification-info-btn:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    border-color: #60a5fa;
    color: #2563eb;
    transform: scale(1.05);
}

.notification-info-btn:active {
    transform: scale(0.95);
}

/* Tooltip 优化 */
.notification-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    padding: 10px 14px;
    background: #1f2937;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.notification-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 7px solid transparent;
    border-top-color: #1f2937;
}

.notification-info-btn:hover .notification-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .sales-notification {
        left: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
        padding: 14px 16px;
        bottom: 80px; /* 避免遮挡底部固定条幅 */
    }
    
    .notification-avatar {
        width: 44px;
        height: 44px;
    }
    
    .notification-message {
        font-size: 13px;
    }
    
    .notification-close,
    .notification-info-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
}

/* 脉冲动画 */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.notification-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    opacity: 0;
    animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
