/**
 * Oncex 短代码样式（P2）
 * 前缀 oncex-，避免与主题/插件冲突。
 */

/* —— title-plane / start-plane —— */
.oncex-title-plane {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 14px 0;
    background: #fff;
}
.oncex-title-plane-title {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}
.oncex-start-plane {
    border-left: 3px solid #3a8ee6;
    padding: 10px 14px;
    margin: 14px 0;
    background: #f5f9ff;
    border-radius: 0 6px 6px 0;
}

/* —— icon-url —— */
.oncex-icon-url {
    display: inline-block;
    color: #3a8ee6;
    text-decoration: none;
    border-bottom: 1px dashed #3a8ee6;
    margin: 2px 4px;
}
.oncex-icon-url:hover {
    color: #1d6fc2;
    border-bottom-style: solid;
}

/* —— zd-plane 折叠面板 —— */
.oncex-zd-plane .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.oncex-zd-btn {
    font-weight: 600;
    color: #334155;
    padding: 10px 16px;
    display: flex;
    align-items: center;
}
.oncex-zd-btn:hover {
    color: #3a8ee6;
}
.oncex-zd-icon {
    transition: transform .2s ease;
}
.oncex-zd-btn.collapsed .oncex-zd-icon {
    transform: rotate(-90deg);
}

/* —— c-alert —— */
.oncex-c-alert {
    border-radius: 6px;
    margin: 12px 0;
}

/* —— cn_btn —— */
.oncex-cn-btn {
    border-radius: 6px;
    margin: 2px 4px;
    font-weight: 600;
}
.oncex-cn-btn:hover {
    opacity: .88;
}

/* —— selectbox —— */
.oncex-selectbox {
    display: inline-block;
    font-size: 15px;
    vertical-align: -2px;
}

/* —— clickshow 点击显示 —— */
.oncex-clickshow {
    display: none;
    cursor: pointer;
    border-bottom: 1px dashed #94a3b8;
}
.oncex-clickshow.oncex-clickshow-show {
    display: block;
}
span.oncex-clickshow.oncex-clickshow-show {
    display: inline;
}

/* —— loginshow / reply —— */
.oncex-loginshow,
.oncex-reply-show {
    margin: 12px 0;
}
.oncex-reply-show b {
    color: #d97706;
}

/* —— pwdshow 密码锁 —— */
.oncex-pwd-lock {
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 18px 20px;
    margin: 14px 0;
    text-align: center;
    background: #f8fafc;
}
.oncex-pwd-form {
    display: inline-block;
    max-width: 420px;
    width: 100%;
}

/* —— wxshow 公众号引导 —— */
.oncex-wx-lock {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin: 14px 0;
    background: #f8fafc;
}
.oncex-wx-lock-head {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.oncex-wx-qrcode {
    width: 128px;
    height: 128px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}
.oncex-wx-lock-info {
    max-width: 420px;
    text-align: left;
}
.oncex-wx-lock-info b {
    font-size: 15px;
}
.oncex-wx-lock-info p {
    color: #64748b;
    margin: 6px 0 10px;
    font-size: 13px;
}

/* —— dh 网址导航卡片 —— */
.oncex-dh-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    background: #fff;
    text-decoration: none;
    transition: box-shadow .2s ease;
}
.oncex-dh-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    text-decoration: none;
}
.oncex-dh-ava {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 6px;
}
.oncex-dh-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.oncex-dh-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}
.oncex-dh-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.oncex-dh-info b {
    font-size: 14px;
    color: #1e293b;
}
.oncex-dh-info i {
    font-size: 12px;
    color: #94a3b8;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* —— postcard 文章卡片 —— */
.oncex-postcard-list {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
    background: #fff;
    text-decoration: none;
    transition: box-shadow .2s ease;
}
.oncex-postcard-list:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    text-decoration: none;
}
.oncex-postcard-list .oncex-sc-thumb {
    flex: 0 0 140px;
    width: 140px;
    height: 88px;
    object-fit: cover;
    border-radius: 6px;
}
.oncex-postcard-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.oncex-postcard-txt b {
    font-size: 15px;
    color: #1e293b;
}
.oncex-postcard-txt i {
    font-size: 13px;
    color: #64748b;
    font-style: normal;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.oncex-postcard-item {
    display: inline-block;
    vertical-align: top;
    width: calc(33.333% - 12px);
    margin: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
}
.oncex-postcard-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    text-decoration: none;
}
.oncex-postcard-item .oncex-sc-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.oncex-postcard-item b {
    display: block;
    padding: 8px 10px;
    font-size: 14px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .oncex-postcard-item {
        width: calc(50% - 12px);
    }
}

/* —— instance_card —— */
.oncex-instance-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin: 14px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 60%);
    border-top: 3px solid var(--ins-color, #83a9ff);
}
.oncex-instance-icon {
    font-size: 22px;
    color: var(--ins-color, #83a9ff);
}
.oncex-instance-name {
    display: block;
    font-size: 16px;
    margin: 6px 0;
    color: #1e293b;
}
.oncex-instance-desc {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}
.oncex-instance-btn {
    background: var(--ins-color, #83a9ff);
    border-color: var(--ins-color, #83a9ff);
    color: #fff;
}
.oncex-instance-btn:hover {
    color: #fff;
    opacity: .88;
}

/* —— c-downbtn（download-plane 卡片，对齐 CoreNext） —— */
.oncex-downbtn {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 14px auto;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}
.oncex-downbtn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}
.oncex-downbtn-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}
.oncex-downbtn-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    box-shadow: none !important;
}
.oncex-downbtn-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.oncex-downbtn-info > div {
    min-width: 0;
}
.oncex-downbtn-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.oncex-downbtn-title:hover {
    color: #3a8ee6;
    text-decoration: none;
}
.oncex-downbtn-source {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}
.oncex-downbtn-go {
    flex: none;
    white-space: nowrap;
}
.oncex-down-pwd {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}
.oncex-down-pwd-sep {
    color: #cbd5e1;
    margin-right: 2px;
}
.oncex-down-pwd code {
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f5f9;
}
.oncex-down-pwd .oncex-copy {
    padding: 0 8px;
    line-height: 1.6;
    font-size: 12px;
}
@media (max-width: 480px) {
    .oncex-downbtn-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .oncex-downbtn-go {
        width: 100%;
    }
}
