/* ========================================
   会员客服中心 - 无感刷新样式
   ======================================== */

/* 客服列表项 */
.sr-staff-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.sr-staff-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.sr-staff-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* 在线状态 */
.sr-staff-item.sr-online {
    border-color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(46, 204, 113, 0.02));
}

.sr-staff-item.sr-offline {
    opacity: 0.75;
}

/* 头像 */
.sr-staff-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sr-staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 32px;
    font-weight: bold;
}

/* 在线指示器 */
.sr-status-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    bottom: 0;
    right: 0;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sr-status-indicator.sr-online {
    background: #2ecc71;
    animation: sr-pulse-online 2s ease-in-out infinite;
}

.sr-status-indicator.sr-offline {
    background: #95a5a6;
}

@keyframes sr-pulse-online {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    50% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(46, 204, 113, 0);
    }
}

/* 客服信息 */
.sr-staff-info {
    flex: 1;
    margin-bottom: 15px;
}

.sr-staff-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.sr-staff-info small {
    color: #7f8c8d;
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
}

.sr-status-text {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.sr-staff-item.sr-online .sr-status-text {
    background: #d4f5d4;
    color: #27ae60;
}

.sr-staff-item.sr-offline .sr-status-text {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* 联系按钮 */
.sr-contact-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sr-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sr-contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sr-staff-item.sr-offline .sr-contact-btn {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 在线人数统计 */
.sr-online-count {
    display: inline-block;
    padding: 4px 12px;
    background: #d4f5d4;
    color: #27ae60;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 10px;
}

/* 会员端通知 */
.sr-member-notification {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 350px;
    min-width: 280px;
    opacity: 0;
    transform: translateX(-400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.sr-member-notification.sr-show {
    opacity: 1;
    transform: translateX(0);
}

.sr-member-notify-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
}

.sr-notify-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: sr-bounce-notif 0.6s ease-in-out infinite;
}

@keyframes sr-bounce-notif {
    0%, 100% { transform: translateY(0) rotateZ(0deg); }
    50% { transform: translateY(-8px) rotateZ(10deg); }
}

.sr-notify-text {
    flex: 1;
}

.sr-notify-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
}

.sr-notify-text small {
    display: block;
    opacity: 0.9;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sr-staff-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px 0;
    }

    .sr-staff-item {
        padding: 15px;
    }

    .sr-staff-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .sr-staff-info h4 {
        font-size: 14px;
    }

    .sr-contact-btn {
        padding: 8px;
        font-size: 12px;
    }

    .sr-member-notification {
        bottom: 15px;
        left: 15px;
        right: 15px;
        max-width: none;
        min-width: auto;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .sr-staff-item {
        background: #2c3e50;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .sr-staff-item:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    }

    .sr-staff-info h4 {
        color: #ecf0f1;
    }

    .sr-staff-info small {
        color: #bdc3c7;
    }

    .sr-member-notification {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

/* 动画过渡 */
@keyframes sr-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 加载骨架屏 */
.sr-staff-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: sr-loading 1.5s infinite;
}

@keyframes sr-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 通知数字红点 */
.sr-notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: sr-pulse 2s ease-in-out infinite;
}

@keyframes sr-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}
