/**
 * CTA认证标签样式
 * 用于在占卜师头像上显示CTA认证标识
 */

/* CTA标签容器 */
.avatar-container {
    position: relative;
    display: inline-block;
}

/* CTA认证标签 */
.cta-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 8px;
    border: 2px solid #FFD700;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    z-index: 10;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: ctaGlow 2s ease-in-out infinite alternate;
}

/* CTA标签发光动画 */
@keyframes ctaGlow {
    from {
        box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    }
    to {
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.8);
    }
}

/* 不同尺寸的CTA标签 */
.cta-badge.small {
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 6px;
    top: -6px;
    left: -6px;
}

.cta-badge.medium {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 8px;
    top: -8px;
    left: -8px;
}

.cta-badge.large {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 10px;
    top: -10px;
    left: -10px;
}

/* 圆形头像的CTA标签调整 */
.avatar-container.circle .cta-badge {
    top: -5px;
    left: -5px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 8px;
}

.avatar-container.circle .cta-badge.small {
    width: 20px;
    height: 20px;
    font-size: 7px;
    top: -3px;
    left: -3px;
}

.avatar-container.circle .cta-badge.large {
    width: 28px;
    height: 28px;
    font-size: 9px;
    top: -7px;
    left: -7px;
}

/* 列表页面的CTA标签 */
.reader-list .avatar-container .cta-badge {
    font-size: 9px;
    padding: 2px 5px;
    top: -6px;
    left: -6px;
}

/* 详情页面的CTA标签 */
.reader-detail .avatar-container .cta-badge {
    font-size: 11px;
    padding: 4px 7px;
    top: -10px;
    left: -10px;
}

/* 卡片中的CTA标签 */
.reader-card .avatar-container .cta-badge {
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 6px;
    top: -5px;
    left: -5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cta-badge {
        font-size: 8px;
        padding: 2px 4px;
        border-radius: 6px;
        top: -5px;
        left: -5px;
    }
    
    .cta-badge.large {
        font-size: 10px;
        padding: 3px 6px;
        border-radius: 8px;
        top: -7px;
        left: -7px;
    }
    
    .avatar-container.circle .cta-badge {
        width: 20px;
        height: 20px;
        font-size: 7px;
        top: -3px;
        left: -3px;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .cta-badge {
        background: #FFD700;
        border: 2px solid #000;
        color: #000;
        box-shadow: none;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .cta-badge {
        animation: none;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .cta-badge {
        background: linear-gradient(45deg, #FFD700, #FFA500);
        border-color: #FFD700;
        color: #000;
        box-shadow: 0 2px 6px rgba(255, 215, 0, 0.6);
    }
}

/* CTA标签悬停效果 */
.cta-badge:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* 禁用CTA标签的点击事件 */
.cta-badge {
    pointer-events: none;
}

/* 确保CTA标签在头像上方 */
.avatar-container img {
    position: relative;
    z-index: 1;
}

/* CTA标签工具提示 */
.cta-badge[title] {
    cursor: help;
    pointer-events: auto;
}

/* 特殊场景：搜索结果中的CTA标签 */
.search-results .avatar-container .cta-badge {
    font-size: 8px;
    padding: 2px 4px;
    top: -4px;
    left: -4px;
}

/* 特殊场景：推荐区域的CTA标签 */
.recommended-readers .avatar-container .cta-badge {
    font-size: 9px;
    padding: 3px 5px;
    top: -6px;
    left: -6px;
    animation-duration: 1.5s;
}

/* CTA标签文本内容 */
.cta-badge::before {
    content: attr(data-text);
}

/* 默认CTA文本 */
.cta-badge:not([data-text])::before {
    content: "CTA";
}

/* 多语言支持 */
.cta-badge[data-lang="en"]::before {
    content: "CTA";
}

.cta-badge[data-lang="zh"]::before {
    content: "中塔";
}

/* 打印样式 */
@media print {
    .cta-badge {
        background: #FFD700 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        animation: none !important;
    }
}
