/*
Theme Name: ZyList
Theme URI: 
Author: 落日
Author URI: 
Description: A WordPress theme using Layui framework
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zylist
*/

/* 统一按钮颜色样式 */
.layui-btn,
.layui-btn-fluid,
button.layui-btn,
button.layui-btn-fluid,
.layui-form .layui-btn,
.layui-form .layui-btn-fluid,
.layui-form button.layui-btn,
.layui-form button.layui-btn-fluid,
body .layui-btn,
body .layui-btn-fluid,
body button.layui-btn,
body button.layui-btn-fluid {
    background-color: #007cba !important;
    border-color: #007cba !important;
    color: #fff !important;
    box-shadow: none !important;
}

.layui-btn:hover,
.layui-btn-fluid:hover,
button.layui-btn:hover,
button.layui-btn-fluid:hover,
.layui-form .layui-btn:hover,
.layui-form .layui-btn-fluid:hover,
.layui-form button.layui-btn:hover,
.layui-form button.layui-btn-fluid:hover,
body .layui-btn:hover,
body .layui-btn-fluid:hover,
body button.layui-btn:hover,
body button.layui-btn-fluid:hover {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.layui-btn:focus,
.layui-btn-fluid:focus,
button.layui-btn:focus,
button.layui-btn-fluid:focus,
.layui-form .layui-btn:focus,
.layui-form .layui-btn-fluid:focus,
.layui-form button.layui-btn:focus,
.layui-form button.layui-btn-fluid:focus,
body .layui-btn:focus,
body .layui-btn-fluid:focus,
body button.layui-btn:focus,
body button.layui-btn-fluid:focus {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* 主要按钮样式 */
.layui-btn-primary {
    background-color: transparent !important;
    border-color: #007cba !important;
    color: #007cba !important;
}

.layui-btn-primary:hover {
    background-color: #007cba !important;
    border-color: #007cba !important;
    color: #fff !important;
}

.layui-btn-primary:focus {
    background-color: #007cba !important;
    border-color: #007cba !important;
    color: #fff !important;
}

/* 流体按钮样式 */
.layui-btn-fluid {
    background-color: #007cba !important;
    border-color: #007cba !important;
    color: #fff !important;
}

.layui-btn-fluid:hover {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    color: #fff !important;
}

.layui-btn-fluid:focus {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    color: #fff !important;
}

/* 禁用按钮样式 - 增强优先级 */
span.layui-btn.layui-btn-xs.layui-btn-disabled,
.layui-btn.layui-btn-disabled {
    background-color: #f5f5f5 !important;
    border-color: #d9d9d9 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

span.layui-btn.layui-btn-xs.layui-btn-disabled:hover,
.layui-btn.layui-btn-disabled:hover {
    background-color: #f5f5f5 !important;
    border-color: #d9d9d9 !important;
    color: #999 !important;
}

/* 广告位样式 - 替代layui栅格系统 */
.zylist-image-ads-container,
.zylist-grid-ads-container {
    margin-bottom: 10px;
    width: 100%;
}

.zylist-ads-grid {
    display: grid;
    gap: 10px;
    width: 100%;
}

/* 图片广告网格布局 */
.zylist-image-ads-container[data-per-row="1"] .zylist-ads-grid {
    grid-template-columns: 1fr;
}

.zylist-image-ads-container[data-per-row="2"] .zylist-ads-grid {
    grid-template-columns: repeat(2, 1fr);
}

.zylist-image-ads-container[data-per-row="3"] .zylist-ads-grid {
    grid-template-columns: repeat(3, 1fr);
}

.zylist-image-ads-container[data-per-row="4"] .zylist-ads-grid {
    grid-template-columns: repeat(4, 1fr);
}

.zylist-image-ads-container[data-per-row="5"] .zylist-ads-grid {
    grid-template-columns: repeat(5, 1fr);
}

.zylist-image-ads-container[data-per-row="6"] .zylist-ads-grid {
    grid-template-columns: repeat(6, 1fr);
}

.zylist-image-ads-container[data-per-row="7"] .zylist-ads-grid {
    grid-template-columns: repeat(7, 1fr);
}

.zylist-image-ads-container[data-per-row="8"] .zylist-ads-grid {
    grid-template-columns: repeat(8, 1fr);
}

.zylist-image-ads-container[data-per-row="9"] .zylist-ads-grid {
    grid-template-columns: repeat(9, 1fr);
}

.zylist-image-ads-container[data-per-row="10"] .zylist-ads-grid {
    grid-template-columns: repeat(10, 1fr);
}

/* 格子广告网格布局 */
.zylist-grid-ads-container[data-per-row="1"] .zylist-ads-grid {
    grid-template-columns: 1fr;
}

.zylist-grid-ads-container[data-per-row="2"] .zylist-ads-grid {
    grid-template-columns: repeat(2, 1fr);
}

.zylist-grid-ads-container[data-per-row="3"] .zylist-ads-grid {
    grid-template-columns: repeat(3, 1fr);
}

.zylist-grid-ads-container[data-per-row="4"] .zylist-ads-grid {
    grid-template-columns: repeat(4, 1fr);
}

.zylist-grid-ads-container[data-per-row="5"] .zylist-ads-grid {
    grid-template-columns: repeat(5, 1fr);
}

.zylist-grid-ads-container[data-per-row="6"] .zylist-ads-grid {
    grid-template-columns: repeat(6, 1fr);
}

.zylist-grid-ads-container[data-per-row="7"] .zylist-ads-grid {
    grid-template-columns: repeat(7, 1fr);
}

.zylist-grid-ads-container[data-per-row="8"] .zylist-ads-grid {
    grid-template-columns: repeat(8, 1fr);
}

.zylist-grid-ads-container[data-per-row="9"] .zylist-ads-grid {
    grid-template-columns: repeat(9, 1fr);
}

.zylist-grid-ads-container[data-per-row="10"] .zylist-ads-grid {
    grid-template-columns: repeat(10, 1fr);
}

/* 广告项目样式 */
.zylist-ad-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.zylist-image-ad {
    width: 100%;
    transition: transform 0.3s ease;
}

.zylist-image-ad:hover {
    transform: translateY(-2px);
}

.zylist-image-ad img {
    display: block;
    width: 100%;
    transition: box-shadow 0.3s ease;
}

.zylist-image-ad:hover img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 格子广告样式 */
.zylist-grid-ad {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0 auto;
    box-sizing: border-box;
}

.zylist-grid-ad:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.zylist-grid-ad a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.zylist-grid-ad a:hover {
    color: #007cba;
}

.zylist-grid-ad span {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* 居中对齐 */
.zylist-center {
    display: flex;
    justify-content: center;
}

.zylist-center .zylist-ads-grid {
    justify-content: center;
}

/* WordPress 图片对齐样式 */
.entry-content img {
    height: auto;
    max-width: 100%;
}

.aligncenter {
    display: block;
    margin: 0 auto;
    text-align: center;
}

.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.alignnone {
    margin: 5px 20px 20px 0;
}

/* 图片标题样式 */
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* 清除浮动 */
.entry-content:after {
    content: "";
    display: table;
    clear: both;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zylist-image-ads-container[data-per-row="5"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="6"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="7"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="8"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="9"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="10"] .zylist-ads-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .zylist-image-ads-container[data-per-row="4"] .zylist-ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zylist-grid-ads-container[data-per-row="5"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="6"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="7"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="8"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="9"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="10"] .zylist-ads-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .zylist-grid-ads-container[data-per-row="4"] .zylist-ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .zylist-image-ads-container[data-per-row="3"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="4"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="5"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="6"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="7"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="8"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="9"] .zylist-ads-grid,
    .zylist-image-ads-container[data-per-row="10"] .zylist-ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zylist-grid-ads-container[data-per-row="3"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="4"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="5"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="6"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="7"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="8"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="9"] .zylist-ads-grid,
    .zylist-grid-ads-container[data-per-row="10"] .zylist-ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zylist-grid-ad {
        padding: 10px;
        font-size: 12px;
    }
    
    /* 移动端图片对齐调整 */
    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 10px auto;
    }
    
    .wp-caption.alignleft,
    .wp-caption.alignright {
        float: none;
        margin: 10px auto;
    }
}