/**
 * 分类订阅功能样式
 * Category Subscribe Styles
 */

/* 订阅按钮基础样式 */
.btn-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-subscribe:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.btn-subscribe svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* 已订阅状态 */
.btn-subscribe.subscribed {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.btn-subscribe.subscribed:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.btn-subscribe.subscribed svg {
    stroke: #4caf50;
}

.btn-subscribe.subscribed:hover svg {
    stroke: #f44336;
}

/* 加载状态 */
.btn-subscribe.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-subscribe.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: subscribe-spin 0.6s linear infinite;
}

@keyframes subscribe-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示消息样式 */
.subscribe-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.subscribe-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.subscribe-message-success {
    background: #4caf50;
}

.subscribe-message-error {
    background: #f44336;
}

.subscribe-message-info {
    background: #2196f3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .btn-subscribe {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .subscribe-message {
        top: 60px;
        max-width: 90%;
        font-size: 13px;
    }
}

/* 统计信息中的订阅数量样式 */
.category-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.category-stats .stat-item svg {
    flex-shrink: 0;
}
