/* ==========================================================
   自定义文章前缀（通用版）前台样式
   不依赖任何主题，纯插件自带
   ========================================================== */
:root {
    --qz-prefix-img-height: 20px;
}

/* 图片前缀 */
.qz-prefix-img {
    height: var(--qz-prefix-img-height, 20px) !important;
    width: auto !important;
    max-width: none !important;
    display: inline-block !important;
    vertical-align: -3px;
    margin-right: 3px;
    pointer-events: none;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: none !important;
}

/* 文字前缀 */
.qz-prefix {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding: 0 6px;
    margin-right: 4px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    font-weight: 500;
    vertical-align: 1px;
    top: -2px;
    white-space: nowrap;
    clip-path: polygon(7% 0, 99% 0, 93% 100%, 0 100%);
}

/* 扫光动效 */
.qz-prefix::after {
    position: absolute;
    content: " ";
    display: block;
    left: -100%;
    top: -5px;
    width: 15px;
    height: 145%;
    background-image: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.5), rgba(255,255,255,0));
    animation: qz-prefix-sweep 3s ease-in-out infinite;
    transform: rotate(28deg);
    pointer-events: none;
}

@keyframes qz-prefix-sweep {
    0%   { left: -100%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .qz-prefix::after {
        animation: none;
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .qz-prefix-img {
        height: calc(var(--qz-prefix-img-height, 20px) * 0.9) !important;
    }
    .qz-prefix {
        font-size: 11px;
        height: 18px;
        line-height: 18px;
        padding: 0 5px;
    }
}
