/* 库内拦截页面样式 - 复制自出库单策略页面并添加warehouse-interception前缀 */
.warehouse-interception-card {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

/* 搜索区域样式 */
.warehouse-interception-search-form {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 组合搜索框样式 */
.warehouse-interception-search-field .warehouse-interception-search-combined {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e6eb;
    width: 100%;
    min-width: 200px;
}

.warehouse-interception-search-field .warehouse-interception-search-type {
    width: 100px;
    height: 36px;
    border: none;
    border-right: 1px solid #e5e6eb;
    border-radius: 0;
    padding: 0 12px;
    cursor: pointer;
    margin: 0;
    background-color: #ffffff;
}

.warehouse-interception-search-field .warehouse-interception-search-value {
    flex: 1;
    border: none;
    border-radius: 0;
    height: 36px;
    background: #ffffff;
    padding: 0 12px;
    margin: 0;
}

.warehouse-interception-search-field .warehouse-interception-search-type:focus,
.warehouse-interception-search-field .warehouse-interception-search-value:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-interception-search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.warehouse-interception-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.warehouse-interception-search-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    min-width: 80px;
}

.warehouse-interception-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    vertical-align: middle;
    box-sizing: border-box;
}

.warehouse-interception-search-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    vertical-align: middle;
    box-sizing: border-box;
}

/* 多选下拉框样式 */
.warehouse-interception-search-select[multiple] {
    height: auto;
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px;
}

.warehouse-interception-search-select[multiple] option {
    padding: 6px 8px;
    border-radius: 2px;
    margin: 2px 0;
    cursor: pointer;
}

.warehouse-interception-search-select[multiple] option:checked {
    background: linear-gradient(#1890ff, #1890ff);
    color: #fff;
    font-weight: 500;
}

.warehouse-interception-search-select[multiple] option:hover {
    background-color: #f0f5ff;
}

/* 自定义多选下拉框 */
.warehouse-interception-multi-select {
    position: relative;
    width: 100%;
}

/* 多选下拉框样式 - 添加前缀 */
.warehouse-interception-multi-select-display {
    min-height: 36px;
    padding: 4px 32px 4px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.warehouse-interception-multi-select-display:hover {
    border-color: #c9cdd4;
}

.warehouse-interception-multi-select-placeholder {
    color: #86909c;
    font-size: 13px;
    user-select: none;
}

.warehouse-interception-multi-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    color: #86909c;
    pointer-events: none;
}

.warehouse-interception-multi-select-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #e8f4ff;
    color: #1890ff;
    border-radius: 2px;
    font-size: 12px;
    line-height: 20px;
}

.warehouse-interception-tag-close {
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #1890ff;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.warehouse-interception-tag-close:hover {
    opacity: 1;
}

.warehouse-interception-multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
}

.warehouse-interception-multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.warehouse-interception-multi-select-option:hover {
    background-color: #f5f7fa;
}

.warehouse-interception-multi-select-option input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.warehouse-interception-multi-select-option span {
    font-size: 13px;
    color: #1d2129;
}

.warehouse-interception-search-input[type="date"] {
    padding: 0 8px;
    min-width: 120px;
}

.warehouse-interception-search-input:focus,
.warehouse-interception-search-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-interception-search-input:hover,
.warehouse-interception-search-select:hover {
    border-color: #c9cdd4;
}

/* 列表区域样式 */
.warehouse-interception-list {
    height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.warehouse-interception-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.warehouse-interception-title {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.warehouse-interception-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.warehouse-interception-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f5f5f5;
    color: #4e5969;
    border: 1px solid #d9d9d9;
}

.warehouse-interception-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.warehouse-interception-btn:hover {
    background-color: #e6e6e6;
}

/* 表格样式 */
.warehouse-interception-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}

.warehouse-interception-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1850px;
}

/* 操作列样式 */
.warehouse-interception-table th:nth-child(13),
.warehouse-interception-table td:nth-child(13) {
    width: 100px;
    text-align: center;
    white-space: nowrap;
}

/* 详情按钮样式 */
.warehouse-interception-detail-btn {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background-color: #1890ff;
    color: white;
}

.warehouse-interception-detail-btn:hover {
    background-color: #40a9ff;
}

.warehouse-interception-table th,
.warehouse-interception-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.warehouse-interception-table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #ebeef5;
}

.warehouse-interception-table tbody tr {
    cursor: pointer;
}

.warehouse-interception-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 拦截单号、出库单号、来源单号列宽度 */
.warehouse-interception-table th:nth-child(1),
.warehouse-interception-table td:nth-child(1),
.warehouse-interception-table th:nth-child(2),
.warehouse-interception-table td:nth-child(2),
.warehouse-interception-table th:nth-child(3),
.warehouse-interception-table td:nth-child(3) {
    min-width: 120px;
}

/* 货主名称、店铺名称列宽度 */
.warehouse-interception-table th:nth-child(4),
.warehouse-interception-table td:nth-child(4),
.warehouse-interception-table th:nth-child(5),
.warehouse-interception-table td:nth-child(5) {
    min-width: 150px;
}

