/* 自动广告位样式 */
.auto-ad-widget .zib-widget-content {
    padding: 10px;
}

/* 头部样式 */
.zad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zad-header .title-theme {
    display: flex;
    align-items: center;
}

.zad-header-right {
    flex-shrink: 0;
}

/* 广告列表 - 使用flexbox防止错位 */
.zad-list {
    display: flex !important;
    flex-wrap: wrap !important;
}

.zad-list>[class*="col-"] {
    display: flex;
    margin-bottom: 2px;
}

.zad-row {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
}

.zad-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: var(--muted-bg-color, #f5f5f5);
    border-radius: 4px;
    transition: all 0.3s;
    color: var(--main-color, #333);
    width: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.zad-item:hover {
    background: var(--main-bg-color, #fff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: var(--main-color, #333);
}

/* Ad标签样式 */
.zad-tag {
    background: rgba(153, 153, 153, 0.15);
    color: #999;
    font-size: 10px;
    padding: 0 4px;
    border-radius: 3px;
    margin-right: 8px;
    flex-shrink: 0;
    line-height: 16px;
    height: 16px;
    display: inline-block;
    border: 1px solid rgba(153, 153, 153, 0.2);
}

.zad-info {
    flex-grow: 1;
    overflow: hidden;
}

.zad-name {
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

/* 空位样式 */
.zad-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--muted-border-color, rgba(255, 255, 255, 0.1));
    /* justify-content: center; 移除居中 */
}

.zad-empty .zad-info {
    display: flex;
    align-items: center;
    /* justify-content: center; 移除居中 */
    flex-grow: 1;
}

.zad-empty:hover {
    border-color: var(--focus-color, #ff4081);
    background: rgba(255, 64, 129, 0.05);
}

/* 占位条样式 */
.zad-placeholder-bar {
    height: 12px;
    background: rgba(153, 153, 153, 0.15);
    border-radius: 6px;
    width: 80%;
    max-width: 120px;
}

.zad-empty:hover .zad-placeholder-bar {
    background: rgba(255, 64, 129, 0.4);
}

/* 辅助类 */
.zad-flex {
    display: flex;
}

.zad-ac {
    align-items: center;
}

.zad-jc {
    justify-content: center;
}

.zad-mr6 {
    margin-right: 6px;
}

.zad-c-blue {
    color: var(--focus-color, #1890ff);
}

/* 加载动画 */
.zad-ajax-container {
    min-height: 60px;
}

/* 自定义模态框样式 */
.zad-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    overflow: auto;
}

.zad-modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px;
}

.zad-modal-box {
    background: var(--main-bg-color, #fff);
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: zadModalIn 0.2s ease-out;
}

@keyframes zadModalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zad-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--muted-border-color, #eee);
}

.zad-modal-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--main-color, #333);
}

.zad-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.zad-modal-close:hover {
    color: #ff4081;
}

.zad-modal-content {
    padding: 20px;
}

.zad-modal-body {
    padding: 0;
}

.zad-plan-item {
    cursor: pointer;
    border: 1px solid var(--muted-border-color, #ddd);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
    position: relative;
}

.zad-plan-item.active {
    border-color: var(--focus-color, #ff4081);
    background: var(--focus-bg-color, rgba(255, 64, 129, 0.05));
}

.zad-plan-tag {
    position: absolute;
    top: -8px;
    right: -5px;
    background: #ff4081;
    color: #fff;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 2px;
}

/* Toast提示样式 */
.zad-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 80%;
    text-align: center;
}

.zad-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.zad-toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.zad-toast-error {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* 取消按钮样式 */
.zad-cancel-btn {
    background: #6c757d !important;
    border-color: #6c757d !important;
}
/* ǩĬأͣʾ */
.zad-widget-card .graphic-hover-title {
    opacity: 0;
    transition: opacity 0.3s;
}
.zad-widget-card:hover .graphic-hover-title {
    opacity: 1;
}
/* ȷǩʽȷ */
.zad-widget-card .graphic-hover-title {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
}
