/* Zibll多栏目链接模块 - 前端样式（静态文件，可缓存） */

.zml-widget {
    --mll-primary: #f97316;
    --mll-primary-dark: #ea580c;
    --mll-primary-light: #fb923c;
    --mll-bg-light: #fff7ed;
}

/* 透明背景容器（替换主题 zib-widget 白底） */
.zibll-widget-transparent {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* ===== Tab容器通用 ===== */
.zml-widget .zml-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
    align-content: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.zml-widget.is-wrap .zml-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
}
.zml-widget .zml-tabs::-webkit-scrollbar { height: 4px; }
.zml-widget.is-wrap .zml-tabs::-webkit-scrollbar { display: none; }
.zml-widget .zml-tabs::-webkit-scrollbar-track { background: rgba(0,0,0,.05); border-radius: 2px; margin: 0 4px; }
.zml-widget .zml-tabs::-webkit-scrollbar-thumb { background: rgba(249,115,22,.4); border-radius: 2px; }
.zml-widget .zml-tabs::-webkit-scrollbar-thumb:hover { background: rgba(249,115,22,.6); }

.zml-widget .zibll-tab-align-left   { justify-content: flex-start; }
.zml-widget .zibll-tab-align-center { justify-content: center; }
.zml-widget .zibll-tab-align-right  { justify-content: flex-end; }

/* ===== 分页 ===== */
.zml-widget .zibll-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255,255,255,.1);
}
.zml-widget .zibll-page-info { color: #9ca3af; font-size: 13px; }
.zml-widget .zibll-page-btns { display: flex; gap: 6px; }
.zml-widget .zibll-page-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
}
.zml-widget .zibll-page-btn:hover:not(:disabled) { border-color: var(--mll-primary); color: var(--mll-primary); }
.zml-widget .zibll-page-btn.active,
.zml-widget .zibll-page-btn:disabled {
    background: var(--mll-primary);
    color: #fff;
    border-color: var(--mll-primary);
}
.zml-widget .zibll-page-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 链接图标（大小/圆角由内联CSS变量控制） ===== */
.zml-widget .zibll-links-box .avatar-img,
.zml-widget .zibll-links-box .link-img {
    display: flex;
    align-items: center;
    justify-content: center;
}
.zml-widget .zibll-links-box .avatar-img img,
.zml-widget .zibll-links-box .link-img img {
    width: var(--mll-icon, 32px);
    height: var(--mll-icon, 32px);
    border-radius: var(--mll-radius, 4px);
    max-width: none;
    max-height: none;
    display: block;
}

/* ===== 滑动胶囊 ===== */
.zml-widget .zibll-tab-capsule-container {
    background: #f3f4f6;
    border-radius: 50px;
    padding: 4px;
    position: relative;
    margin: 0 15px 15px;
}
.zml-widget .zibll-capsule-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    background: linear-gradient(135deg, var(--mll-primary-light), var(--mll-primary));
    border-radius: 50px;
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(249,115,22,.3);
}
.zml-widget .zibll-capsule-tab {
    position: relative;
    z-index: 1;
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color .3s;
    white-space: nowrap;
    border-radius: 50px;
    flex-shrink: 0;
    flex-grow: 0;
}
.zml-widget .zibll-capsule-tab:hover { color: #374151; }
.zml-widget .zibll-capsule-tab.active { color: #fff; }

/* ===== 底部下划线 ===== */
.zml-widget .zibll-tab-underline-container {
    gap: 24px;
    padding: 0 15px 2px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 15px;
}
.zml-widget .zibll-underline-tab {
    position: relative;
    padding: 12px 4px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color .3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-underline-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mll-primary);
    transition: width .3s ease;
}
.zml-widget .zibll-underline-tab:hover { color: #d1d5db; }
.zml-widget .zibll-underline-tab.active { color: var(--mll-primary-light); }
.zml-widget .zibll-underline-tab.active::after { width: 100%; }

/* ===== 背景高亮 ===== */
.zml-widget .zibll-tab-highlight-container { gap: 8px; padding: 0 15px 15px; }
.zml-widget .zibll-highlight-tab {
    padding: 10px 20px;
    border: none;
    background: var(--mll-bg-light);
    color: var(--mll-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-highlight-tab:hover { background: #fed7aa; }
.zml-widget .zibll-highlight-tab.active {
    background: var(--mll-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249,115,22,.3);
}

/* ===== 边框卡片 ===== */
.zml-widget .zibll-tab-border-container { gap: 10px; padding: 0 15px 15px; }
.zml-widget .zibll-border-tab {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-border-tab:hover { border-color: var(--mll-primary-light); color: var(--mll-primary); }
.zml-widget .zibll-border-tab.active {
    border-color: var(--mll-primary);
    color: var(--mll-primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(249,115,22,.15);
}

/* ===== 阴影按钮 ===== */
.zml-widget .zibll-tab-shadow-container { gap: 8px; padding: 0 15px 15px; }
.zml-widget .zibll-shadow-tab {
    padding: 10px 20px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-shadow-tab:hover { background: #e5e7eb; color: #374151; }
.zml-widget .zibll-shadow-tab.active {
    background: var(--mll-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(249,115,22,.35);
}

/* ===== 分段控制 ===== */
.zml-widget .zibll-tab-segment-container {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 0 15px 15px;
    max-width: 100%;
}
.zml-widget .zibll-segment-tab {
    padding: 10px 20px;
    border: none;
    border-right: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-segment-tab.last { border-right: none; }
.zml-widget .zibll-segment-tab:hover { background: #f9fafb; }
.zml-widget .zibll-segment-tab.active {
    background: var(--mll-primary);
    color: #fff;
    border-color: var(--mll-primary);
}

/* ===== 极简文字 ===== */
.zml-widget .zibll-tab-minimal-container { gap: 24px; padding: 0 15px 15px; }
.zml-widget .zibll-minimal-tab {
    position: relative;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color .3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.zml-widget .zibll-minimal-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--mll-primary);
    transform: scaleX(0);
    transition: transform .3s ease;
}
.zml-widget .zibll-minimal-tab:hover { color: #d1d5db; }
.zml-widget .zibll-minimal-tab.active { color: var(--mll-primary); }
.zml-widget .zibll-minimal-tab.active::after { transform: scaleX(1); }

/* ===== 跨境导航 ===== */
.zml-widget .crossnav-tabs {
    margin-bottom: 20px;
    padding: 0 15px;
    position: relative;
}
.zml-widget.is-wrap .crossnav-tabs { margin-bottom: 16px; }
.zml-widget .crossnav-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    margin-right: 6px;
    border: 0;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}
.zml-widget .crossnav-tab.active { background: #ff7a2c; color: #fff; }

.zml-widget .crossnav-links { overflow: hidden; padding: 0 15px; }
.zml-widget .crossnav-item {
    float: left;
    width: 23%;
    height: 80px;
    margin: 1%;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    transition: all .3s ease;
}
.zml-widget .crossnav-item:hover { border-color: #ff7a2c; background: #fff9f5; }
.zml-widget .crossnav-icon {
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.zml-widget .crossnav-icon img,
.zml-widget .crossnav-favicon {
    width: var(--mll-icon, 32px);
    height: var(--mll-icon, 32px);
    border-radius: var(--mll-radius, 4px);
    object-fit: contain;
    display: block;
    flex: none;
    max-width: none;
    max-height: none;
}
.zml-widget .crossnav-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; line-height: 1.2; }
.zml-widget .crossnav-desc { font-size: 12px; color: #666; line-height: 1.2; }

@media (max-width: 768px) {
    .zml-widget .crossnav-item { width: 48%; }
}
