/* 新增移位补货单弹窗样式 */

/* 弹窗遮罩层 */
.add-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.add-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.add-modal-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.add-modal-overlay.show .add-modal-container {
    transform: translateY(0);
}

/* 弹窗头部 */
.add-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.add-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
}

.add-modal-close {
    background: none;
    border: none;
    color: #4e5969;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.add-modal-close:hover {
    background: #f3f3f3;
}

/* 选项卡 */
.add-modal-tabs {
    display: flex;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e7eb;
}

.add-modal-tab {
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    color: #4e5969;
    position: relative;
    flex: 1;
}

.add-modal-tab.active {
    color: #0052d9;
    border-bottom: 2px solid #0052d9;
    background: #fff;
}

/* 弹窗内容 */
.add-modal-content {
    padding: 24px;
    overflow: visible;
    flex: 1;
}

.add-modal-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.add-modal-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 描述文本 */
.add-modal-description {
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #f0f7ff;
    border-left: 4px solid #0052d9;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2129;
}

/* 表单行和组 */
.add-modal-form-row {
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.add-modal-form-group {
    flex: 1;
    min-width: 200px;
}

.add-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2129;
    font-size: 14px;
}

.add-modal-required::after {
    content: "*";
    color: #e34d59;
    margin-left: 4px;
}

.add-modal-input,
.add-modal-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    color: #1d2129;
    background: #fff;
}

.add-modal-input:focus,
.add-modal-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

/* 自定义下拉选择框样式 */
.add-modal-select-container {
    position: relative;
    width: 100%;
    z-index: 100;
}

.add-modal-select-input {
    cursor: pointer;
    padding-right: 40px;
}

.add-modal-select-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4e5969;
    border-radius: 4px;
    transition: all 0.2s;
}

.add-modal-select-arrow:hover {
    background: rgba(0, 0, 0, 0.05);
}

.add-modal-arrow-icon {
    transition: transform 0.2s ease;
}

.add-modal-select-container.active .add-modal-arrow-icon {
    transform: rotate(180deg);
}

.add-modal-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1010;
    display: none;
    overflow: hidden;
    margin-top: 4px;
}

.add-modal-select-container.active .add-modal-select-dropdown {
    display: block;
}

.add-modal-select-search {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.add-modal-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.add-modal-search-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.add-modal-select-options {
    max-height: 200px;
    overflow-y: auto;
}

.add-modal-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #1d2129;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-modal-select-option:hover {
    background-color: #f5f7fa;
}

.add-modal-select-option.selected {
    background-color: #e6f4ff;
    color: #0052d9;
    font-weight: 500;
}

.add-modal-select-option:last-child {
    border-bottom: none;
}

.add-modal-select-option-info {
    display: flex;
    flex-direction: column;
}

.add-modal-select-option-name {
    font-weight: 500;
}

.add-modal-select-option-dept {
    font-size: 12px;
    color: #4e5969;
}

.add-modal-select-option-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.add-modal-select-option-status.available {
    background-color: #f0f9ff;
    color: #0c7cd5;
}

.add-modal-select-option-status.busy {
    background-color: #fff1f0;
    color: #d5302f;
}

.add-modal-no-results {
    padding: 16px;
    text-align: center;
    color: #4e5969;
    font-size: 14px;
}



/* 货品选择触发按钮样式 */
.product-trigger-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #1d2129;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.product-trigger-btn:hover {
    border-color: #0052d9;
}

.product-trigger-btn:active {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.product-trigger-arrow {
    color: #4e5969;
    transition: transform 0.2s;
}

.product-trigger-btn:hover .product-trigger-arrow {
    color: #0052d9;
}

/* 产品表格 */
.add-modal-products-container {
    margin-top: 20px;
}

.add-modal-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #4e5969;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

.add-modal-products-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    display: none;
}

.add-modal-products-table.active {
    display: table;
}

.add-modal-products-table th,
.add-modal-products-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.add-modal-products-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #1d2129;
    font-size: 14px;
}

.add-modal-products-table tr:hover {
    background-color: #f9f9f9;
}

.add-modal-checkbox-cell {
    width: 50px;
    text-align: center;
}

.add-modal-quantity-cell input {
    width: 100px;
    text-align: center;
    padding: 8px 10px;
}

/* 弹窗底部按钮 */
.add-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fff;
}

.add-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-modal-btn-primary {
    background-color: #0052d9;
    color: white;
}

.add-modal-btn-primary:hover {
    background-color: #2673dd;
}

.add-modal-btn-secondary {
    background-color: #fff;
    color: #4e5969;
    border: 1px solid #d1d5db;
}

.add-modal-btn-secondary:hover {
    background-color: #f5f7fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .add-modal-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .add-modal-tabs {
        padding: 0 15px;
    }
    
    .add-modal-tab {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .add-modal-content {
        padding: 20px;
    }
}