/* 周转箱编码、物流单号列宽度 */
.warehouse-interception-table th:nth-child(7),
.warehouse-interception-table td:nth-child(7),
.warehouse-interception-table th:nth-child(8),
.warehouse-interception-table td:nth-child(8) {
    min-width: 120px;
}

/* 拦截原因列宽度 */
.warehouse-interception-table th:nth-child(10),
.warehouse-interception-table td:nth-child(10) {
    min-width: 200px;
}

/* 包裹数量、周转箱编码、物流单号、拦截状态、操作 居中对齐 */
.warehouse-interception-table th:nth-child(6),
.warehouse-interception-table td:nth-child(6),
.warehouse-interception-table th:nth-child(7),
.warehouse-interception-table td:nth-child(7),
.warehouse-interception-table th:nth-child(8),
.warehouse-interception-table td:nth-child(8),
.warehouse-interception-table th:nth-child(9),
.warehouse-interception-table td:nth-child(9),
.warehouse-interception-table th:nth-child(13),
.warehouse-interception-table td:nth-child(13) {
    text-align: center;
}

/* 展开/折叠功能样式 - 参考库存查询页面 */
.warehouse-interception-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.warehouse-interception-expand-btn:hover:not(.warehouse-interception-disabled) {
    background-color: #f0f0f0;
}

.warehouse-interception-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.warehouse-interception-expand-btn.warehouse-interception-expanded {
    background-color: #e6f7ff;
}

.warehouse-interception-expand-btn svg {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s ease;
}

.warehouse-interception-expand-btn:hover svg {
    fill: #1890ff;
}

.warehouse-interception-expand-btn.warehouse-interception-expanded svg {
    fill: #1890ff;
    transform: rotate(90deg);
}

/* 主行样式 */
.warehouse-interception-table .warehouse-interception-main-row {
    cursor: pointer;
}

/* 展开行样式 */
.warehouse-interception-table .warehouse-interception-detail-row {
    background-color: #fafafa;
    border-left: 3px solid #1890ff;
    display: table-row;
}

.warehouse-interception-table .warehouse-interception-detail-row.warehouse-interception-expanding {
    animation: warehouseInterceptionExpandAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
    display: table-row !important;
}

.warehouse-interception-table .warehouse-interception-detail-row.warehouse-interception-collapsing {
    animation: warehouseInterceptionCollapseAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
}

@keyframes warehouseInterceptionExpandAnimation {
    0% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes warehouseInterceptionCollapseAnimation {
    0% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

.warehouse-interception-table .warehouse-interception-detail-cell {
    padding: 0;
    vertical-align: top;
}

.warehouse-interception-goods-container {
    padding: 16px;
    background: white;
    margin: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.warehouse-interception-goods-header {
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e6eb;
}

.warehouse-interception-goods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.warehouse-interception-goods-table th {
    background-color: #f0f2f5;
    color: #1d2129;
    font-weight: 500;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
}

/* 出库数量和指定批次居中 */
.warehouse-interception-goods-table th:nth-child(3),
.warehouse-interception-goods-table td:nth-child(3),
.warehouse-interception-goods-table th:nth-child(4),
.warehouse-interception-goods-table td:nth-child(4) {
    text-align: center;
}

/* 货品体积和货品重量居中 */
.warehouse-interception-goods-table th:nth-child(8),
.warehouse-interception-goods-table td:nth-child(8),
.warehouse-interception-goods-table th:nth-child(9),
.warehouse-interception-goods-table td:nth-child(9) {
    text-align: center;
}

/* 货品名称左对齐 */
.warehouse-interception-goods-table th:nth-child(2),
.warehouse-interception-goods-table td:nth-child(2) {
    text-align: left;
}

.warehouse-interception-goods-table td {
    color: #4d5156;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.warehouse-interception-goods-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 状态标签样式 */
.warehouse-interception-status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.warehouse-interception-status-pending {
    background-color: #ecf5ff;
    color: #409eff;
    border: 1px solid #d9ecff;
}

.warehouse-interception-status-processing {
    background-color: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

.warehouse-interception-status-cancelled {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.warehouse-interception-status-working {
    background-color: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

.warehouse-interception-status-exception {
    background-color: #ff0000;
    color: #ffffff;
    border: 1px solid #ff0000;
}

/* 分页样式 */
.warehouse-interception-pagination {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.warehouse-interception-pagination-info {
    font-size: 14px;
    color: #4b5563;
}

.warehouse-interception-pagination-controls {
    display: flex;
    gap: 8px;
}

.warehouse-interception-pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.warehouse-interception-pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.warehouse-interception-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.warehouse-interception-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
}

.warehouse-interception-page-size-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 13px;
}

/* 无数据提示样式 */
.warehouse-interception-no-data {
    text-align: center;
    color: #86909c;
    padding: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .warehouse-interception-card {
        padding: 16px;
    }
    
    .warehouse-interception-table {
        font-size: 12px;
    }
    
    .warehouse-interception-table th,
    .warehouse-interception-table td {
        padding: 8px;
    }
}
