/**
 * WP Auth Badge - 前端样式
 * Version: 1.0.0
 */

/* ====== 基础徽章样式 ====== */
.wab-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    text-decoration: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.wab-badge:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.wab-badge a,
.wab-badge:link,
.wab-badge:visited {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ====== 行内图标样式 ====== */
.wab-badge-inline {
    gap: 2px;
}

.wab-badge-inline .wab-badge-icon {
    border-radius: 50%;
    object-fit: contain;
}

.wab-badge-inline .wab-badge-text {
    font-weight: 500;
    line-height: 1;
}

/* ====== 徽章样式 ====== */
.wab-badge-badge {
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
    line-height: 1.4;
    font-weight: 500;
}

.wab-badge-badge .wab-badge-icon {
    border-radius: 50%;
    object-fit: contain;
}

/* ====== 卡片样式 ====== */
.wab-badge-card {
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    max-width: 300px;
    transition: box-shadow 0.2s ease;
}

.wab-badge-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wab-badge-card .wab-badge-icon {
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: contain;
}

.wab-badge-card-content {
    min-width: 0;
    overflow: hidden;
}

.wab-badge-card-title {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}

.wab-badge-card-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ====== 用户资料页认证区域 ====== */
.wab-profile-badges {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.wab-profile-badges h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.wab-profile-badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ====== 评论区域徽章 ====== */
.comment-author .wab-badge {
    margin-left: 4px;
}

/* ====== 文章区域徽章 ====== */
.author .wab-badge,
.fn .wab-badge {
    margin-left: 4px;
}

/* ====== Widget 样式 ====== */
.wab-widget-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ====== 用户认证列表样式 ====== */
.wab-user-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wab-user-badges-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ====== 认证类型列表样式 ====== */
.wab-badge-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ====== 动画 ====== */
@keyframes wab-badge-appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wab-badge {
    animation: wab-badge-appear 0.3s ease;
}

/* ====== 响应式 ====== */
@media (max-width: 480px) {
    .wab-badge-card {
        max-width: 100%;
    }

    .wab-badge-type-list {
        flex-direction: column;
    }
}
