/*
 Theme Name: Astra HS Child
 Theme URI: https://hs.56ata.com
 Description: HS Code 查询工具子主题（基于 Astra）
 Author: 56ata
 Template: astra
 Version: 1.0.0
*/

@import url("../astra/style.css");


.hs-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 60%;
    /* 与搜索框宽度一致 */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 999;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.hs-suggestions-list li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f7fafc;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-suggestions-list li:hover {
    background: #f0f7ff;
    color: #0274be;
}

/* 容器修整 */
.hs-custom-page {
    background: #f0f2f5;
    padding: 40px 0;
}

/* 搜索框美化：模仿专业工具 */
.hs-search-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.hs-search-form .search-input-group {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid #0274be;
    border-radius: 8px;
    overflow: hidden;
}

.hs-search-form input {
    flex: 1;
    border: none !important;
    padding: 15px 20px !important;
    outline: none;
}

.hs-search-form button {
    background: #0274be;
    color: #fff;
    border: none;
    padding: 0 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.hs-search-form button:hover {
    background: #015a96;
}

/* 响应式表格：防止失真 */
.hs-table-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.hs-responsive-table {
    width: 100%;
    overflow-x: auto;
    /* 关键：手机端左右滑动而非挤压 */
    -webkit-overflow-scrolling: touch;
}

.hs-main-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    /* 保证在小屏幕上也不挤缩文字 */
}

.hs-main-table th {
    background: #f8fabb;
    /* 浅黄色提醒，类似 365area */
    color: #333;
    text-align: left;
    padding: 15px;
    font-size: 14px;
    border-bottom: 2px solid #eee;
}

.hs-main-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
}

/* 编码高亮 */
.code-font a {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0274be;
    text-decoration: none;
}

/* 状态标签 */
.badge {
    background: #e1f5fe;
    color: #0288d1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 详情按钮 */
.view-link {
    color: #0274be;
    text-decoration: underline;
}

/* 手机端适配调整 */
@media (max-width: 768px) {
    .hs-search-section {
        padding: 15px;
    }

    .hs-search-form .search-input-group {
        flex-direction: column;
        border: none;
    }

    .hs-search-form input {
        border: 1px solid #ddd !important;
        margin-bottom: 10px;
        border-radius: 4px !important;
    }

    .hs-search-form button {
        padding: 12px;
        border-radius: 4px;
    }
}

/* 搜索结果表格专用样式 */
.hs-detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
    /* 强制固定布局，防止被长文字撑开 */
}

.hs-detail-table th {
    background: #f0f7ff;
    color: #444;
    font-weight: 600;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid #0274be;
    font-size: 13px;
}

.hs-detail-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    word-wrap: break-word;
    /* 允许长词换行 */
}

/* 针对特定列的宽度控制 */
.hs-code-cell {
    width: 100px;
    font-family: monospace;
    font-weight: bold;
}

.hs-name-cell {
    width: auto;
    color: #333;
}

.tax-rate {
    color: #e53e3e;
    font-weight: bold;
}

/* 详情按钮美化 */
.hs-view-btn {
    background: #0274be;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

/* 响应式：手机端隐藏不重要的列 */
@media (max-width: 600px) {

    .hs-detail-table th:nth-child(3),
    .hs-detail-table td:nth-child(3),
    .hs-detail-table th:nth-child(4),
    .hs-detail-table td:nth-child(4) {
        display: none;
    }
}

/* 列表页专用表格样式 */
.hs-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.hs-list-table th {
    background: #f0f7ff;
    color: #0274be;
    text-align: left;
    padding: 12px 10px;
    font-size: 14px;
    border-bottom: 2px solid #0274be;
}

.hs-list-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    vertical-align: middle;
}

/* 核心修复：防止文字竖着排 */
.hs-list-table td.name-cell {
    min-width: 200px;
    /* 保证品名列有足够的宽度 */
    line-height: 1.5;
    word-break: break-all;
}

.hs-list-table td.code-font a {
    font-family: Monaco, Consolas, "Lucida Console", monospace;
    font-weight: bold;
    color: #0274be;
    text-decoration: none;
    white-space: nowrap;
    /* 编码绝不换行 */
}

/* 标签样式 */
.tax-tag {
    background: #fff5f5;
    color: #e53e3e;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    border: 1px solid #feb2b2;
}

.view-link {
    display: inline-block;
    padding: 4px 12px;
    background: #0274be;
    color: #fff !important;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
}

.view-link:hover {
    background: #015a96;
}

/* 分页美化 */
.hs-pagination-wrap {
    margin-top: 25px;
    text-align: center;
}

.hs-pagination-wrap .page-numbers {
    padding: 6px 12px;
    border: 1px solid #ddd;
    margin: 0 2px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
}

.hs-pagination-wrap .current {
    background: #0274be;
    color: #fff;
    border-color: #0274be;
}

/* 响应式：手机端侧边栏隐藏，列表全宽 */
@media (max-width: 900px) {
    .hs-sidebar-right {
        display: none;
    }

    .hs-content-left {
        flex: 0 0 100%;
    }

    .hs-list-table th:nth-child(3),
    .hs-list-table td:nth-child(3) {
        display: none;
    }

    /* 手机端隐藏退税率节省空间 */
}