/* ============ 汉字转五笔 - 工具特有样式 ============ */
/* 通用样式（卡片,按钮,分隔线,info-box,form-textarea 等）已由 common.css 统一提供 */

/* ---- 容器 ---- */
#wubi-container {
    margin-bottom: 15px;
}

/* ---- 左右两栏 flex 布局 ---- */
#wubi-container > .section-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#wubi-container > .section-row > .settings-card,
#wubi-container > .section-row > .preview-card {
    flex: 1;
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- config 行 ---- */
.config-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.config-item {
    flex: 1;
    min-width: 120px;
}

.config-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

/* ---- 下拉选择框 ---- */
.pinyin-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    appearance: auto;
}

.pinyin-select:focus {
    border-color: #8b5cf6;
}

/* ---- 字符统计 ---- */
.sort-stats {
    display: flex;
    gap: 24px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
}

.sort-stats strong {
    color: #374151;
    font-weight: 600;
}

/* ---- 按钮居中容器 ---- */
.btn-container-center {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

/* ---- 结果区 ---- */
.result-area {
    padding: 12px 0;
}

/* ---- 五笔编码高亮 ---- */
.wubi-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    color: #7c3aed;
    letter-spacing: 1px;
}

/* ---- ID列表（用于逐行显示） ---- */
.id-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.id-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.id-item:hover {
    background: #f0edff;
    border-color: #c4b5fd;
}

.id-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    min-width: 36px;
    text-align: center;
}

.id-text {
    flex: 1;
    font-size: 14px;
    color: #4b5563;
    word-break: break-all;
}

/* ---- 结果统计 ---- */
.result-stats {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
}

.not-found-hint {
    color: #dc2626;
}

/* ---- 五笔编码表格 ---- */
.wubi-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.wubi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wubi-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.wubi-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 13px;
}

.wubi-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.wubi-table tbody tr:hover {
    background: #f9fafb;
}

.td-index {
    width: 50px;
    color: #9ca3af !important;
    text-align: center;
}

.td-char {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937 !important;
    width: 80px;
    text-align: center;
}

.td-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    color: #7c3aed !important;
    letter-spacing: 1px;
}

.td-action {
    width: 60px;
    text-align: center;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    #wubi-container > .section-row {
        flex-direction: column;
    }
}
