/**
 * 库存锁定弹窗组件样式
 * Lock Modal Component Styles
 */

/* ===== 弹窗容器 ===== */
.lock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.lock-modal-container {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* ===== 弹窗头部 ===== */
.lock-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.lock-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
}

.lock-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8c8c8c;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lock-modal-close:hover {
    background-color: #f5f5f5;
    color: #262626;
}

/* ===== 弹窗内容区域 ===== */
.lock-modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ===== 信息展示区域 ===== */
.lock-modal-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
}

.lock-modal-info-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 12px;
}

.lock-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.lock-modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lock-modal-info-label {
    font-size: 13px;
    color: #86909c;
}

.lock-modal-info-value {
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
}

/* ===== 库位选择区域 ===== */
.lock-modal-location-section {
    margin-bottom: 24px;
}

.lock-modal-location-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 16px;
}

.lock-modal-location-list {
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    overflow: hidden;
}

.lock-modal-location-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.lock-modal-location-item:last-child {
    border-bottom: none;
}

.lock-modal-location-item:hover {
    background-color: #f7f8fa;
}

.lock-modal-location-item.selected {
    background-color: #e6f7ff;
}

.lock-modal-location-item.disabled {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.lock-modal-location-item.disabled .lock-modal-location-info {
    color: #999;
}

.lock-modal-location-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    cursor: pointer;
}

.lock-modal-location-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.lock-modal-location-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.lock-modal-location-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lock-modal-location-info-label {
    font-size: 12px;
    color: #86909c;
}

.lock-modal-location-info-value {
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
}

.lock-modal-location-quantity {
    width: 120px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.lock-modal-location-quantity:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.lock-modal-location-quantity:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.lock-modal-location-total {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: #f0f2f5;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lock-modal-location-total-label {
    font-size: 14px;
    color: #4d5156;
}

.lock-modal-location-total-value {
    font-size: 16px;
    font-weight: 600;
    color: #1976d2;
}

/* ===== 锁定表单区域 ===== */
.lock-modal-form-section {
    margin-bottom: 24px;
}

.lock-modal-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 16px;
}

.lock-modal-form-item {
    margin-bottom: 20px;
}

.lock-modal-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 8px;
}

.lock-modal-form-label .required {
    color: #d54941;
    margin-left: 4px;
}

/* 锁定原因选项 */
.lock-modal-reason-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lock-modal-reason-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lock-modal-reason-option:hover {
    border-color: #1976d2;
    background-color: #f5f9ff;
}

.lock-modal-reason-option.selected {
    border-color: #1976d2;
    background-color: #e6f7ff;
}

.lock-modal-reason-option input[type="radio"] {
    margin-right: 8px;
}

.lock-modal-reason-text {
    font-size: 14px;
    color: #1d2129;
}

/* 数量输入 */
.lock-modal-quantity-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lock-modal-quantity-input:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.lock-modal-quantity-info {
    margin-top: 8px;
    font-size: 13px;
    color: #86909c;
}

/* 备注输入 */
.lock-modal-remark-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.lock-modal-remark-textarea:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.lock-modal-remark-textarea.required {
    border-color: #d54941;
}

.lock-modal-remark-textarea.required:focus {
    box-shadow: 0 0 0 2px rgba(213, 73, 65, 0.2);
}

.lock-modal-remark-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 13px;
    color: #86909c;
}

/* ===== 弹窗底部按钮 ===== */
.lock-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    gap: 12px;
}

.lock-modal-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lock-modal-btn-cancel {
    background: white;
    color: #4d5156;
    border: 1px solid #d9d9d9;
}

.lock-modal-btn-cancel:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.lock-modal-btn-confirm {
    background: #1976d2;
    color: white;
    border: 1px solid #1976d2;
}

.lock-modal-btn-confirm:hover {
    background: #1565c0;
}

.lock-modal-btn-confirm:disabled {
    background: #a0a0a0;
    border-color: #a0a0a0;
    cursor: not-allowed;
}

/* ===== 库位空状态 ===== */
.lock-modal-location-empty {
    padding: 40px 20px;
    text-align: center;
    background-color: #f7f8fa;
    border-radius: 6px;
    border: 1px dashed #d9d9d9;
}

.lock-modal-location-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.lock-modal-location-empty-text {
    font-size: 14px;
    color: #4d5156;
    margin-bottom: 8px;
}

.lock-modal-location-empty-desc {
    font-size: 13px;
    color: #86909c;
}

/* ===== 响应式适配 ===== */
@media (max-width: 768px) {
    .lock-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .lock-modal-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lock-modal-location-info {
        grid-template-columns: 1fr;
    }

    .lock-modal-reason-options {
        grid-template-columns: 1fr;
    }

    .lock-modal-body {
        padding: 16px;
    }

    .lock-modal-header,
    .lock-modal-footer {
        padding: 16px 20px;
    }
}
