/**
 * Zibll 到 Ripro-v5 的通用 CSS 兼容层
 * 为所有使用 zibll 主题的页面提供样式支持
 */

/* ============================================
   基础布局类
   ============================================ */

/* 主题盒子 */
.theme-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 小部件样式 */
.zib-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Flexbox 工具类 */
.flex {
    display: flex;
}

.flex1 {
    flex: 1;
}

.ab {
    align-items: baseline;
}

.jsb {
    justify-content: space-between;
}

.ac {
    align-items: center;
}

/* 间距工具类 */
.col-ml6 {
    margin-left: -6px;
}

.col-ml6 > * {
    margin-left: 6px;
}

/* ============================================
   标题和文字样式
   ============================================ */

.title-theme {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

/* ============================================
   颜色类
   ============================================ */

.c-blue {
    color: #2196F3;
}

.c-blue-2 {
    color: #64B5F6;
}

.c-green {
    color: #4CAF50;
}

.c-yellow {
    color: #FFC107;
}

.c-red {
    color: #f44336;
}

.c-ok {
    color: #64d476;
}

.muted-color {
    color: #999;
}

.muted-2-color {
    color: #666;
}

.muted-3-color {
    color: #999;
}

/* ============================================
   字体大小
   ============================================ */

.em09 {
    font-size: 0.9em;
}

.em12 {
    font-size: 1.2em;
}

.em14 {
    font-size: 1.4em;
}

.f12 {
    font-size: 12px;
}

/* ============================================
   间距
   ============================================ */

.mb6 {
    margin-bottom: 6px;
}

.mb10 {
    margin-bottom: 10px;
}

.mb20 {
    margin-bottom: 20px;
}

.mb40 {
    margin-bottom: 40px;
}

.mt3 {
    margin-top: 3px;
}

.mt10 {
    margin-top: 10px;
}

.mt20 {
    margin-top: 20px;
}

.ml6 {
    margin-left: 6px;
}

.ml10 {
    margin-left: 10px;
}

.mr6 {
    margin-right: 6px;
}

.mr10 {
    margin-right: 10px;
}

.padding-h10 {
    padding: 10px 20px;
}

.padding-lg {
    padding: 12px 24px;
}

/* ============================================
   折叠面板样式
   ============================================ */

.wp-block-zibllblock-collapse {
    margin-bottom: 10px;
}

.panel {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.panel-heading {
    background: #f8f9fa;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.panel-heading:hover {
    background: #e9ecef;
}

.panel-heading i {
    margin-right: 10px;
    color: #666;
    transition: transform 0.3s;
}

.panel-heading.collapsed i {
    transform: rotate(0deg);
}

.panel-heading:not(.collapsed) i.fa-plus:before {
    content: "\f068";
}

.panel-heading .biaoti {
    font-weight: 500;
    color: #333;
}

.collapse {
    display: none;
}

.collapse.show,
.collapse.in {
    display: block;
}

.panel-body {
    padding: 15px;
    background: #fff;
}

/* ============================================
   按钮样式
   ============================================ */

.but {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.but.c-blue {
    background: #2196F3;
    color: #fff;
}

.but.c-blue:hover {
    background: #1976D2;
}

.but.c-theme {
    background: var(--theme-color, #ff6000);
    color: #fff;
}

.but.radius {
    border-radius: 20px;
}

.but.jb-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.but.jb-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.but.hollow {
    background: transparent;
    border: 1px solid var(--theme-color, #ff6000);
    color: var(--theme-color, #ff6000);
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================
   链接样式
   ============================================ */

a.c-blue {
    color: #2196F3;
}

a.c-blue:hover {
    color: #1976D2;
}

/* ============================================
   浮动和定位
   ============================================ */

.pull-right {
    float: right;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.absolute {
    position: absolute;
}

/* ============================================
   字体粗细
   ============================================ */

.font-bold {
    font-weight: 600;
}

/* ============================================
   指针
   ============================================ */

.pointer {
    cursor: pointer;
}

/* ============================================
   表单样式
   ============================================ */

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group {
    margin-bottom: 15px;
}

.form-select {
    position: relative;
}

.form-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 30px;
}

/* ============================================
   徽章和标签
   ============================================ */

.badg {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

.badg-sm {
    padding: 2px 6px;
    font-size: 11px;
}

.pay-tag {
    background: var(--theme-color, #ff6000);
    color: #fff;
}

/* ============================================
   文章区域
   ============================================ */

.article {
    padding: 20px;
}

.wp-posts-content {
    padding: 10px 0;
}

/* ============================================
   侧边栏
   ============================================ */

.sidebar .zib-widget {
    margin-bottom: 15px;
}

/* ============================================
   页面头部
   ============================================ */

.page-cover {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.page-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.abs-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   特色功能块
   ============================================ */

.wp-block-zibllblock-feature {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.wp-block-zibllblock-feature .feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: var(--theme-color, #ff6000);
    border-radius: 8px;
    color: #fff;
}

.wp-block-zibllblock-feature .feature-icon img {
    width: 24px;
    height: 24px;
}

.wp-block-zibllblock-feature .feature-title {
    font-weight: 600;
    color: #333;
}

.wp-block-zibllblock-feature .feature-note {
    font-size: 12px;
    color: #666;
}

/* ============================================
   引用块
   ============================================ */

.wp-block-zibllblock-quote {
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--theme-color, #ff6000);
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.wp-block-zibllblock-quote .quote_q {
    display: flex;
    align-items: flex-start;
}

.wp-block-zibllblock-quote .quote_q i {
    margin-right: 10px;
    color: var(--quote-color, #fb2121);
    font-size: 20px;
}

.wp-block-zibllblock-quote .quote_q p {
    margin: 0;
    color: #333;
}

/* ============================================
   模态框
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
    background: rgba(0,0,0,0.5);
}

.modal.show,
.modal.fade.in {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 10px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    margin: 0;
    line-height: 1.5;
    font-weight: 600;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 15px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

.modal-mini {
    max-width: 400px;
    margin: 30px auto;
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    background: none;
    border: none;
    cursor: pointer;
}

.close:hover {
    opacity: 0.75;
}

/* ============================================
   分页
   ============================================ */

.pagination {
    margin: 30px 0;
    padding: 0 10px;
    text-align: center;
    font-size: 12px;
    display: block;
    border-radius: 0;
}

.pagination ul {
    display: inline-block !important;
    margin-left: 0;
    margin-bottom: 0;
    padding: 0;
}

.pagination ul > li {
    display: inline;
}

.pagination ul > li > a,
.pagination ul > li > span {
    margin: 0 2px;
    padding: 6px 12px;
    background-color: #ddd;
    color: #666;
    border-radius: 2px;
    opacity: 0.88;
    text-decoration: none;
}

.pagination ul > li > a:hover,
.pagination ul > li > a:focus {
    opacity: 1;
}

.pagination ul > .active > a,
.pagination ul > .active > span {
    background-color: #1d1d1d;
    color: #fff;
    cursor: default;
}

/* ============================================
   图片和懒加载
   ============================================ */

.fit-cover {
    object-fit: cover;
}

.no-scale {
    transform: none;
}

.lazyload,
.lazyloaded {
    opacity: 1;
    transition: opacity 0.3s;
}

/* ============================================
   响应式
   ============================================ */

@media (max-width: 768px) {
    .theme-box,
    .zib-widget {
        padding: 15px;
    }
    
    .flex.ab.jsb {
        flex-direction: column;
    }
    
    .zib-widget.flex1 {
        min-width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* ============================================
   其他工具类
   ============================================ */

.hide {
    display: none !important;
}

.show {
    display: block !important;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.separator {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.ajax-item {
    text-align: center;
    padding: 40px 20px;
}

.nopw-sm {
    padding: 20px;
}

.box-body {
    padding: 20px;
}

.notop {
    padding-top: 0;
}

.main-bg {
    background: #fff;
}

.main-shadow {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.radius8 {
    border-radius: 8px;
}

.b2-radius {
    border-radius: 8px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--theme-color, #ff6000);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   用户列表小工具样式 (xuwbk_user_widgets)
   ============================================ */

.hot-top {
    width: 100%;
    background: #fff;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

/* 左侧切换按钮 */
.hot-top .left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-top .left a {
    display: block;
    width: 80px;
    height: 32px;
    line-height: 32px;
    background: #f0f0f0;
    text-align: center;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hot-top .left a:hover {
    background: #e0e0e0;
}

.hot-top .left a.hover {
    background: #2b21fa;
    color: #FFF;
}

/* 右侧用户列表区域 */
.hot-top .right {
    flex: 1;
    overflow: hidden;
}

/* 用户列表面板 */
.hot-top .right .right-main {
    display: block;
}

.hot-top .right .top-ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-top .right .top-ul li {
    flex: 0 0 auto;
    text-align: center;
    width: 70px;
}

.hot-top .right .top-ul li a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 头像样式 - 圆形 */
.hot-top .right .top-ul li a .avatar-img {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    overflow: hidden;
    display: block;
    margin: 0 auto 6px;
    position: relative;
    background: #e6f0ff;
}

.hot-top .right .top-ul li a .avatar-img img,
.hot-top .right .top-ul li a .avatar-img .avatar {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50% !important;
    display: block;
}

/* 用户名 */
.hot-top .right .top-ul li a h3 {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-weight: normal;
}

/* 状态指示器 */
.user-list-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 10;
}

.user-list-status-indicator.status-online { background-color: #52c41a; }
.user-list-status-indicator.status-away { background-color: #faad14; }
.user-list-status-indicator.status-busy { background-color: #ff4d4f; }
.user-list-status-indicator.status-invisible { background-color: #722ed1; }
.user-list-status-indicator.status-offline { background-color: #8c8c8c; }

/* 头像容器 */
.avatar-img {
    position: relative;
    display: inline-block;
}

/* 榜上有名标签 */
.hot-top .note {
    position: absolute;
    top: 8px;
    right: -30px;
    z-index: 1;
    width: 100px;
    height: 22px;
    background: #ff6b6b;
    color: #fff;
    line-height: 22px;
    transform: rotate(45deg);
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .hot-top {
        flex-direction: column;
        padding: 10px;
    }
    
    .hot-top .left {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
    
    .hot-top .left a {
        width: auto;
        padding: 0 15px;
    }
    
    .hot-top .right .top-ul {
        justify-content: center;
    }
    
    .hot-top .right .top-ul li {
        width: 60px;
    }
    
    .hot-top .right .top-ul li a .avatar-img {
        width: 48px !important;
        height: 48px !important;
    }
    
    .hot-top .right .top-ul li a h3 {
        font-size: 11px;
    }
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}
