/* ===== 广告位插件样式 ===== */

/* 后台管理 */
.ads-form { max-width: 700px; }
.ads-form-row { display: flex; gap: 12px; margin-bottom: 12px; }
@media (max-width: 600px) { .ads-form-row { flex-direction: column; gap: 0; } }
.ads-inline { display: inline; }
.ads-flex-center-gap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ads-label-check { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; padding-top: 34px; }
.ads-w-70 { width: 70px; }
.ads-w-80 { width: 80px; }
.ads-w-90 { width: 90px; }
.ads-w-100 { width: 100px; }
.ads-w-120 { width: 120px; }
.ads-w-170 { width: 170px; }
.ads-w-220 { width: 220px; }
.ads-pt-24 { padding-top: 24px; }
.ads-fs-12 { font-size: 12px; }
textarea.form-input { resize: vertical; }
.ads-fs-12 { font-size: 12px; }
.c-666 { color: #666; }

/* 前台侧栏广告面板（复用核心 mn-panel 外壳，仅补内部布局） */
.ads-panel { margin-bottom: 16px; }
.ads-title-icon { font-size: 12px; }
.ads-list { display: flex; flex-direction: column; gap: 8px; }
.ads-image-item { position: relative; display: block; text-decoration: none; }
.ads-image-item:hover { opacity: 0.85; }
.ads-img { width: 100%; height: auto; display: block; border-radius: 8px; }
.ads-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    line-height: 1.5;
    pointer-events: none; /* 不挡点击，点透到图片链接 */
}
.ads-html-item { overflow: hidden; border-radius: 8px; }
.ads-html-item img { max-width: 100%; height: auto; }

/* 文字广告（HTML 类型）：两列彩色胶囊按钮，颜色循环，悬停填充 */
.ads-html-item { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ads-html-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}
/* 8 色循环：描边样式 */
.ads-html-item a:nth-child(8n+1) { color: #e05260; background: #fdecee; border-color: #fdecee; }
.ads-html-item a:nth-child(8n+2) { color: #4a7dff; background: #e9efff; border-color: #e9efff; }
.ads-html-item a:nth-child(8n+3) { color: #2fa779; background: #e6f6ef; border-color: #e6f6ef; }
.ads-html-item a:nth-child(8n+4) { color: #8a94a6; background: #f1f3f6; border-color: #f1f3f6; }
.ads-html-item a:nth-child(8n+5) { color: #f08c3a; background: #fdf1e6; border-color: #fdf1e6; }
.ads-html-item a:nth-child(8n+6) { color: #9a5ce0; background: #f3ebfd; border-color: #f3ebfd; }
.ads-html-item a:nth-child(8n+7) { color: #e05c9a; background: #fdeaf3; border-color: #fdeaf3; }
.ads-html-item a:nth-child(8n+8) { color: #2aa8c9; background: #e5f6fa; border-color: #e5f6fa; }
/* 悬停：填充为对应实色 */
.ads-html-item a:nth-child(8n+1):hover { color: #fff; background: #e05260; }
.ads-html-item a:nth-child(8n+2):hover { color: #fff; background: #4a7dff; }
.ads-html-item a:nth-child(8n+3):hover { color: #fff; background: #2fa779; }
.ads-html-item a:nth-child(8n+4):hover { color: #fff; background: #8a94a6; }
.ads-html-item a:nth-child(8n+5):hover { color: #fff; background: #f08c3a; }
.ads-html-item a:nth-child(8n+6):hover { color: #fff; background: #9a5ce0; }
.ads-html-item a:nth-child(8n+7):hover { color: #fff; background: #e05c9a; }
.ads-html-item a:nth-child(8n+8):hover { color: #fff; background: #2aa8c9; }
/* 手机窄屏改单列 */
@media (max-width: 480px) { .ads-html-item { grid-template-columns: 1fr; } }

/* Alpine x-cloak 初始隐藏 */
[x-cloak] { display: none !important; }
