/*!
 * acg-faka 购买通知弹窗插件 - 样式
 * 版本: 1.0.0
 */

/* 容器：固定在右下角 */
.purchase-popup-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 40px);
}

/* 单条通知 */
.purchase-popup-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(122, 140, 255, 0.15);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 左侧装饰条 */
.purchase-popup-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #7a8cff, #b88cff);
}

/* 进入动画 */
.purchase-popup-item.purchase-popup-enter {
    opacity: 1;
    transform: translateX(0);
}

/* 离开动画 */
.purchase-popup-item.purchase-popup-leaving {
    opacity: 0;
    transform: translateX(120%);
}

/* 头像 */
.purchase-popup-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7a8cff, #b88cff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(122, 140, 255, 0.35);
}

/* 内容区 */
.purchase-popup-body {
    flex: 1;
    min-width: 0;
}

.purchase-popup-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    word-break: break-all;
}

.purchase-popup-phone {
    font-weight: 700;
    color: #1f2937;
}

.purchase-popup-location {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.purchase-popup-num {
    font-weight: 700;
    color: #ff6b88;
}

.purchase-popup-goods {
    color: #7a8cff;
    font-weight: 600;
}

.purchase-popup-time {
    font-size: 11px;
    color: #10b981;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* 关闭按钮 */
.purchase-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 0;
    transition: all 0.2s ease;
}

.purchase-popup-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #4b5563;
}

/* 移动端适配 */
@media (max-width: 575.98px) {
    .purchase-popup-container {
        right: 10px;
        bottom: 10px;
        left: 10px;
        max-width: none;
        width: auto;
        gap: 8px;
    }

    .purchase-popup-item {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .purchase-popup-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .purchase-popup-text {
        font-size: 12px;
    }

    .purchase-popup-time {
        font-size: 10px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .purchase-popup-item {
        transition: opacity 0.01ms ease;
        transform: none;
    }
    .purchase-popup-item.purchase-popup-enter {
        transform: none;
    }
    .purchase-popup-item.purchase-popup-leaving {
        transform: none;
    }
}
