/*
 * 雪绒社定制配置 - 前台样式
 */

/* 文章时效性提示 */
.wp-posts-content > .yukiovo-stale-notice {
    --yukiovo-stale-accent: var(--focus-color);
    --yukiovo-stale-bg: var(--muted-border-color);
    --yukiovo-stale-icon-bg: var(--focus-color-opacity1, rgba(41, 151, 247, 0.1));
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 20px;
    padding: 14px 15px;
    border: 1px solid var(--main-border-color);
    border-left: 3px solid var(--yukiovo-stale-accent);
    border-radius: var(--main-radius);
    background: var(--yukiovo-stale-bg);
    color: var(--main-color);
    box-shadow: none;
    line-height: 1.75;
    overflow: hidden;
}

.wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--yukiovo-stale-icon-bg);
    color: var(--yukiovo-stale-accent);
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 28px;
}

.wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-body {
    flex: 1;
    min-width: 0;
}

.wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--yukiovo-stale-accent);
}

.wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-text,
.wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-text p {
    margin: 0;
    font-size: 14px;
    color: var(--muted-color, var(--main-color));
}

/* 暖黄色 */
.wp-posts-content > .yukiovo-stale-notice-warm {
    --yukiovo-stale-accent: #ff6f06;
    --yukiovo-stale-bg: rgba(255, 111, 6, 0.08);
    --yukiovo-stale-icon-bg: rgba(255, 111, 6, 0.12);
}

/* 浅蓝色 */
.wp-posts-content > .yukiovo-stale-notice-blue {
    --yukiovo-stale-accent: #2997f7;
    --yukiovo-stale-bg: rgba(41, 151, 247, 0.08);
    --yukiovo-stale-icon-bg: rgba(41, 151, 247, 0.12);
}

/* 灰色低调 */
.wp-posts-content > .yukiovo-stale-notice-gray {
    --yukiovo-stale-accent: var(--muted-3-color);
    --yukiovo-stale-bg: var(--muted-border-color);
    --yukiovo-stale-icon-bg: var(--main-border-color);
}

@media (max-width: 640px) {
    .wp-posts-content > .yukiovo-stale-notice {
        gap: 10px;
        padding: 12px;
    }

    .wp-posts-content > .yukiovo-stale-notice .yukiovo-stale-notice-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
        font-size: 13px;
        line-height: 26px;
    }
}

/* 雪绒社美化层 */
body.yukiovo-beautify-font {
    font-family: var(--yukiovo-beautify-font), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.yukiovo-beautify-font :where(code, pre, kbd, samp, .enlighter, .enlighter-default) {
    font-family: Consolas, Monaco, "Courier New", monospace;
}

body.yukiovo-beautify-font :where(.fa, [class^="fa-"], [class*=" fa-"]) {
    font-family: FontAwesome !important;
}

body.yukiovo-beautify-texture::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    pointer-events: none;
    background-image: var(--yukiovo-beautify-texture);
    background-repeat: repeat;
    opacity: var(--yukiovo-beautify-texture-opacity);
    mix-blend-mode: soft-light;
}

body.yukiovo-beautify-logo-size .header .navbar-brand {
    height: 50px;
    padding: 0 !important;
    line-height: 50px;
    overflow: visible;
}

body.yukiovo-beautify-logo-size .header .navbar-logo {
    display: inline-flex;
    align-items: center;
    height: 50px;
    vertical-align: top;
}

body.yukiovo-beautify-logo-size .header .navbar-logo > img {
    height: var(--yukiovo-header-logo-height);
    width: auto;
    max-height: none;
    object-fit: contain;
}

body.yukiovo-beautify-logo-size .footer-logo {
    height: auto;
}

body.yukiovo-beautify-logo-size .footer-logo img {
    height: var(--yukiovo-footer-logo-height) !important;
    width: auto !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: contain !important;
}

body.yukiovo-beautify-heading-decor .wp-posts-content > :where(h2:not([class]), h3:not([class]), h2.wp-block-heading, h3.wp-block-heading)::after {
    content: "";
    display: inline-block;
    width: 1.05em;
    height: 1.05em;
    margin-left: 0.35em;
    vertical-align: -0.15em;
    background: var(--yukiovo-beautify-heading-decor) center / contain no-repeat;
}

body.yukiovo-beautify-image .wp-posts-content :where(img:not(.avatar):not(.img-icon):not(.smilie-icon), figure.wp-block-image img, .wp-block-gallery img) {
    border-radius: var(--main-radius);
}

body.yukiovo-beautify-image .wp-posts-content :where(figure.wp-block-image, .wp-block-gallery, .wp-block-image) {
    overflow: hidden;
}

body.yukiovo-beautify-image .wp-posts-content figure.wp-block-image img,
body.yukiovo-beautify-image .wp-posts-content > p > img {
    box-shadow: 0 0 10px var(--main-shadow);
}

body.yukiovo-beautify-divider-decor .wp-posts-content hr {
    height: 28px;
    border: 0;
    background: var(--yukiovo-beautify-divider-decor) center / contain no-repeat;
    opacity: 0.75;
}

@media (max-width: 767px) {
    body.yukiovo-beautify-logo-size .header .navbar-brand,
    body.yukiovo-beautify-logo-size .header .navbar-logo {
        height: 50px;
    }

    body.yukiovo-beautify-logo-size .header .navbar-logo > img {
        height: var(--yukiovo-mobile-logo-height);
    }
}

/* 搜索叠层「组件上方额外内容」动效 */
body.yukiovo-search-extra-effect .header-slider-search-more.before .yukiovo-hero-fade-line {
    opacity: 0;
    transform: translateY(12px);
    animation: yukiovo-hero-fade-in 0.8s ease forwards;
}

body.yukiovo-search-extra-effect .header-slider-search-more.before .yukiovo-hero-typewriter-line {
    min-height: 1.5em;
}

body.yukiovo-search-extra-effect .header-slider-search-more.before .yukiovo-hero-typewriter-cursor {
    display: inline-block;
    margin-left: 1px;
    font-weight: 300;
    animation: yukiovo-hero-cursor-blink 0.75s step-end infinite;
}

body.yukiovo-search-extra-effect .header-slider-search-more.before .yukiovo-hero-typewriter-cursor.is-paused {
    animation: none;
    opacity: 0;
}

@keyframes yukiovo-hero-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes yukiovo-hero-cursor-blink {
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.yukiovo-search-extra-effect .header-slider-search-more.before .yukiovo-hero-fade-line {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
