/* =========================================================
   违章查询 list.css - 仅叠加页面特定补充样式
   设计系统主规范见 ../css/common.css
   ========================================================= */

/* 顶部搜索与分类筛选区 */
.violation-toolbar {
    position: sticky;
    top: 52px;
    z-index: 90;
    padding: 10px 12px 12px;
    background:
        radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
        linear-gradient(180deg, #f7faff 0%, #eef4fb 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.violation-toolbar .search-bar {
    position: static;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.violation-toolbar .search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.violation-toolbar .search-kicker {
    position: relative;
    padding-left: 12px;
    color: #172033;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.violation-toolbar .search-kicker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 15px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2563eb 0%, #0ea5e9 100%);
    transform: translateY(-50%);
}

.violation-toolbar .search-hint {
    color: #8a97aa;
    font-size: 11px;
    white-space: nowrap;
}

.violation-toolbar .search-input-wrapper {
    min-width: 0;
    height: 46px;
    border-radius: 16px;
    background: #f5f8fc;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.violation-toolbar .search-input-wrapper:focus-within {
    border-color: rgba(37, 99, 235, 0.45);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), 0 10px 24px rgba(37, 99, 235, 0.08);
}

.violation-toolbar .search-input-wrapper .search-icon {
    left: 15px;
    width: 18px;
    height: 18px;
    color: #8aa0bd;
}

.violation-toolbar .search-input-wrapper .clear-icon {
    right: 14px;
    width: 18px;
    height: 18px;
    padding: 2px;
    border-radius: 50%;
    background: #eef2f7;
    color: #71839b;
}

.violation-toolbar .search-input-wrapper .search-input {
    height: 100%;
    padding: 0 44px;
    border: 0;
    box-shadow: none;
    background: transparent;
    font-size: 14px;
    color: #172033;
}

.violation-toolbar .search-input-wrapper .search-input:focus {
    box-shadow: none;
}

.violation-toolbar .search-input-wrapper .search-input::placeholder {
    color: #8b97a8;
}

.violation-toolbar .category-filter {
    position: relative;
    margin-top: 10px;
    padding: 12px 0 4px;
    background: transparent;
    overflow: hidden;
}

.violation-toolbar .category-filter::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 34px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(239, 246, 255, 0), #eef4fb 76%);
}

.violation-toolbar .category-filter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 4px 10px;
}

.violation-toolbar .category-filter-head span {
    color: #172033;
    font-size: 14px;
    font-weight: 800;
}

.violation-toolbar .category-filter-head small {
    color: #96a3b4;
    font-size: 11px;
    font-weight: 500;
}

.violation-toolbar .category-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding: 16px;
}

.violation-toolbar .category-scroll::-webkit-scrollbar {
    display: none;
}

.violation-toolbar .category-list {
    align-items: center;
    gap: 9px;
    min-width: max-content;
    padding: 0 4px 4px;
}

.violation-toolbar .category-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.84);
    color: #526177;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.violation-toolbar .category-item::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.violation-toolbar .category-item:nth-child(6n + 1)::before { background: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13); }
.violation-toolbar .category-item:nth-child(6n + 2)::before { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.13); }
.violation-toolbar .category-item:nth-child(6n + 3)::before { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.13); }
.violation-toolbar .category-item:nth-child(6n + 4)::before { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.13); }
.violation-toolbar .category-item:nth-child(6n + 5)::before { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.13); }
.violation-toolbar .category-item:nth-child(6n)::before { background: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.13); }

.violation-toolbar .category-item.active {
    color: #1556d5;
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(14, 165, 233, 0.10) 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.violation-toolbar .category-item.active::before {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.violation-toolbar .category-item:active {
    transform: scale(0.96);
}

.content {
    padding-top: 12px;
}

/* 违章卡片的小细节：分类 chip 按分类映射颜色（在 list.js 加类） */
.violation-card .violation-category.warn   { background: var(--warning-soft); color: var(--warning); }
.violation-card .violation-category.danger { background: var(--danger-soft);  color: var(--danger);  }
.violation-card .violation-category.info   { background: var(--info-soft);    color: var(--info);    }

/* 违章卡片小增强：首行加粗 hover 微阴影 */
.violation-card:hover { box-shadow: 0 10px 26px rgba(15,23,42,0.09), 0 3px 8px rgba(15,23,42,0.05); }

.violation-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.hazard-chip,
.basis-chip,
.industry-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255,255,255,0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hazard-chip.general {
    color: #047857;
    background: rgba(16,185,129,0.10);
}

.hazard-chip.major {
    color: #b91c1c;
    background: rgba(239,68,68,0.10);
}

.basis-chip {
    color: #1d4ed8;
    background: rgba(37,99,235,0.10);
}

.industry-chip {
    color: #7c3aed;
    background: rgba(124,58,237,0.10);
}

/* 底部列表留空避免被tab遮挡 */
.violation-list { padding-bottom: calc(var(--h-nav) + var(--safe-bottom) + 24px); }

.load-more-state {
    display: none;
    padding: 8px 0 calc(var(--h-nav) + var(--safe-bottom) + 18px);
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

/* 违章卡片 - 法律依据显示 (替代原处罚信息) */
.violation-card .legal-basis {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(14,165,233,0.06), rgba(37,99,235,0.05));
    border: 1px solid rgba(14,165,233,0.12);
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.6;
}
.violation-card .legal-basis .label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
}
.violation-card .legal-basis .label svg { width: 13px; height: 13px; }

/* 隐藏旧的处罚信息 (向后兼容) */
.violation-card .penalty-info { display: none !important; }

/* 任务2：移除卡片右下角箭头（截图中「>」符号） */
.violation-card .arrow-icon { display: none !important; }
.violation-card .card-footer { border-top: 0; padding-top: 6px; margin-top: 6px; }

/* 任务3：修复右上角 chip 与装饰圆颜色重叠
   - 伪元素缩小、移开、降低透明度
   - chip 提升层级并加半透明白底描边确保清晰可读 */
.violation-card::after {
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    opacity: 0.25;
    background: linear-gradient(135deg,#eff6ff,#dbeafe);
}
.violation-card .card-header { position: relative; z-index: 2; }
.violation-card .violation-category {
    position: relative;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 6px rgba(15,23,42,0.08), 0 0 0 2px #fff inset;
    backdrop-filter: blur(4px);
}

/* Extracted inline style attributes from mobile/violations/list.html. */
.u-style-224b51a7 { display: none; }
