/* ============================================================
   子比下载区块短代码 - 前端样式
   按钮样式完全照搬 Shortcodes Ultimate 原版
   ============================================================ */

/* ---------- 工具类（与 SU 原版一致） ---------- */
.su-u-clearfix::after {
    content: "";
    display: table;
    clear: both;
}
.su-u-trim>:first-child {
    margin-top: 0;
}
.su-u-trim>:last-child {
    margin-bottom: 0;
}

/* ---------- 按钮核心样式（与 SU 原版完全一致） ---------- */
.su-button {
    display: inline-block !important;
    text-align: center;
    text-decoration: none !important;
    box-sizing: content-box !important;
    transition: all .2s;
}
.su-button span {
    display: block !important;
    text-decoration: none !important;
    box-sizing: content-box !important;
    transition: all .2s;
}
.su-button-center {
    text-align: center;
}
.su-button-wide {
    display: block !important;
    margin: 1em 0 !important;
}
.su-button img {
    border: none !important;
    vertical-align: middle !important;
    margin: -.2em .4em 0 -.3em !important;
    box-shadow: none !important;
}
.su-button i {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0 .5em 0 0 !important;
    text-align: center;
    line-height: 1em;
}
.su-button svg {
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
}
.su-button small {
    display: block;
    margin: -.2em 0 0;
    color: inherit;
    text-align: center;
    font-style: normal;
    font-size: .8em;
    line-height: 1;
    opacity: .7;
}

/* 按钮样式：default（有边框） */
.su-button-style-default {
    border-width: 1px;
    border-style: solid;
}
.su-button-style-default:hover {
    opacity: .7;
}
.su-button-style-default span {
    border-top-width: 1px;
    border-bottom-width: 1px;
    border-top-style: solid;
    border-bottom-style: solid;
}

/* 按钮样式：flat（无边框） */
.su-button-style-flat,
.su-button-style-flat span {
    border: none;
}
.su-button-style-flat span {
    position: relative;
}
.su-button-style-flat:hover span {
    top: 1px;
}

/* 按钮样式：ghost */
.su-button-style-ghost {
    background: 0 0 !important;
}
.su-button-style-ghost span {
    border-width: 3px;
    border-style: solid;
}
.su-button-style-ghost:hover span {
    border-color: inherit !important;
}

/* ---------- Note 容器（与 SU 原版一致） ---------- */
.su-note {
    margin: 0 0 1.5em;
    border-width: 1px;
    border-style: solid;
}
.su-note-inner {
    padding: 1em;
    border-width: 1px;
    border-style: solid;
}

/* ---------- wpautop 残留兜底（双保险，保证横排） ---------- */
.su-note br,
.su-note-inner br {
    display: none !important;
}
.su-note p:empty,
.su-note-inner p:empty {
    display: none !important;
}
.su-note-inner > p {
    margin: 0;
}
/* 防止主题给 note 内所有 a 标签设置 display:block */
.su-note a.su-button,
.su-note-inner a.su-button,
body .su-note a.su-button,
body .entry-content .su-note a.su-button,
body .post-content .su-note a.su-button,
body article .su-note a.su-button {
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    clear: none !important;
}

/* ---------- 多主题暗主题适配 ---------- */
.dark-theme .su-note,
.night .su-note,
body.dark .su-note {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}
.dark-theme .su-note h1,
.dark-theme .su-note h2,
.dark-theme .su-note h3,
.dark-theme .su-note h4,
.dark-theme .su-note h5,
.dark-theme .su-note h6,
.night .su-note h1,
.night .su-note h2,
.night .su-note h3,
.night .su-note h4,
.night .su-note h5,
.night .su-note h6 {
    color: #fff !important;
}
.io-black-mode .su-note,
body.io-black-mode .su-note {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}
.io-black-mode .su-note h1,
.io-black-mode .su-note h2,
.io-black-mode .su-note h3,
.io-black-mode .su-note h4,
.io-black-mode .su-note h5,
.io-black-mode .su-note h6 {
    color: #fff !important;
}
.theme-dark .su-note,
.dark-mode .su-note,
body.theme-dark .su-note {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}
.theme-dark .su-note h1,
.theme-dark .su-note h2,
.theme-dark .su-note h3,
.theme-dark .su-note h4,
.theme-dark .su-note h5,
.theme-dark .su-note h6,
.dark-mode .su-note h1,
.dark-mode .su-note h2,
.dark-mode .su-note h3,
.dark-mode .su-note h4,
.dark-mode .su-note h5,
.dark-mode .su-note h6 {
    color: #fff !important;
}
@media (prefers-color-scheme: dark) {
    .su-note {
        background-color: #2a2a2a !important;
        color: #e0e0e0 !important;
    }
    .su-note h1,
    .su-note h2,
    .su-note h3,
    .su-note h4,
    .su-note h5,
    .su-note h6 {
        color: #fff !important;
    }
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 768px) {
    .su-button span {
        padding-top: .25em !important;
        padding-bottom: .25em !important;
        line-height: 1.2 !important;
    }
    .su-button small {
        margin-top: .2em !important;
    }
}
